aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp/cl.el
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2012-06-27 11:11:28 -0400
committerStefan Monnier <[email protected]>2012-06-27 11:11:28 -0400
commitd5c6faf921772e523fc224333d8af142c830a7e6 (patch)
treec56d324652a27862cad6eaa553017b6f8ffef5c1 /lisp/emacs-lisp/cl.el
parent7b953864bad04a37e9cc0e0de4328caf1b4c400e (diff)
* lisp/emacs-lisp/cl.el (flet): Mark obsolete.
* lisp/emacs-lisp/cl-macs.el (cl-flet*): New macro. * lisp/vc/vc-rcs.el (vc-rcs-annotate-command, vc-rcs-parse): * lisp/progmodes/js.el (js-c-fill-paragraph): * lisp/progmodes/ebrowse.el (ebrowse-switch-member-buffer-to-sibling-class) (ebrowse-switch-member-buffer-to-derived-class): * test/automated/ert-x-tests.el (ert-test-run-tests-interactively-2): * lisp/play/5x5.el (5x5-solver): Use cl-flet. Fixes: debbugs:11780
Diffstat (limited to 'lisp/emacs-lisp/cl.el')
-rw-r--r--lisp/emacs-lisp/cl.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el
index 7996af4e02..0b6d9cd222 100644
--- a/lisp/emacs-lisp/cl.el
+++ b/lisp/emacs-lisp/cl.el
@@ -461,11 +461,13 @@ Common Lisp.
;; This should really have some way to shadow 'byte-compile properties, etc.
(defmacro flet (bindings &rest body)
- "Make temporary function definitions.
-This is an analogue of `let' that operates on the function cell of FUNC
-rather than its value cell. The FORMs are evaluated with the specified
-function definitions in place, then the definitions are undone (the FUNCs
-go back to their previous definitions, or lack thereof).
+ "Make temporary overriding function definitions.
+This is an analogue of a dynamically scoped `let' that operates on the function
+cell of FUNCs rather than their value cell.
+If you want the Common-Lisp style of `flet', you should use `cl-flet'.
+The FORMs are evaluated with the specified function definitions in place,
+then the definitions are undone (the FUNCs go back to their previous
+definitions, or lack thereof).
\(fn ((FUNC ARGLIST BODY...) ...) FORM...)"
(declare (indent 1) (debug cl-flet))
@@ -491,6 +493,7 @@ will not work - use `labels' instead" (symbol-name (car x))))
(list `(symbol-function ',(car x)) func)))
bindings)
,@body))
+(make-obsolete 'flet "Use either `cl-flet' or `letf'." "24.2")
(defmacro labels (bindings &rest body)
"Make temporary function bindings.