Mercurial > hg > xemacs-beta
comparison lisp/subr.el @ 5506:b0d87f92e60b
Complete support for macro-declaration-function, bytecomp{,-runtime}.el
lisp/ChangeLog addition:
2011-05-07 Aidan Kehoe <kehoea@parhasard.net>
* bytecomp-runtime.el:
* bytecomp.el (byte-compile-file-form-defmumble):
* bytecomp-runtime.el (macro-declaration-function): New.
* subr.el:
* subr.el (macro-declaration-function): Removed.
Add support for macro-declaration-function, which is a GNU
mechanism for indicating indentation and edebug information in
macros (and only in macros).
src/ChangeLog addition:
2011-05-07 Aidan Kehoe <kehoea@parhasard.net>
* eval.c:
* eval.c (Fdefmacro):
* eval.c (syms_of_eval):
Support macro-declaration-function in defmacro, incompletely and
without documentation.
* lisp.h:
Declare Fnth here, necessary for the previous changes.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 08 May 2011 09:19:25 +0100 |
parents | d3e0482c7899 |
children | 544e6336d37c |
comparison
equal
deleted
inserted
replaced
5505:3b220aa03f89 | 5506:b0d87f92e60b |
---|---|
37 | 37 |
38 ;; BEGIN SYNCHED WITH FSF 21.2 | 38 ;; BEGIN SYNCHED WITH FSF 21.2 |
39 | 39 |
40 ;; XEmacs; no need for custom-declare-variable-list, preloaded-file-list is | 40 ;; XEmacs; no need for custom-declare-variable-list, preloaded-file-list is |
41 ;; ordered to make it unnecessary. | 41 ;; ordered to make it unnecessary. |
42 | |
43 (defun macro-declaration-function (macro decl) | |
44 "Process a declaration found in a macro definition. | |
45 This is set as the value of the variable `macro-declaration-function'. | |
46 MACRO is the name of the macro being defined. | |
47 DECL is a list `(declare ...)' containing the declarations. | |
48 The return value of this function is not used." | |
49 (dolist (d (cdr decl)) | |
50 (cond ((and (consp d) (eq (car d) 'indent)) | |
51 (put macro 'lisp-indent-function (cadr d))) | |
52 ((and (consp d) (eq (car d) 'debug)) | |
53 (put macro 'edebug-form-spec (cadr d))) | |
54 (t | |
55 (message "Unknown declaration %s" d))))) | |
56 | |
57 (setq macro-declaration-function 'macro-declaration-function) | |
58 | 42 |
59 ;; XEmacs; this is here because we use it in backquote.el, so it needs to be | 43 ;; XEmacs; this is here because we use it in backquote.el, so it needs to be |
60 ;; available the first time a `(...) form is expanded. | 44 ;; available the first time a `(...) form is expanded. |
61 (defun list* (first &rest rest) ; See compiler macro in cl-macs.el | 45 (defun list* (first &rest rest) ; See compiler macro in cl-macs.el |
62 "Return a new list with specified args as elements, cons'd to last arg. | 46 "Return a new list with specified args as elements, cons'd to last arg. |