[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use of lexical binding plus various other things
From: |
Arash Esbati |
Subject: |
Re: Use of lexical binding plus various other things |
Date: |
Mon, 29 Mar 2021 21:03:00 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> Many thanks for this. I ran `make' in tests directory and get the
>>> following error (re-arranged for legibility):
>> Thanks for the report. I don't experience such error, so I suppose that
>> emacs 28 enhanced check for scope discrepancy between lexical and
>> dynamic variables. (I'm using emacs 27)
>
> Indeed, the error he showed is new in Emacs-28 (whereas Emacs<28 instead
> silently does the wrong thing).
Thanks for the clarification. While we're at it, I saw you've also
activated lexical binding in RefTeX (Thanks!).
There is one line in reftex-auc.el which can be removed[1]:
(declare-function LaTeX-add-bibitems "latex") ;FIXME: Can't find the
definition
`LaTeX-add-bibitems' is created by this line in latex.el[2]:
(TeX-auto-add-type "bibitem" "LaTeX")
I suggest to apply the following change to reftex-auc.el. The declared
functions are defined in ext:latex and not ext:tex; and the name of
arguments are also corrected. I don't have access to emacs repo, do you
mind install the change?
--8<---------------cut here---------------start------------->8---
diff --git a/lisp/textmodes/reftex-auc.el b/lisp/textmodes/reftex-auc.el
index 8429fce625..977da700fd 100644
--- a/lisp/textmodes/reftex-auc.el
+++ b/lisp/textmodes/reftex-auc.el
@@ -32,11 +32,12 @@
(optional prompt default &optional complete))
(declare-function TeX-argument-insert "ext:tex"
(name optional &optional prefix))
-(declare-function LaTeX-add-labels "ext:tex" (&rest entries) t)
-(declare-function LaTeX-add-index-entries "ext:tex" (&rest entries) t)
-(declare-function LaTeX-bibitem-list "ext:tex" () t)
-(declare-function LaTeX-index-entry-list "ext:tex" () t)
-(declare-function LaTeX-label-list "ext:tex" () t)
+(declare-function LaTeX-add-labels "ext:latex" (&rest labels) t)
+(declare-function LaTeX-add-index-entries "ext:latex" (&rest index-entries) t)
+(declare-function LaTeX-add-bibitems "ext:latex" (&rest bibitems) t)
+(declare-function LaTeX-bibitem-list "ext:latex" () t)
+(declare-function LaTeX-index-entry-list "ext:latex" () t)
+(declare-function LaTeX-label-list "ext:latex" () t)
(declare-function multi-prompt "ext:multi-prompt"
(separator unique prompt table &optional
mp-predicate require-match initial history))
@@ -69,8 +70,6 @@ reftex-arg-label
(LaTeX-add-labels label))
(TeX-argument-insert label optional)))
-(declare-function LaTeX-add-bibitems "latex") ;FIXME: Can't find the definition
-
;;;###autoload
(defun reftex-arg-cite (optional &optional prompt definition)
"Use `reftex-citation' or AUCTeX's code to insert a cite-key macro argument.
@@ -88,7 +87,6 @@ reftex-arg-cite
(TeX-argument-insert (mapconcat #'identity items reftex-cite-key-separator)
optional)))
-
;;;###autoload
(defun reftex-arg-index-tag (optional &optional prompt &rest _args)
"Prompt for an index tag with completion.
--8<---------------cut here---------------end--------------->8---
TIA. Best, Arash
reftex-auc.diff
Description: Text Data
Footnotes:
[1]
http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/textmodes/reftex-auc.el#n72
[2] http://git.savannah.gnu.org/cgit/auctex.git/tree/latex.el#n1612
- Re: Use of lexical binding plus various other things, (continued)
- Re: Use of lexical binding plus various other things, Stefan Monnier, 2021/03/23
- Re: Use of lexical binding plus various other things, Ikumi Keita, 2021/03/23
- Re: Use of lexical binding plus various other things, Stefan Monnier, 2021/03/23
- Re: Use of lexical binding plus various other things, Stefan Monnier, 2021/03/23
- Re: Use of lexical binding plus various other things, Ikumi Keita, 2021/03/24
- Re: Use of lexical binding plus various other things, Ikumi Keita, 2021/03/24
- Re: Use of lexical binding plus various other things, Stefan Monnier, 2021/03/24
- Re: Use of lexical binding plus various other things, Arash Esbati, 2021/03/29
- Re: Use of lexical binding plus various other things, Ikumi Keita, 2021/03/29
- Re: Use of lexical binding plus various other things, Stefan Monnier, 2021/03/29
- Re: Use of lexical binding plus various other things,
Arash Esbati <=
- Re: Use of lexical binding plus various other things, Stefan Monnier, 2021/03/29
- Re: Use of lexical binding plus various other things, Arash Esbati, 2021/03/30