Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
4743:776bbf454f3a | 4744:17f7e9191c0b |
---|---|
211 (UNUSED (args))) | 211 (UNUSED (args))) |
212 { | 212 { |
213 return Qnil; | 213 return Qnil; |
214 } | 214 } |
215 | 215 |
216 /* Originally, this was just a function -- but `custom' used a | |
217 garden-variety version, so why not make it a subr? */ | |
218 /* #### Move it to another file! */ | |
219 DEFUN ("quote-maybe", Fquote_maybe, 1, 1, 0, /* | |
220 Quote EXPR if it is not self quoting. | |
221 */ | |
222 (expr)) | |
223 { | |
224 return ((NILP (expr) | |
225 || EQ (expr, Qt) | |
226 || INTP (expr) | |
227 || FLOATP (expr) | |
228 || CHARP (expr) | |
229 || STRINGP (expr) | |
230 || VECTORP (expr) | |
231 || KEYWORDP (expr) | |
232 || BIT_VECTORP (expr) | |
233 || (CONSP (expr) && EQ (XCAR (expr), Qlambda))) | |
234 ? expr : list2 (Qquote, expr)); | |
235 } | |
236 | |
237 /* Modify EXPR by quotifying each element (except the first). */ | 216 /* Modify EXPR by quotifying each element (except the first). */ |
238 static Lisp_Object | 217 static Lisp_Object |
239 quotify_args (Lisp_Object expr) | 218 quotify_args (Lisp_Object expr) |
240 { | 219 { |
241 EXTERNAL_LIST_LOOP_3 (elt, expr, tail) | 220 EXTERNAL_LIST_LOOP_3 (elt, expr, tail) |
1046 #if 0 /* ill-conceived */ | 1025 #if 0 /* ill-conceived */ |
1047 DEFSYMBOL (Qmouse_leave_buffer_hook); | 1026 DEFSYMBOL (Qmouse_leave_buffer_hook); |
1048 #endif | 1027 #endif |
1049 | 1028 |
1050 DEFSUBR (Finteractive); | 1029 DEFSUBR (Finteractive); |
1051 DEFSUBR (Fquote_maybe); | |
1052 DEFSUBR (Fcall_interactively); | 1030 DEFSUBR (Fcall_interactively); |
1053 DEFSUBR (Fprefix_numeric_value); | 1031 DEFSUBR (Fprefix_numeric_value); |
1054 } | 1032 } |
1055 | 1033 |
1056 void | 1034 void |