* emacs-24.0.92 and backquote @ 2011-12-11 0:00 Nelson H. F. Beebe 2011-12-11 2:20 ` Paul Eggert 0 siblings, 1 reply; 5+ messages in thread From: Nelson H. F. Beebe @ 2011-12-11 0:00 UTC (permalink / raw) To: emacs-devel; +Cc: beebe In testing emacs-24.0.92, I discovered that some venerable code that has worked from Fall 1994 through emacs-23.* versions now fails to load in emacs-24.0.92. I get this error: Loading /u/sy/beebe/emacs/ltxmenu.el (source)... setq: Invalid function: (\` ("LaTeX main menu" ((\, internal-x-LaTeX-menu-startup)) ((\, internal-x-LaTeX-menu-accents)) ((\, internal-x-LaTeX-menu-insertion)) ((\, internal-x-LaTeX-menu-begin-end)) ((\, internal-x-LaTeX-menu-begin-end-1)) ((\, internal-x-LaTeX-menu-begin-end-2)) ((\, internal-x-LaTeX-menu-begin-end-3)) ((\, internal-x-LaTeX-menu-begin-end-4)) ((\, internal-x-LaTeX-menu-checking)) ...)) The code in ltxmenu.el (available at http://www.math.utah.edu/pub/emacs/ltxmenu.el ) has this function: (setq internal-x-LaTeX-menu-of-menus (`("LaTeX main menu" ;this menu title is never displayed (, internal-x-LaTeX-menu-startup) (, internal-x-LaTeX-menu-accents) ... (, internal-x-LaTeX-menu-miscellaneous) ))) I dug around in the emacs-24 source code, and in lread.c, found the function load_warn_old_style_backquotes(). However, I cannot find any indication in ChangeLog files or the *.texi files that the syntax of backquote has changed, so I don't know what ``old-style backquotes'' is supposed to mean. As new versions of emacs have appeared, it has been rare to require modification of my existing Emacs Lisp code (70K lines or so). Can any of you offer suggestions as to what is expected here, or have I possibly exposed a bug in the new emacs-24 code? Our university's winter term break begins next week, and that is usually the time that we make newer versions of software and hardware the default ones, so I would like to get this resolved soon. ------------------------------------------------------------------------------- - Nelson H. F. Beebe Tel: +1 801 581 5254 - - University of Utah FAX: +1 801 581 4148 - - Department of Mathematics, 110 LCB Internet e-mail: beebe@math.utah.edu - - 155 S 1400 E RM 233 beebe@acm.org beebe@computer.org - - Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ - ------------------------------------------------------------------------------- ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacs-24.0.92 and backquote 2011-12-11 0:00 emacs-24.0.92 and backquote Nelson H. F. Beebe @ 2011-12-11 2:20 ` Paul Eggert 2011-12-11 5:58 ` Jambunathan K 0 siblings, 1 reply; 5+ messages in thread From: Paul Eggert @ 2011-12-11 2:20 UTC (permalink / raw) To: Nelson H. F. Beebe; +Cc: emacs-devel On 12/10/11 16:00, Nelson H. F. Beebe wrote: > Can any of you offer suggestions as to what is expected here, or have > I possibly exposed a bug in the new emacs-24 code? In Emacs Lisp one used to write (` EXPR) rather than `EXPR. The latter is the normal style in other Lisps, and was adopted by Emacs as the "new-style backquotes" around Emacs 20, but the old style was still supported for a while (and still is, to some extent). Bug#6490 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6490> contains more info about this. Old-style backquotes apparently stopped working to some extent in Emacs 20 and were marked officially obsolete in Emacs 22.1, and are scheduled to be removed in Emacs 25. The info about the old syntax was removed from the documentation in March 2009 in bzr 95128 <http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/95128>. Emacs 24 still accepts this old syntax, so perhaps it should still be documented? Here's the text that was removed: In old Emacs versions, before version 19.29, @samp{`} used a different syntax which required an extra level of parentheses around the entire backquote construct. Likewise, each @samp{,} or @samp{,@@} substitution required an extra level of parentheses surrounding both the @samp{,} or @samp{,@@} and the following expression. The old syntax required whitespace between the @samp{`}, @samp{,} or @samp{,@@} and the following expression. This syntax is still accepted, for compatibility with old Emacs versions, but support for it will be removed in the future. Anyway, to get back to your example, it uses the syntax (`(EXPR)) that was formerly invalid, but was silently accepted as if it were the old-style (` (EXPR)), i.e., the new-style `(EXPR). I think support for this invalid usage was removed around bzr 100605 <http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/100605>, dated June of this year, and that's what is causing your problem. The simplest fix for your example is to change it to use the old syntax: --- ltxmenu.el 2004-07-28 16:58:31.000000000 -0700 +++ ltxmenu-fix.el 2011-12-10 18:16:56.652363670 -0800 @@ -533,7 +533,7 @@ ;;; of its components have been defined above. (setq internal-x-LaTeX-menu-of-menus - (`("LaTeX main menu" ;this menu title is never displayed + (` ("LaTeX main menu" ;this menu title is never displayed (, internal-x-LaTeX-menu-startup) (, internal-x-LaTeX-menu-accents) (, internal-x-LaTeX-menu-insertion) But that will stop working in Emacs 25. Instead, I'd change to the new syntax: --- ltxmenu.el 2004-07-28 16:58:31.000000000 -0700 +++ ltxmenu-fix.el 2011-12-10 18:18:28.883204171 -0800 @@ -533,22 +533,22 @@ ;;; of its components have been defined above. (setq internal-x-LaTeX-menu-of-menus - (`("LaTeX main menu" ;this menu title is never displayed - (, internal-x-LaTeX-menu-startup) - (, internal-x-LaTeX-menu-accents) - (, internal-x-LaTeX-menu-insertion) - (, internal-x-LaTeX-menu-begin-end) - (, internal-x-LaTeX-menu-begin-end-1) - (, internal-x-LaTeX-menu-begin-end-2) - (, internal-x-LaTeX-menu-begin-end-3) - (, internal-x-LaTeX-menu-begin-end-4) - (, internal-x-LaTeX-menu-checking) - (, internal-x-LaTeX-menu-comment) - (, internal-x-LaTeX-menu-cross-reference) - (, internal-x-LaTeX-menu-font) - (, internal-x-LaTeX-menu-index) - (, internal-x-LaTeX-menu-miscellaneous) - ))) + `("LaTeX main menu" ;this menu title is never displayed + ,internal-x-LaTeX-menu-startup + ,internal-x-LaTeX-menu-accents + ,internal-x-LaTeX-menu-insertion + ,internal-x-LaTeX-menu-begin-end + ,internal-x-LaTeX-menu-begin-end-1 + ,internal-x-LaTeX-menu-begin-end-2 + ,internal-x-LaTeX-menu-begin-end-3 + ,internal-x-LaTeX-menu-begin-end-4 + ,internal-x-LaTeX-menu-checking + ,internal-x-LaTeX-menu-comment + ,internal-x-LaTeX-menu-cross-reference + ,internal-x-LaTeX-menu-font + ,internal-x-LaTeX-menu-index + ,internal-x-LaTeX-menu-miscellaneous + )) ;;; NB: All internal-x-LaTeX-xxx commands that are called from the ;;; menus MUST call (interactive) (so commandp is true). ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacs-24.0.92 and backquote 2011-12-11 2:20 ` Paul Eggert @ 2011-12-11 5:58 ` Jambunathan K 0 siblings, 0 replies; 5+ messages in thread From: Jambunathan K @ 2011-12-11 5:58 UTC (permalink / raw) To: Paul Eggert; +Cc: Nelson H. F. Beebe, emacs-devel Paul Eggert <eggert@cs.ucla.edu> writes: > On 12/10/11 16:00, Nelson H. F. Beebe wrote: >> Can any of you offer suggestions as to what is expected here, or have >> I possibly exposed a bug in the new emacs-24 code? > > In Emacs Lisp one used to write (` EXPR) rather than `EXPR. The > latter is the normal style in other Lisps, and was adopted by Emacs as > the "new-style backquotes" around Emacs 20, but the old style was > still supported for a while (and still is, to some extent). > Bug#6490 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6490> contains > more info about this. Old-style backquotes apparently stopped working > to some extent in Emacs 20 and were marked officially obsolete in > Emacs 22.1, and are scheduled to be removed in Emacs 25. > > The info about the old syntax was removed from the documentation in > March 2009 in bzr 95128 > <http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/95128>. > Emacs 24 still accepts this old syntax, so perhaps it should still be > documented? Here's the text that was removed: > > In old Emacs versions, before version 19.29, @samp{`} used a > different syntax which required an extra level of parentheses > around the entire backquote construct. Likewise, each @samp{,} or > @samp{,@@} substitution required an extra level of parentheses > surrounding both the @samp{,} or @samp{,@@} and the following > expression. The old syntax required whitespace between the > @samp{`}, @samp{,} or @samp{,@@} and the following expression. > > This syntax is still accepted, for compatibility with old Emacs > versions, but support for it will be removed in the future. > > > Anyway, to get back to your example, it uses the syntax (`(EXPR)) that > was formerly invalid, but was silently accepted as if it were the > old-style (` (EXPR)), i.e., the new-style `(EXPR). I think support > for this invalid usage was removed around bzr 100605 > <http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/100605>, dated > June of this year, and that's what is causing your problem. The NEWS has the following entry: ,---- Incompatible Lisp Changes in Emacs 24.1 | ** A backquote not followed by a space is now always treated as new-style. `---- Wondering what a "new-style" means! > The simplest fix for your example is to change it to use the old syntax: > > --- ltxmenu.el 2004-07-28 16:58:31.000000000 -0700 > +++ ltxmenu-fix.el 2011-12-10 18:16:56.652363670 -0800 > @@ -533,7 +533,7 @@ > ;;; of its components have been defined above. > > (setq internal-x-LaTeX-menu-of-menus > - (`("LaTeX main menu" ;this menu title is never displayed > + (` ("LaTeX main menu" ;this menu title is never displayed > (, internal-x-LaTeX-menu-startup) > (, internal-x-LaTeX-menu-accents) > (, internal-x-LaTeX-menu-insertion) > > But that will stop working in Emacs 25. > Instead, I'd change to the new syntax: > > --- ltxmenu.el 2004-07-28 16:58:31.000000000 -0700 > +++ ltxmenu-fix.el 2011-12-10 18:18:28.883204171 -0800 > @@ -533,22 +533,22 @@ > ;;; of its components have been defined above. > > (setq internal-x-LaTeX-menu-of-menus > - (`("LaTeX main menu" ;this menu title is never displayed > - (, internal-x-LaTeX-menu-startup) > - (, internal-x-LaTeX-menu-accents) > - (, internal-x-LaTeX-menu-insertion) > - (, internal-x-LaTeX-menu-begin-end) > - (, internal-x-LaTeX-menu-begin-end-1) > - (, internal-x-LaTeX-menu-begin-end-2) > - (, internal-x-LaTeX-menu-begin-end-3) > - (, internal-x-LaTeX-menu-begin-end-4) > - (, internal-x-LaTeX-menu-checking) > - (, internal-x-LaTeX-menu-comment) > - (, internal-x-LaTeX-menu-cross-reference) > - (, internal-x-LaTeX-menu-font) > - (, internal-x-LaTeX-menu-index) > - (, internal-x-LaTeX-menu-miscellaneous) > - ))) > + `("LaTeX main menu" ;this menu title is never displayed > + ,internal-x-LaTeX-menu-startup > + ,internal-x-LaTeX-menu-accents > + ,internal-x-LaTeX-menu-insertion > + ,internal-x-LaTeX-menu-begin-end > + ,internal-x-LaTeX-menu-begin-end-1 > + ,internal-x-LaTeX-menu-begin-end-2 > + ,internal-x-LaTeX-menu-begin-end-3 > + ,internal-x-LaTeX-menu-begin-end-4 > + ,internal-x-LaTeX-menu-checking > + ,internal-x-LaTeX-menu-comment > + ,internal-x-LaTeX-menu-cross-reference > + ,internal-x-LaTeX-menu-font > + ,internal-x-LaTeX-menu-index > + ,internal-x-LaTeX-menu-miscellaneous > + )) > > ;;; NB: All internal-x-LaTeX-xxx commands that are called from the > ;;; menus MUST call (interactive) (so commandp is true). > > > -- ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacs-24.0.92 and backquote @ 2011-12-13 2:05 Nelson H. F. Beebe 2011-12-13 3:32 ` Stefan Monnier 0 siblings, 1 reply; 5+ messages in thread From: Nelson H. F. Beebe @ 2011-12-13 2:05 UTC (permalink / raw) To: emacs-devel; +Cc: beebe Many thanks to Paul Eggert for the fine detective work in tracing the gradual disappearance of the `old-style backquote' and its reappearance in a `new-style backquote' form with one level of outer parentheses stripped in the evolution of emacs-20 to emacs-24. I've spent part of today revising ltxmenu.el, and moved the old and new versions of the backquoted menu definition into separate files that are loaded according to the value of emacs-version, so as not to break the code on any currently-installed version of emacs (I have many such, on more than two dozen flavors of Unix). The new files are available here: http://www.math.utah.edu/pub/emacs/ltxaccnt.el http://www.math.utah.edu/pub/emacs/ltxmenu.el http://www.math.utah.edu/pub/emacs/ltxmenu-23.el http://www.math.utah.edu/pub/emacs/ltxmenu-24.el There are corresponding .sig files for each, as well as signed checksum files for the entire directory. ------------------------------------------------------------------------------- - Nelson H. F. Beebe Tel: +1 801 581 5254 - - University of Utah FAX: +1 801 581 4148 - - Department of Mathematics, 110 LCB Internet e-mail: beebe@math.utah.edu - - 155 S 1400 E RM 233 beebe@acm.org beebe@computer.org - - Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ - ------------------------------------------------------------------------------- ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacs-24.0.92 and backquote 2011-12-13 2:05 Nelson H. F. Beebe @ 2011-12-13 3:32 ` Stefan Monnier 0 siblings, 0 replies; 5+ messages in thread From: Stefan Monnier @ 2011-12-13 3:32 UTC (permalink / raw) To: Nelson H. F. Beebe; +Cc: emacs-devel > I've spent part of today revising ltxmenu.el, and moved the old and > new versions of the backquoted menu definition into separate files > that are loaded according to the value of emacs-version, so as not to > break the code on any currently-installed version of emacs (I have > many such, on more than two dozen flavors of Unix). The "new"-style works at least since Emacs-19.34 (the oldest version I have here installed), so I have a hard time imagining you have an Emacs around that's still running and yet doesn't support the "new"-style of backquotes. Stefan ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-12-13 3:32 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-12-11 0:00 emacs-24.0.92 and backquote Nelson H. F. Beebe 2011-12-11 2:20 ` Paul Eggert 2011-12-11 5:58 ` Jambunathan K -- strict thread matches above, loose matches on Subject: below -- 2011-12-13 2:05 Nelson H. F. Beebe 2011-12-13 3:32 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).