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
9778055f
Commit
9778055f
authored
Dec 03, 2010
by
Katsumi Yamaoka
Browse files
gnus-util.el (gnus-macroexpand-all): Allow optional argument `environment'.
parent
115e0ebf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
lisp/gnus/ChangeLog
lisp/gnus/ChangeLog
+2
-1
lisp/gnus/gnus-util.el
lisp/gnus/gnus-util.el
+5
-3
No files found.
lisp/gnus/ChangeLog
View file @
9778055f
2010-12-03 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-util.el (gnus-macroexpand-all): Don't modify argument.
* gnus-util.el (gnus-macroexpand-all): Don't modify argument;
allow optional argument `environment'.
2010-12-03 Glenn Morris <rgm@gnu.org>
...
...
lisp/gnus/gnus-util.el
View file @
9778055f
...
...
@@ -2036,9 +2036,11 @@ Same as `string-match' except this function does not change the match data."
(if (fboundp 'macroexpand-all)
(defalias 'gnus-macroexpand-all 'macroexpand-all)
(defun gnus-macroexpand-all (form)
(defun gnus-macroexpand-all (form
&optional environment
)
"
Return
result
of
expanding
macros
at
all
levels
in
FORM.
If
no
macros
are
expanded,
FORM
is
returned
unchanged.
"
If
no
macros
are
expanded,
FORM
is
returned
unchanged.
The
second
optional
arg
ENVIRONMENT
specifies
an
environment
of
macro
definitions
to
shadow
the
loaded
ones
for
use
in
file
byte-compilation.
"
(
if
(
consp
form
)
(
let
((
idx
1
)
(
len
(
length
(
setq
form
(
copy-sequence
form
))))
...
...
@@ -2046,7 +2048,7 @@ If no macros are expanded, FORM is returned unchanged."
(
while
(
<
idx
len
)
(
setcar
(
nthcdr
idx
form
)
(
gnus-macroexpand-all
(
nth
idx
form
)))
(
setq
idx
(
1+
idx
)))
(
if
(
eq
(
setq
expanded
(
macroexpand
form
))
form
)
(
if
(
eq
(
setq
expanded
(
macroexpand
form
environment
))
form
)
form
(
gnus-macroexpand-all
expanded
)))
form
)))
...
...
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