diff src/callint.c @ 4744:17f7e9191c0b

Rationalise duplicated functionality, #'custom-quote, #'quote-maybe. src/ChangeLog addition: 2009-11-15 Aidan Kehoe <kehoea@parhasard.net> * eval.c (Fquote_maybe): Move this function here from callint.c; make it more comprehensive about which types are self-quoting. * lisp.h: Declare Fquote_maybe here, since it's now used in callint.c and defined in eval.c * callint.c (Fquote_maybe): Remove this function from this file. lisp/ChangeLog addition: 2009-11-15 Aidan Kehoe <kehoea@parhasard.net> * custom.el (custom-quote): Define this as an alias for `quote-maybe', which is in C and more comprehensive; packages still use this name in places. (customize-mark-to-save, customize-mark-as-set): Use `quote-maybe', not `custom-quote'. * cus-edit.el (customize-set-variable, customize-save-variable) (custom-variable-value-create, custom-variable-set) (custom-variable-pre-save): Remove a version of `custom-quote' specific to this file; use `quote-maybe' universally instead.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 15 Nov 2009 14:59:53 +0000
parents 8f1ee2d15784
children 308d34e9f07d
line wrap: on
line diff
--- a/src/callint.c	Sat Nov 14 13:33:52 2009 +0000
+++ b/src/callint.c	Sun Nov 15 14:59:53 2009 +0000
@@ -213,27 +213,6 @@
   return Qnil;
 }
 
-/* Originally, this was just a function -- but `custom' used a
-   garden-variety version, so why not make it a subr?  */
-/* #### Move it to another file! */
-DEFUN ("quote-maybe", Fquote_maybe, 1, 1, 0, /*
-Quote EXPR if it is not self quoting.
-*/
-       (expr))
-{
-  return ((NILP (expr)
-	   || EQ (expr, Qt)
-	   || INTP (expr)
-	   || FLOATP (expr)
-	   || CHARP (expr)
-	   || STRINGP (expr)
-	   || VECTORP (expr)
-	   || KEYWORDP (expr)
-	   || BIT_VECTORP (expr)
-	   || (CONSP (expr) && EQ (XCAR (expr), Qlambda)))
-	  ? expr : list2 (Qquote, expr));
-}
-
 /* Modify EXPR by quotifying each element (except the first).  */
 static Lisp_Object
 quotify_args (Lisp_Object expr)
@@ -1048,7 +1027,6 @@
 #endif
 
   DEFSUBR (Finteractive);
-  DEFSUBR (Fquote_maybe);
   DEFSUBR (Fcall_interactively);
   DEFSUBR (Fprefix_numeric_value);
 }