[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp/emacs-lisp cl-macs.el
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] emacs/lisp/emacs-lisp cl-macs.el |
Date: |
Fri, 11 Sep 2009 03:39:28 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 09/09/11 03:39:28
Modified files:
lisp/emacs-lisp: cl-macs.el
Log message:
(define-compiler-macro): Add a property that records where a macro was
defined.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/emacs-lisp/cl-macs.el?cvsroot=emacs&r1=1.82&r2=1.83
Patches:
Index: cl-macs.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/cl-macs.el,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -b -r1.82 -r1.83
--- cl-macs.el 30 Aug 2009 14:18:25 -0000 1.82
+++ cl-macs.el 11 Sep 2009 03:39:28 -0000 1.83
@@ -2547,8 +2547,22 @@
(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 'progn
(list 'put (list 'quote func) '(quote byte-compile)
- '(quote cl-byte-compile-compiler-macro)))))
+ '(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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp/emacs-lisp cl-macs.el,
Glenn Morris <=