aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-11-16 00:00:22 +0000
committerRichard M. Stallman2001-11-16 00:00:22 +0000
commit413da4514b106c81cecbfb5b7cd80b42f6b29d31 (patch)
tree6fcb2239fa847f8879920774e9cc5d0caf1190fe
parent6f665da94994bf054a6d9a01e0337f455991cfdc (diff)
downloademacs-413da4514b106c81cecbfb5b7cd80b42f6b29d31.tar.gz
emacs-413da4514b106c81cecbfb5b7cd80b42f6b29d31.zip
(values, values-list, multiple-value-list, multiple-value-apply, nth-value):
Use defsubst rather than defalias, to get better doc strings.
-rw-r--r--lisp/ChangeLog16
-rw-r--r--lisp/emacs-lisp/cl.el36
2 files changed, 37 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4f2f4277eba..ab3ff9423f2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12001-11-15 Richard M. Stallman <rms@gnu.org>
2
3 * emacs-lisp/cl.el (values, values-list, multiple-value-list)
4 (multiple-value-apply, nth-value): Use defsubst rather than defalias
5 to get better doc strings.
6
12001-11-15 Pavel Jan,Bm(Bk <Pavel@Janik.cz> 72001-11-15 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
2 8
3 * derived.el: Fix autoload cookie. 9 * derived.el: Fix autoload cookie.
@@ -15,16 +21,6 @@
15 * dired.el (dired-undo): Display a message to explain 21 * dired.el (dired-undo): Display a message to explain
16 that this does not undo file system changes. 22 that this does not undo file system changes.
17 23
182001-11-15 Alan Shutko <ats@acm.org>
19
20 * compile.el (recompile): Use compilation-arguments if set, so as
21 to be able to M-x recompile the exact command which created a
22 compilation-mode buffer.
23
242001-11-13 Richard M. Stallman <rms@gnu.org>
25
26 * progmodes/ada-mode.el (ada-fill-comment-prefix): Doc fix.
27
282001-11-15 David Kastrup <David.Kastrup@t-online.de> 242001-11-15 David Kastrup <David.Kastrup@t-online.de>
29 25
30 * mouse-drag.el (mouse-drag-throw): Push back non-drag events 26 * mouse-drag.el (mouse-drag-throw): Push back non-drag events
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el
index f77c15414a3..970d9180273 100644
--- a/lisp/emacs-lisp/cl.el
+++ b/lisp/emacs-lisp/cl.el
@@ -203,12 +203,38 @@ Keywords supported: :test :test-not :key"
203;;; simulated. Instead, multiple-value-bind and friends simply expect 203;;; simulated. Instead, multiple-value-bind and friends simply expect
204;;; the target form to return the values as a list. 204;;; the target form to return the values as a list.
205 205
206(defalias 'values 'list) 206(defsubst values (&rest values)
207(defalias 'values-list 'identity) 207 "Return multiple values, Common Lisp style.
208(defalias 'multiple-value-list 'identity) 208The arguments of `values' are the values
209(defalias 'multiple-value-call 'apply) ; only works for one arg 209that the containing function should return."
210(defalias 'nth-value 'nth) 210 (apply 'list values))
211
212(defsubst values-list (list)
213 "Return multiple values, Common Lisp style, taken from a list.
214LIST specifies the list of values
215that the containing function should return."
216 list)
211 217
218(defsubst multiple-value-list (expression)
219 "Return a list of the multiple values produced by EXPRESSION.
220This handles multiple values in Common Lisp style, but it does not
221work right when EXPRESSION calls an ordinary Emacs Lisp function
222that returns just one value."
223 expression)
224
225(defsubst multiple-value-apply (function expression)
226 "Evaluate EXPRESSION to get multiple values and apply FUNCTION to them.
227This handles multiple values in Common Lisp style, but it does not work
228right when EXPRESSION calls an ordinary Emacs Lisp function that returns just
229one value."
230 (apply function expression))
231
232(defsubst nth-value (n expression)
233 "Evaluate EXPRESSION to get multiple values and return the Nth one.
234This handles multiple values in Common Lisp style, but it does not work
235right when EXPRESSION calls an ordinary Emacs Lisp function that returns just
236one value."
237 (nth n expression))
212 238
213;;; Macros. 239;;; Macros.
214 240