Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
72b8747b
Commit
72b8747b
authored
Oct 31, 2011
by
David Engster
Committed by
Chong Yidong
Oct 31, 2011
Browse files
* admin/grammars/bovine-grammar.el: Avoid using old-style backquotes.
parent
84bd6e9e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
admin/ChangeLog
admin/ChangeLog
+4
-0
admin/grammars/bovine-grammar.el
admin/grammars/bovine-grammar.el
+19
-0
No files found.
admin/ChangeLog
View file @
72b8747b
2011-10-31 David Engster <deng@randomsample.de>
* grammars/bovine-grammar.el: Avoid using old-style backquotes.
2011-10-28 Eli Zaretskii <eliz@gnu.org>
* nt/README-ftp-server: Mention UNICOWS.DLL as prerequisite for
...
...
admin/grammars/bovine-grammar.el
View file @
72b8747b
...
...
@@ -109,6 +109,14 @@ NAME, ALIASCLASS, DEFINITION and ATTRIBUTES."
;; 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 @@ expanded from elsewhere."
(
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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment