Subject: bug#6490: 24.0.50; src/lread.c: old style backquote bug?

From: Tetsurou Okazaki <[email-masked]>
Date: Tue, 22 Jun 2010 18:16:56 +0900

The latest Bazaar version of Emacs fails to build APEL
[http://www.kanji.zinbun.kyoto-u.ac.jp/~tomo/elisp/APEL/index.en.html]
with the following message:

  % cvs -z9 -d :pserver:[email-masked]:/cvs/root checkout apel
  % cd apel
  % make

    emacs -batch -q -no-site-file -l APEL-MK -f compile-apel \
		  NONE NONE NONE
  Loading /home/tetsurou/Checkout/cvs.m17n.org/apel/APEL-CFG...
  Loading `product': old-style backquotes detected!
  Invalid function: (progn (\, product-def) (put (\, feature) (quote product) (let ((product (product-find-by-name (\, product-name)))) (product-run-checkers product (quote (\, product-version))) (and (\, product-family) (product-add-to-family (\, product-family) (\, product-name))) (product-add-feature product (\, feature)) (if (equal (quote (\, product-version)) (product-version product)) product (vector (\, product-name) (\, product-family) (quote (\, product-version)) (\, product-code-name) nil nil nil (\, product-version-string))))) (\, feature-def))
  make: *** [elc] Error 255

Attached patch for Emacs fixes this error.

In GNU Emacs 24.0.50.1 (i686-pc-cygwin, X toolkit, Xaw3d scroll bars)
 of 2010-06-18 on zeroset
configured using `configure  '--without-dbus' '--with-x-toolkit=athena''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: C
  value of $LANG: ja_JP.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  global-semanticdb-minor-mode: t
  global-semantic-idle-scheduler-mode: t
  semantic-mode: t
  global-ede-mode: t
  display-time-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
ESC x r e p o r TAB RET

Recent messages:
("emacs")
Loading term/xterm...done
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/usr/local/share/emacs/site-lisp/flim/sha1 hides /usr/local/share/emacs/24.0.50/lisp/sha1
/usr/local/share/emacs/site-lisp/semi/pgg hides /usr/local/share/emacs/24.0.50/lisp/pgg
/usr/local/share/emacs/site-lisp/semi/pgg-pgp5 hides /usr/local/share/emacs/24.0.50/lisp/pgg-pgp5
/usr/local/share/emacs/site-lisp/semi/pgg-pgp hides /usr/local/share/emacs/24.0.50/lisp/pgg-pgp
/usr/local/share/emacs/site-lisp/semi/pgg-parse hides /usr/local/share/emacs/24.0.50/lisp/pgg-parse
/usr/local/share/emacs/site-lisp/semi/pgg-gpg hides /usr/local/share/emacs/24.0.50/lisp/pgg-gpg
/usr/local/share/emacs/site-lisp/semi/pgg-def hides /usr/local/share/emacs/24.0.50/lisp/pgg-def
/usr/local/share/emacs/site-lisp/flim/md4 hides /usr/local/share/emacs/24.0.50/lisp/md4
/usr/local/share/emacs/site-lisp/flim/hex-util hides /usr/local/share/emacs/24.0.50/lisp/hex-util
/usr/local/share/emacs/site-lisp/bitmap/po hides /usr/local/share/emacs/24.0.50/lisp/textmodes/po
/usr/local/share/emacs/site-lisp/flim/sasl hides /usr/local/share/emacs/24.0.50/lisp/net/sasl
/usr/local/share/emacs/site-lisp/flim/sasl-ntlm hides /usr/local/share/emacs/24.0.50/lisp/net/sasl-ntlm
/usr/local/share/emacs/site-lisp/flim/sasl-digest hides /usr/local/share/emacs/24.0.50/lisp/net/sasl-digest
/usr/local/share/emacs/site-lisp/flim/sasl-cram hides /usr/local/share/emacs/24.0.50/lisp/net/sasl-cram
/usr/local/share/emacs/site-lisp/flim/ntlm hides /usr/local/share/emacs/24.0.50/lisp/net/ntlm
/usr/local/share/emacs/site-lisp/flim/hmac-md5 hides /usr/local/share/emacs/24.0.50/lisp/net/hmac-md5
/usr/local/share/emacs/site-lisp/flim/hmac-def hides /usr/local/share/emacs/24.0.50/lisp/net/hmac-def
/usr/local/share/emacs/site-lisp/wl/rfc2368 hides /usr/local/share/emacs/24.0.50/lisp/mail/rfc2368
/usr/local/share/emacs/site-lisp/wl/utf7 hides /usr/local/share/emacs/24.0.50/lisp/gnus/utf7
/usr/local/share/emacs/site-lisp/semi/smime hides /usr/local/share/emacs/24.0.50/lisp/gnus/smime

Features:
(shadow sort gnus-util mail-extr message sendmail regexp-opt rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug package mime-w3m warnings advice help-fns advice-preload
w3m-load semantic/db-mode semantic/db semantic/idle semantic/format
semantic/tag-ls semantic/ctxt semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local ede/linux ede/emacs
ede/cpp-root ede/speedbar ede/files ede ede/source eieio-base
eieio-speedbar speedbar sb-image ezimage dframe easymenu assoc
eieio-custom wid-edit eieio byte-opt bytecomp byte-compile cedet
generic-x time japan-util tooltip ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register
page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dynamic-setting system-font-setting
font-render-setting x-toolkit x multi-tty emacs)

=== modified file 'src/lread.c'
--- src/lread.c	2010-06-16 14:10:02 +0000
+++ src/lread.c	2010-06-22 07:48:58 +0000
@@ -2693,21 +2693,26 @@
 	 old-style.  For Emacs-25, we should completely remove this
 	 first_in_list exception (old-style can still be obtained via
 	 "(\`" anyway).  */
-      if (first_in_list && (c = READCHAR, UNREAD (c), c == ' '))
-	{
-	  Vold_style_backquotes = Qt;
-	  goto default_label;
-	}
-      else
-	{
-	  Lisp_Object value;
-
-	  new_backquote_flag++;
-	  value = read0 (readcharfun);
-	  new_backquote_flag--;
-
-	  return Fcons (Qbackquote, Fcons (value, Qnil));
-	}
+      {
+        int next_char = READCHAR;
+        UNREAD (next_char);
+
+	if (first_in_list && next_char == ' ')
+	  {
+	    Vold_style_backquotes = Qt;
+	    goto default_label;
+	  }
+	else
+	  {
+	    Lisp_Object value;
+
+	    new_backquote_flag++;
+	    value = read0 (readcharfun);
+	    new_backquote_flag--;
+
+	    return Fcons (Qbackquote, Fcons (value, Qnil));
+	  }
+      }
 
     case ',':
       if (new_backquote_flag)