Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
ae2fd042
Commit
ae2fd042
authored
Sep 11, 2009
by
Glenn Morris
Browse files
(define-compiler-macro): Add a property that records where a macro was
defined.
parent
4a6c9bec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
lisp/emacs-lisp/cl-macs.el
lisp/emacs-lisp/cl-macs.el
+16
-2
No files found.
lisp/emacs-lisp/cl-macs.el
View file @
ae2fd042
...
...
@@ -2547,8 +2547,22 @@ and then returning foo."
(cons (if (memq '&whole args) (delq '&whole args)
(cons '--cl-whole-arg-- args)) body))
(list 'or (list 'get (list 'quote func) '(quote byte-compile))
(list 'put (list 'quote func) '(quote byte-compile)
'(quote cl-byte-compile-compiler-macro)))))
(list 'progn
(list 'put (list 'quote func) '(quote byte-compile)
'(quote cl-byte-compile-compiler-macro))
;; This is so that describe-function can locate
;; the macro definition.
(list 'let
(list (list
'file
(or buffer-file-name
(and (boundp 'byte-compile-current-file)
(stringp byte-compile-current-file)
byte-compile-current-file))))
(list 'if 'file
(list 'put (list 'quote func)
'(quote compiler-macro-file)
'(file-name-nondirectory file))))))))
;;;###autoload
(defun compiler-macroexpand (form)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment