aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2007-08-16 04:24:57 +0000
committerStefan Monnier2007-08-16 04:24:57 +0000
commit4d78a860b9ee2b830d6b9fc67e55c83d516df0c4 (patch)
tree55829fdfb225e8056aeeaa926c78e910fed30c25
parent596047b3e7e70e0c71ef1d206fa951b45b32e05d (diff)
downloademacs-4d78a860b9ee2b830d6b9fc67e55c83d516df0c4.tar.gz
emacs-4d78a860b9ee2b830d6b9fc67e55c83d516df0c4.zip
(cl-transform-lambda): Preserve the match-data.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/emacs-lisp/cl-macs.el22
2 files changed, 17 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 067a6291c3e..16edb115181 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12007-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emacs-lisp/cl-macs.el (cl-transform-lambda): Preserve the match-data.
4
12007-08-16 Glenn Morris <rgm@gnu.org> 52007-08-16 Glenn Morris <rgm@gnu.org>
2 6
3 * ps-print.el (ps-font-size): Doc fix. 7 * ps-print.el (ps-font-size): Doc fix.
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 5a79a6424e0..e4a84e44e64 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -266,15 +266,19 @@ its argument list allows full Common Lisp conventions."
266 (nconc (nreverse simple-args) 266 (nconc (nreverse simple-args)
267 (list '&rest (car (pop bind-lets)))) 267 (list '&rest (car (pop bind-lets))))
268 (nconc (let ((hdr (nreverse header))) 268 (nconc (let ((hdr (nreverse header)))
269 (require 'help-fns) 269 ;; Macro expansion can take place in the middle of
270 (cons (help-add-fundoc-usage 270 ;; apparently harmless computation, so it should not
271 (if (stringp (car hdr)) (pop hdr)) 271 ;; touch the match-data.
272 ;; orig-args can contain &cl-defs (an internal CL 272 (save-match-data
273 ;; thingy that I do not understand), so remove it. 273 (require 'help-fns)
274 (let ((x (memq '&cl-defs orig-args))) 274 (cons (help-add-fundoc-usage
275 (if (null x) orig-args 275 (if (stringp (car hdr)) (pop hdr))
276 (delq (car x) (remq (cadr x) orig-args))))) 276 ;; orig-args can contain &cl-defs (an internal
277 hdr)) 277 ;; CL thingy I don't understand), so remove it.
278 (let ((x (memq '&cl-defs orig-args)))
279 (if (null x) orig-args
280 (delq (car x) (remq (cadr x) orig-args)))))
281 hdr)))
278 (list (nconc (list 'let* bind-lets) 282 (list (nconc (list 'let* bind-lets)
279 (nreverse bind-forms) body))))))) 283 (nreverse bind-forms) body)))))))
280 284