summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/cl-lib.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-11-05 00:29:12 -0800
committerGlenn Morris <rgm@gnu.org>2012-11-05 00:29:12 -0800
commit5593ed900d0d420f4ee3dd7af3f56b118308a3c0 (patch)
tree80ef2cedbb92079bc48ae0de949c08a5b1cfee4b /lisp/emacs-lisp/cl-lib.el
parentf6c6e09c7f16b7adbe2e5d1214a27902937f419e (diff)
downloademacs-5593ed900d0d420f4ee3dd7af3f56b118308a3c0.tar.gz
Misc small cl doc fixes
* emacs-lisp/cl-extra.el (cl-maplist, cl-mapcan): Doc fix. * emacs-lisp/cl-extra.el (cl-prettyexpand): * emacs-lisp/cl-lib.el (cl-proclaim, cl-declaim): * emacs-lisp/cl-macs.el (cl-destructuring-bind, cl-locally) (cl-the, cl-compiler-macroexpand): Add basic doc strings.
Diffstat (limited to 'lisp/emacs-lisp/cl-lib.el')
-rw-r--r--lisp/emacs-lisp/cl-lib.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index 122402797e1..e9b30a8f62d 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -251,12 +251,17 @@ one value.
(defvar cl-proclaims-deferred nil)
(defun cl-proclaim (spec)
+ "Record a global declaration specified by SPEC."
(if (fboundp 'cl-do-proclaim) (cl-do-proclaim spec t)
(push spec cl-proclaims-deferred))
nil)
(defmacro cl-declaim (&rest specs)
- (let ((body (mapcar (function (lambda (x) (list 'cl-proclaim (list 'quote x))))
+ "Like `cl-proclaim', but takes any number of unevaluated, unquoted arguments.
+Puts `(cl-eval-when (compile load eval) ...)' around the declarations
+so that they are registered at compile-time as well as run-time."
+ (let ((body (mapcar (function (lambda (x)
+ (list 'cl-proclaim (list 'quote x))))
specs)))
(if (cl--compiling-file) (cl-list* 'cl-eval-when '(compile load eval) body)
(cons 'progn body)))) ; avoid loading cl-macs.el for cl-eval-when