bug-auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37124: Lisp snippet for TeX-electric-math in manual


From: Arash Esbati
Subject: bug#37124: Lisp snippet for TeX-electric-math in manual
Date: Tue, 20 Aug 2019 22:53:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50

Hi all,

there is a lisp snippet in the manual for `TeX-electric-math'[1]:

    (add-hook 'plain-TeX-mode-hook
              (lambda () (set (make-variable-buffer-local 'TeX-electric-math)
                              (cons "$" "$"))))
    (add-hook 'LaTeX-mode-hook
              (lambda () (set (make-variable-buffer-local 'TeX-electric-math)
                              (cons "\\(" "\\)"))))

`make-variable-buffer-local' seems wrong to me, I think
`make-local-variable' is the intended function.  Am I missing something?
Otherwise I'd install the following patch:

--8<---------------cut here---------------start------------->8---
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 693fdf6b..cb257572 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -459,10 +459,10 @@ and @samp{\(...\)} in @LaTeX{} files by pressing @kbd{$}, 
add the
 following to your init file
 @lisp
 (add-hook 'plain-TeX-mode-hook
-         (lambda () (set (make-variable-buffer-local 'TeX-electric-math)
+         (lambda () (set (make-local-variable 'TeX-electric-math)
                          (cons "$" "$"))))
 (add-hook 'LaTeX-mode-hook
-         (lambda () (set (make-variable-buffer-local 'TeX-electric-math)
+         (lambda () (set (make-local-variable 'TeX-electric-math)
                          (cons "\\(" "\\)"))))
 @end lisp
--8<---------------cut here---------------end--------------->8---

Best, Arash

Footnotes:
[1]  
https://www.gnu.org/software/auctex/manual/auctex.html#index-TeX_002delectric_002dmath






reply via email to

[Prev in Thread] Current Thread [Next in Thread]