emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs-24.0.92 and backquote


From: Jambunathan K
Subject: Re: emacs-24.0.92 and backquote
Date: Sun, 11 Dec 2011 11:28:31 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (windows-nt)

Paul Eggert <address@hidden> 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).
>
>
>

-- 



reply via email to

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