changeset 5269:90a0084b3541

Rephrase the #'the docstring, make it nicer while byte-compiling. lisp/ChangeLog addition: 2010-09-16 Aidan Kehoe <kehoea@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.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 16 Sep 2010 15:34:35 +0100
parents 09f8ed0933c7
children 3acaa0fc09be
files lisp/ChangeLog lisp/bytecomp.el lisp/cl-macs.el
diffstat 3 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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@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@parhasard.net>
 
 	* descr-text.el (unidata-initialize-unicodedata-database)
--- 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.")
--- 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)))