changeset: 5269:90a0084b3541
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Thu Sep 16 15:34:35 2010 +0100
files: lisp/ChangeLog lisp/bytecomp.el lisp/cl-macs.el
description:
Rephrase the #'the docstring, make it nicer while byte-compiling.
lisp/ChangeLog addition:
2010-09-16 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp.el (byte-compile-initial-macro-environment):
* cl-macs.el (the):
Rephrase the docstring, make its implementation when compiling
files a little nicer.
diff -r 09f8ed0933c7 -r 90a0084b3541 lisp/ChangeLog
--- a/lisp/ChangeLog Thu Sep 16 15:24:40 2010 +0100
+++ b/lisp/ChangeLog Thu Sep 16 15:34:35 2010 +0100
@@ -1,3 +1,10 @@
+2010-09-16 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * bytecomp.el (byte-compile-initial-macro-environment):
+ * cl-macs.el (the):
+ Rephrase the docstring, make its implementation when compiling
+ files a little nicer.
+
2010-09-16 Aidan Kehoe <kehoea(a)parhasard.net>
* descr-text.el (unidata-initialize-unicodedata-database)
diff -r 09f8ed0933c7 -r 90a0084b3541 lisp/bytecomp.el
--- a/lisp/bytecomp.el Thu Sep 16 15:24:40 2010 +0100
+++ b/lisp/bytecomp.el Thu Sep 16 15:34:35 2010 +0100
@@ -504,10 +504,10 @@
(byte-compile-eval (cons 'progn body))
(cons 'progn body)))
(the .
- ,#'(lambda (&rest body)
+ ,#'(lambda (type form)
(if byte-compile-delete-errors
- (second body)
- (apply (cdr (symbol-function 'the)) body)))))
+ form
+ (funcall (cdr (symbol-function 'the)) type form)))))
"The default macro-environment passed to macroexpand by the compiler.
Placing a macro here will cause a macro to have different semantics when
expanded by the compiler as when expanded by the interpreter.")
diff -r 09f8ed0933c7 -r 90a0084b3541 lisp/cl-macs.el
--- a/lisp/cl-macs.el Thu Sep 16 15:24:40 2010 +0100
+++ b/lisp/cl-macs.el Thu Sep 16 15:34:35 2010 +0100
@@ -1963,13 +1963,13 @@
(defmacro locally (&rest body) (cons 'progn body))
;;;###autoload
(defmacro the (type form)
- "Assert that FORM gives a result of type TYPE, and return FORM.
+ "Assert that FORM gives a result of type TYPE, and return that result.
TYPE is a Common Lisp type specifier.
If macro expansion of a `the' form happens during byte compilation, and the
byte compiler customization variable `byte-compile-delete-errors' is
-non-nil, `the' just returns FORM, without making any type checks."
+non-nil, `the' is equivalent to FORM without any type checks."
(if (cl-safe-expr-p form)
`(prog1 ,form (assert ,(cl-make-type-test form type) t))
(let ((saved (gensym)))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/mailman/listinfo/xemacs-patches