diff lisp/help.el @ 4694:2ac296807b88

Don't needlessly intern symbols, #'function-arglist, #'cl-function-arglist 2009-09-20 Aidan Kehoe <kehoea@parhasard.net> * help.el (function-arglist): Show the double-quotes in the sample output, correctly. Bind print-gensym to nil, now we're using uninterned symbols. Don't #'mapcar + #'intern to create uppercase symbols, use #'loop and #'make-symbol instead. * cl-macs.el (cl-upcase-arg): Don't intern the upcased symbols we're using for cosmetic reasons. Trust #'true-list-p in #'cl-function-arglist to detect circularity. (cl-function-arglist): Bind print-gensym to nil, now we're printing uninterned symbols and would prefer to avoid the gensym syntax. (cl-transform-lambda): Only add the Common Lisp lambda list: argument information when that differs frmo the normal argument information.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 20 Sep 2009 21:41:22 +0100
parents e9b88e997479
children fee33ab25966
line wrap: on
line diff
--- a/lisp/help.el	Sun Sep 20 21:29:00 2009 +0100
+++ b/lisp/help.el	Sun Sep 20 21:41:22 2009 +0100
@@ -1175,7 +1175,7 @@
 For example:
 
 	(function-arglist 'function-arglist)
-	=> (function-arglist FUNCTION)
+	=> \"(function-arglist FUNCTION)\"
 
 This function is used by `describe-function-1' to list function
 arguments in the standard Lisp style."
@@ -1203,14 +1203,17 @@
 		   (cond ((null args) t)
 			 ((equal args "") nil)
 			 (args))))
-		(t t))))
+		(t t)))
+         (print-gensym nil))
     (cond ((listp arglist)
 	   (prin1-to-string
-	    (cons function (mapcar (lambda (arg)
-				     (if (memq arg '(&optional &rest))
-					 arg
-				       (intern (upcase (symbol-name arg)))))
-				   arglist))
+	    (cons function (loop
+                             for arg in arglist
+                             collect (if (memq arg '(&optional &rest))
+                                         arg
+                                       (make-symbol (upcase (symbol-name
+                                                             arg))))))
+
 	    t))
 	  ((stringp arglist)
 	   (format "(%s %s)" function arglist)))))