[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106252: * admin/grammars/bovine-gram
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106252: * admin/grammars/bovine-grammar.el: Avoid using old-style backquotes. |
Date: |
Mon, 31 Oct 2011 09:00:32 +0800 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106252
author: David Engster <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Mon 2011-10-31 09:00:32 +0800
message:
* admin/grammars/bovine-grammar.el: Avoid using old-style backquotes.
modified:
admin/ChangeLog
admin/grammars/bovine-grammar.el
=== modified file 'admin/ChangeLog'
--- a/admin/ChangeLog 2011-10-28 15:03:13 +0000
+++ b/admin/ChangeLog 2011-10-31 01:00:32 +0000
@@ -1,3 +1,7 @@
+2011-10-31 David Engster <address@hidden>
+
+ * grammars/bovine-grammar.el: Avoid using old-style backquotes.
+
2011-10-28 Eli Zaretskii <address@hidden>
* nt/README-ftp-server: Mention UNICOWS.DLL as prerequisite for
=== modified file 'admin/grammars/bovine-grammar.el'
--- a/admin/grammars/bovine-grammar.el 2011-08-04 00:58:07 +0000
+++ b/admin/grammars/bovine-grammar.el 2011-10-31 01:00:32 +0000
@@ -109,6 +109,14 @@
;; Cache of macro definitions currently in use.
(defvar bovine--grammar-macros nil)
+;; Detect if we have an Emacs with newstyle unquotes allowed outside
+;; of backquote.
+;; This should probably be changed to a test to (= emacs-major-version 24)
+;; when it is released, but at the moment it might be possible that people
+;; are using an older snapshot.
+(defvar bovine--grammar-newstyle-unquote
+ (equal '(, test) (read ",test")))
+
(defun bovine-grammar-expand-form (form quotemode &optional inplace)
"Expand FORM into a new one suitable to the bovine parser.
FORM is a list in which we are substituting.
@@ -142,6 +150,17 @@
(while form
(setq first (car form)
form (cdr form))
+ ;; Hack for dealing with new reading of unquotes outside of
+ ;; backquote (introduced in rev. 102591 in emacs-bzr).
+ (when (and bovine--grammar-newstyle-unquote
+ (listp first)
+ (or (equal (car first) '\,)
+ (equal (car first) '\,@)))
+ (if (listp (cadr first))
+ (setq form (append (cdr first) form)
+ first (car first))
+ (setq first (intern (concat (symbol-name (car first))
+ (symbol-name (cadr first)))))))
(cond
((eq first nil)
(when (and (not inlist) (not inplace))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106252: * admin/grammars/bovine-grammar.el: Avoid using old-style backquotes.,
Chong Yidong <=