GNU bug report logs - #37124
Lisp snippet for TeX-electric-math in manual

Previous Next

Package: auctex;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37124 in the body.
You can then email your comments to 37124 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-auctex <at> gnu.org:
bug#37124; Package auctex. (Tue, 20 Aug 2019 20:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arash Esbati <arash <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-auctex <at> gnu.org. (Tue, 20 Aug 2019 20:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: auctex-bugs <bug-auctex <at> gnu.org>
Subject: Lisp snippet for TeX-electric-math in manual
Date: Tue, 20 Aug 2019 22:53:11 +0200
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





Information forwarded to bug-auctex <at> gnu.org:
bug#37124; Package auctex. (Wed, 21 Aug 2019 09:00:02 GMT) Full text and rfc822 format available.

Message #8 received at 37124 <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Arash Esbati <arash <at> gnu.org>
Cc: 37124 <at> debbugs.gnu.org
Subject: Re: bug#37124: Lisp snippet for TeX-electric-math in manual
Date: Wed, 21 Aug 2019 10:59:03 +0200
Hi Arash,

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.

Bye,
Mosè




Reply sent to Arash Esbati <arash <at> gnu.org>:
You have taken responsibility. (Thu, 22 Aug 2019 22:33:01 GMT) Full text and rfc822 format available.

Notification sent to Arash Esbati <arash <at> gnu.org>:
bug acknowledged by developer. (Thu, 22 Aug 2019 22:33:02 GMT) Full text and rfc822 format available.

Message #13 received at 37124-done <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Mosè Giordano <mose <at> gnu.org>
Cc: 37124-done <at> debbugs.gnu.org
Subject: Re: bug#37124: Lisp snippet for TeX-electric-math in manual
Date: Fri, 23 Aug 2019 00:20:29 +0200
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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 20 Sep 2019 11:24:06 GMT) Full text and rfc822 format available.

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.