From 5593ed900d0d420f4ee3dd7af3f56b118308a3c0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 5 Nov 2012 00:29:12 -0800 Subject: 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. --- lisp/emacs-lisp/cl-lib.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp/cl-lib.el') 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 -- cgit v1.2.3