CVSROOT: /sources/auctex Module name: auctex Changes by: Tassilo Horn <tsdh> 13/02/13 20:10:27
Index: tex.el =================================================================== RCS file: /sources/auctex/auctex/tex.el,v retrieving revision 5.706 retrieving revision 5.707 diff -u -b -r5.706 -r5.707 --- tex.el 12 Feb 2013 07:54:40 -0000 5.706 +++ tex.el 13 Feb 2013 20:10:27 -0000 5.707 @@ -5110,6 +5110,13 @@ :group 'TeX-macro :type 'boolean) +(defcustom TeX-math-close-single-dollar nil + "If non-nil, when outside math mode insert opening and closing dollar +signs for TeX inline equation and put the point between them, just by +typing a single `$'." + :group 'TeX-macro + :type 'boolean) + (defun TeX-insert-dollar (&optional arg) "Insert dollar sign. @@ -5148,7 +5155,7 @@ (save-excursion (goto-char (cdr texmathp-why)) (if (pos-visible-in-window-p) - (sit-for 1) + (sit-for blink-matching-delay) (message "Matches %s" (buffer-substring (point) (progn (end-of-line) (point)))))))) @@ -5158,7 +5165,16 @@ (insert "$"))) (t ;; Just somewhere in the text. - (insert "$"))) + (if TeX-math-close-single-dollar + (progn + (insert "$$") + (if blink-matching-paren + (progn + (backward-char 2) + (sit-for blink-matching-delay) + (forward-char)) + (backward-char))) + (insert "$")))) (TeX-math-input-method-off)) (defvar TeX-math-input-method-off-regexp _______________________________________________ auctex-diffs mailing list auctex-di...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-diffs