summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/cl-macs.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-08-21 04:54:03 +0000
committerMiles Bader <miles@gnu.org>2007-08-21 04:54:03 +0000
commit42216a6b65dabb543156bc5e52cbf89d8ce96cb9 (patch)
tree1036c82a751bd2437cbc1b1d7f047bf3af679234 /lisp/emacs-lisp/cl-macs.el
parenteb5149ee586e6df9d919497688db0643c245386c (diff)
parentbdaf8a62d53cf8d5a0dc4f0dc530ecd6fc1f44fe (diff)
downloademacs-42216a6b65dabb543156bc5e52cbf89d8ce96cb9.tar.gz
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 852-856) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 93-96) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 245) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-249
Diffstat (limited to 'lisp/emacs-lisp/cl-macs.el')
-rw-r--r--lisp/emacs-lisp/cl-macs.el22
1 files changed, 13 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index ab87fd53361..8b55dd4a379 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -272,15 +272,19 @@ its argument list allows full Common Lisp conventions."
(nconc (nreverse simple-args)
(list '&rest (car (pop bind-lets))))
(nconc (let ((hdr (nreverse header)))
- (require 'help-fns)
- (cons (help-add-fundoc-usage
- (if (stringp (car hdr)) (pop hdr))
- ;; orig-args can contain &cl-defs (an internal CL
- ;; thingy that I do not understand), so remove it.
- (let ((x (memq '&cl-defs orig-args)))
- (if (null x) orig-args
- (delq (car x) (remq (cadr x) orig-args)))))
- hdr))
+ ;; Macro expansion can take place in the middle of
+ ;; apparently harmless computation, so it should not
+ ;; touch the match-data.
+ (save-match-data
+ (require 'help-fns)
+ (cons (help-add-fundoc-usage
+ (if (stringp (car hdr)) (pop hdr))
+ ;; orig-args can contain &cl-defs (an internal
+ ;; CL thingy I don't understand), so remove it.
+ (let ((x (memq '&cl-defs orig-args)))
+ (if (null x) orig-args
+ (delq (car x) (remq (cadr x) orig-args)))))
+ hdr)))
(list (nconc (list 'let* bind-lets)
(nreverse bind-forms) body)))))))