Mercurial > emacs
comparison src/data.c @ 8401:1eee41c8120c
(syms_of_data): Set up Qadvice_info, Qactivate_advice.
(Ffset): Activate advice if symbol has advice-info property.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 31 Jul 1994 20:57:45 +0000 |
parents | cd81dba38a49 |
children | ec05bbe4ef1c |
comparison
equal
deleted
inserted
replaced
8400:cc016ca78c9e | 8401:1eee41c8120c |
---|---|
72 Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp; | 72 Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp; |
73 Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp; | 73 Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp; |
74 Lisp_Object Qbuffer_or_string_p; | 74 Lisp_Object Qbuffer_or_string_p; |
75 Lisp_Object Qboundp, Qfboundp; | 75 Lisp_Object Qboundp, Qfboundp; |
76 Lisp_Object Qcdr; | 76 Lisp_Object Qcdr; |
77 Lisp_Object Qadvice_info, Qactivate_advice; | |
77 | 78 |
78 Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error; | 79 Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error; |
79 Lisp_Object Qoverflow_error, Qunderflow_error; | 80 Lisp_Object Qoverflow_error, Qunderflow_error; |
80 | 81 |
81 #ifdef LISP_FLOAT_TYPE | 82 #ifdef LISP_FLOAT_TYPE |
552 return Fsignal (Qsetting_constant, Fcons (sym, Qnil)); | 553 return Fsignal (Qsetting_constant, Fcons (sym, Qnil)); |
553 if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (sym)->function, Qunbound)) | 554 if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (sym)->function, Qunbound)) |
554 Vautoload_queue = Fcons (Fcons (sym, XSYMBOL (sym)->function), | 555 Vautoload_queue = Fcons (Fcons (sym, XSYMBOL (sym)->function), |
555 Vautoload_queue); | 556 Vautoload_queue); |
556 XSYMBOL (sym)->function = newdef; | 557 XSYMBOL (sym)->function = newdef; |
558 /* Handle automatic advice activation */ | |
559 if (!NILP (Fget (sym, Qadvice_info))) | |
560 { | |
561 call2 (Qactivate_advice, sym, Fbyte_code_function_p (newdef)); | |
562 newdef = XSYMBOL (sym)->function; | |
563 } | |
557 return newdef; | 564 return newdef; |
558 } | 565 } |
559 | 566 |
560 /* This name should be removed once it is eliminated from elsewhere. */ | 567 /* This name should be removed once it is eliminated from elsewhere. */ |
561 | 568 |
2048 Qnumber_or_marker_p = intern ("number-or-marker-p"); | 2055 Qnumber_or_marker_p = intern ("number-or-marker-p"); |
2049 #endif /* LISP_FLOAT_TYPE */ | 2056 #endif /* LISP_FLOAT_TYPE */ |
2050 | 2057 |
2051 Qcdr = intern ("cdr"); | 2058 Qcdr = intern ("cdr"); |
2052 | 2059 |
2060 /* Handle automatic advice activation */ | |
2061 Qadvice_info = intern ("advice-info"); | |
2062 Qactivate_advice = intern ("ad-activate"); | |
2063 | |
2053 error_tail = Fcons (Qerror, Qnil); | 2064 error_tail = Fcons (Qerror, Qnil); |
2054 | 2065 |
2055 /* ERROR is used as a signaler for random errors for which nothing else is right */ | 2066 /* ERROR is used as a signaler for random errors for which nothing else is right */ |
2056 | 2067 |
2057 Fput (Qerror, Qerror_conditions, | 2068 Fput (Qerror, Qerror_conditions, |
2230 #endif /* LISP_FLOAT_TYPE */ | 2241 #endif /* LISP_FLOAT_TYPE */ |
2231 | 2242 |
2232 staticpro (&Qboundp); | 2243 staticpro (&Qboundp); |
2233 staticpro (&Qfboundp); | 2244 staticpro (&Qfboundp); |
2234 staticpro (&Qcdr); | 2245 staticpro (&Qcdr); |
2246 staticpro (&Qadvice_info); | |
2247 staticpro (&Qactivate_advice); | |
2235 | 2248 |
2236 defsubr (&Seq); | 2249 defsubr (&Seq); |
2237 defsubr (&Snull); | 2250 defsubr (&Snull); |
2238 defsubr (&Slistp); | 2251 defsubr (&Slistp); |
2239 defsubr (&Snlistp); | 2252 defsubr (&Snlistp); |