diff options
| author | Alan Mackenzie | 2011-11-03 22:03:18 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2011-11-03 22:03:18 +0000 |
| commit | 85ba4cded3ef5a834c880edfdb6cf7ec3a747e9b (patch) | |
| tree | 2a207d6e9e906119087ad357c892414db01211cb /admin | |
| parent | a6ba2ab9277496b66f6939766a3470c1f0a84287 (diff) | |
| parent | 14e1d9eab9f4b7341f92397a0a9a2706f7b26ee9 (diff) | |
| download | emacs-85ba4cded3ef5a834c880edfdb6cf7ec3a747e9b.tar.gz emacs-85ba4cded3ef5a834c880edfdb6cf7ec3a747e9b.zip | |
Merge.
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/ChangeLog | 4 | ||||
| -rw-r--r-- | admin/grammars/bovine-grammar.el | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog index 7c2f1a743b2..f91d53194ce 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-10-31 David Engster <deng@randomsample.de> | ||
| 2 | |||
| 3 | * grammars/bovine-grammar.el: Avoid using old-style backquotes. | ||
| 4 | |||
| 1 | 2011-10-28 Eli Zaretskii <eliz@gnu.org> | 5 | 2011-10-28 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * nt/README-ftp-server: Mention UNICOWS.DLL as prerequisite for | 7 | * nt/README-ftp-server: Mention UNICOWS.DLL as prerequisite for |
diff --git a/admin/grammars/bovine-grammar.el b/admin/grammars/bovine-grammar.el index 5a948608671..0e8756e1c5b 100644 --- a/admin/grammars/bovine-grammar.el +++ b/admin/grammars/bovine-grammar.el | |||
| @@ -109,6 +109,14 @@ NAME, ALIASCLASS, DEFINITION and ATTRIBUTES." | |||
| 109 | ;; Cache of macro definitions currently in use. | 109 | ;; Cache of macro definitions currently in use. |
| 110 | (defvar bovine--grammar-macros nil) | 110 | (defvar bovine--grammar-macros nil) |
| 111 | 111 | ||
| 112 | ;; Detect if we have an Emacs with newstyle unquotes allowed outside | ||
| 113 | ;; of backquote. | ||
| 114 | ;; This should probably be changed to a test to (= emacs-major-version 24) | ||
| 115 | ;; when it is released, but at the moment it might be possible that people | ||
| 116 | ;; are using an older snapshot. | ||
| 117 | (defvar bovine--grammar-newstyle-unquote | ||
| 118 | (equal '(, test) (read ",test"))) | ||
| 119 | |||
| 112 | (defun bovine-grammar-expand-form (form quotemode &optional inplace) | 120 | (defun bovine-grammar-expand-form (form quotemode &optional inplace) |
| 113 | "Expand FORM into a new one suitable to the bovine parser. | 121 | "Expand FORM into a new one suitable to the bovine parser. |
| 114 | FORM is a list in which we are substituting. | 122 | FORM is a list in which we are substituting. |
| @@ -142,6 +150,17 @@ expanded from elsewhere." | |||
| 142 | (while form | 150 | (while form |
| 143 | (setq first (car form) | 151 | (setq first (car form) |
| 144 | form (cdr form)) | 152 | form (cdr form)) |
| 153 | ;; Hack for dealing with new reading of unquotes outside of | ||
| 154 | ;; backquote (introduced in rev. 102591 in emacs-bzr). | ||
| 155 | (when (and bovine--grammar-newstyle-unquote | ||
| 156 | (listp first) | ||
| 157 | (or (equal (car first) '\,) | ||
| 158 | (equal (car first) '\,@))) | ||
| 159 | (if (listp (cadr first)) | ||
| 160 | (setq form (append (cdr first) form) | ||
| 161 | first (car first)) | ||
| 162 | (setq first (intern (concat (symbol-name (car first)) | ||
| 163 | (symbol-name (cadr first))))))) | ||
| 145 | (cond | 164 | (cond |
| 146 | ((eq first nil) | 165 | ((eq first nil) |
| 147 | (when (and (not inlist) (not inplace)) | 166 | (when (and (not inlist) (not inplace)) |