GNU bug report logs -
#37124
Lisp snippet for TeX-electric-math in manual
Previous Next
Reported by: Arash Esbati <arash <at> gnu.org>
Date: Tue, 20 Aug 2019 20:57:02 UTC
Severity: normal
Done: Arash Esbati <arash <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 23 Aug 2019 00:20:29 +0200
with message-id <86d0gwj102.fsf <at> gnu.org>
and subject line Re: bug#37124: Lisp snippet for TeX-electric-math in manual
has caused the debbugs.gnu.org bug report #37124,
regarding Lisp snippet for TeX-electric-math in manual
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
37124: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37124
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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
[Message part 3 (message/rfc822, inline)]
Mosè Giordano <mose <at> gnu.org> writes:
> On Tue, 20 Aug 2019 at 22:57, Arash Esbati <arash <at> gnu.org> wrote:
>>
>> 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.
>
> I think you're correct.
Hi Mosè,
thanks for your response. I've pushed the change. Closing this one.
Best, Arash
This bug report was last modified 5 years and 332 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.