aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2012-11-24 16:34:28 -0500
committerStefan Monnier <[email protected]>2012-11-24 16:34:28 -0500
commit35a1051652056ea427eafd3431eef46865917933 (patch)
tree175112f424464c2becaaabce8efb38fd4034c3c8
parent50a60e02574f550773feabdaf1a8cede6316c309 (diff)
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Add back `declare' in
the constructs to keep outside of the `cl-block'. Fixes: debbugs:12977
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/cl-macs.el7
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 04aa1dc021..7a92aea69f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-24 Stefan Monnier <[email protected]>
+
+ * emacs-lisp/cl-macs.el (cl--transform-lambda): Add back `declare' in
+ the constructs to keep outside of the `cl-block' (bug#12977).
+
2012-11-24 Chong Yidong <[email protected]>
* mouse.el (mouse-drag-line): Even if the line is not draggable,
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index c0b6be44d7..011049ad24 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -216,12 +216,17 @@ The name is made by appending a number to PREFIX, default \"G\"."
(defvar cl--bind-inits) (defvar cl--bind-lets) (defvar cl--bind-forms)
(defun cl--transform-lambda (form bind-block)
+ "Transform a function form FORM of name BIND-BLOCK.
+BIND-BLOCK is the name of the symbol to which the function will be bound,
+and which will be used for the name of the `cl-block' surrounding the
+function's body.
+FORM is of the form (ARGS . BODY)."
(let* ((args (car form)) (body (cdr form)) (orig-args args)
(cl--bind-block bind-block) (cl--bind-defs nil) (cl--bind-enquote nil)
(cl--bind-inits nil) (cl--bind-lets nil) (cl--bind-forms nil)
(header nil) (simple-args nil))
(while (or (stringp (car body))
- (memq (car-safe (car body)) '(interactive cl-declare)))
+ (memq (car-safe (car body)) '(interactive declare cl-declare)))
(push (pop body) header))
(setq args (if (listp args) (cl-copy-list args) (list '&rest args)))
(let ((p (last args))) (if (cdr p) (setcdr p (list '&rest (cdr p)))))