Mercurial > hgrepos > hgweb.cgi > yatex
comparison yatex.el @ 197:3842e55025aa dev
Note on { after \begin.
author | yuuji@gentei.org |
---|---|
date | Tue, 10 Jan 2012 14:12:51 +0900 |
parents | 701d87b607e0 |
children | 768ff443ef84 |
comparison
equal
deleted
inserted
replaced
196:701d87b607e0 | 197:3842e55025aa |
---|---|
1 ;;; -*- Emacs-Lisp -*- | 1 ;;; -*- Emacs-Lisp -*- |
2 ;;; Yet Another tex-mode for emacs - //–ì’¹// | 2 ;;; Yet Another tex-mode for emacs - //–ì’¹// |
3 ;;; yatex.el rev. 1.74.7 | 3 ;;; yatex.el rev. 1.74.7 |
4 ;;; (c)1991-2012 by HIROSE Yuuji.[yuuji@yatex.org] | 4 ;;; (c)1991-2012 by HIROSE Yuuji.[yuuji@yatex.org] |
5 ;;; Last modified Tue Jan 10 13:17:19 2012 on firestorm | 5 ;;; Last modified Tue Jan 10 13:27:32 2012 on firestorm |
6 ;;; $Id$ | 6 ;;; $Id$ |
7 ;;; The latest version of this software is always available at; | 7 ;;; The latest version of this software is always available at; |
8 ;;; http://www.yatex.org/ | 8 ;;; http://www.yatex.org/ |
9 | 9 |
10 (require 'comment) | 10 (require 'comment) |
1494 ; (/= (following-char) ?|)) | 1494 ; (/= (following-char) ?|)) |
1495 ; (YaTeX-insert-inherit "||") | 1495 ; (YaTeX-insert-inherit "||") |
1496 ; (backward-char 1)) | 1496 ; (backward-char 1)) |
1497 (t (YaTeX-self-insert arg)))) | 1497 (t (YaTeX-self-insert arg)))) |
1498 | 1498 |
1499 (defvar YaTeX-use-jmode-hook (not (and (fboundp 'skk-mode) (boundp 'skk-mode))) | |
1500 "*Non-nil means activate automatic jmode switcher within/out math mode. | |
1501 Hopefully, change default to t in the next version of 1.75.") | |
1499 (defun YaTeX-jmode-hook (old new) | 1502 (defun YaTeX-jmode-hook (old new) |
1500 "A hook controling jmode on/off." | 1503 "A hook controling jmode on/off." |
1501 ;; This function is called via point-entered/leave hook, so that | 1504 ;; This function is called via point-entered/leave hook, so that |
1502 ;; codes in it is evaluated on such emacsen as having text-properties. | 1505 ;; codes in it is evaluated on such emacsen as having text-properties. |
1503 (let ((inhibit-point-motion-hooks t) | 1506 (let ((inhibit-point-motion-hooks t) |
1548 (and (YaTeX-in-math-mode-p) | 1551 (and (YaTeX-in-math-mode-p) |
1549 (or (/= (preceding-char) ?$) (/= (following-char) ?$)))) | 1552 (or (/= (preceding-char) ?$) (/= (following-char) ?$)))) |
1550 (insert "$") | 1553 (insert "$") |
1551 (insert "$$") | 1554 (insert "$$") |
1552 (forward-char -1) | 1555 (forward-char -1) |
1553 (if (fboundp 'add-text-properties) | 1556 (and YaTeX-use-jmode-hook |
1554 (add-text-properties | 1557 (fboundp 'add-text-properties) |
1555 (1- (point)) (1+ (point)) | 1558 (add-text-properties |
1556 (list 'point-left 'YaTeX-jmode-hook | 1559 (1- (point)) (1+ (point)) |
1557 'point-entered 'YaTeX-jmode-hook | 1560 (list 'point-left 'YaTeX-jmode-hook |
1558 'front-sticky t | 1561 'point-entered 'YaTeX-jmode-hook |
1559 'rear-nonsticky t | 1562 'front-sticky t |
1560 'mjmode nil | 1563 'rear-nonsticky t |
1561 'jmode (YaTeX-jmode)))) | 1564 'mjmode nil |
1565 'jmode (YaTeX-jmode)))) | |
1562 (YaTeX-jmode-off) | 1566 (YaTeX-jmode-off) |
1563 (or YaTeX-auto-math-mode YaTeX-math-mode (YaTeX-toggle-math-mode 1)))) | 1567 (or YaTeX-auto-math-mode YaTeX-math-mode (YaTeX-toggle-math-mode 1)))) |
1564 | 1568 |
1565 (defun YaTeX-insert-dollars-region (beg end) | 1569 (defun YaTeX-insert-dollars-region (beg end) |
1566 (interactive "r") | 1570 (interactive "r") |