[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109587: * lisp/subr.el (function-get
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109587: * lisp/subr.el (function-get): Refine `autoload' arg so it can also |
Date: |
Mon, 13 Aug 2012 17:23:09 -0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109587
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12191
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2012-08-13 17:23:09 -0400
message:
* lisp/subr.el (function-get): Refine `autoload' arg so it can also
autoload functions for gv.el.
* lisp/emacs-lisp/edebug.el (get-edebug-spec): Adjust so it only
autoloads macros.
modified:
lisp/ChangeLog
lisp/emacs-lisp/edebug.el
lisp/subr.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-08-13 19:10:35 +0000
+++ b/lisp/ChangeLog 2012-08-13 21:23:09 +0000
@@ -1,5 +1,10 @@
2012-08-13 Stefan Monnier <address@hidden>
+ * subr.el (function-get): Refine `autoload' arg so it can also
+ autoload functions for gv.el (bug#12191).
+ * emacs-lisp/edebug.el (get-edebug-spec): Adjust so it only
+ autoloads macros.
+
* color.el (color-xyz-to-lab, color-lab-to-xyz, color-cie-de2000):
Prefer pcase-let over destructuring-bind.
* vc/diff-mode.el (diff-remove-trailing-whitespace): Same.
=== modified file 'lisp/emacs-lisp/edebug.el'
--- a/lisp/emacs-lisp/edebug.el 2012-07-26 01:27:33 +0000
+++ b/lisp/emacs-lisp/edebug.el 2012-08-13 21:23:09 +0000
@@ -248,7 +248,7 @@
(progn
(and (symbolp indirect)
(setq indirect
- (function-get indirect 'edebug-form-spec 'autoload))))
+ (function-get indirect 'edebug-form-spec 'macro))))
;; (edebug-trace "indirection: %s" edebug-form-spec)
(setq edebug-form-spec indirect))
edebug-form-spec
=== modified file 'lisp/subr.el'
--- a/lisp/subr.el 2012-08-13 14:12:47 +0000
+++ b/lisp/subr.el 2012-08-13 21:23:09 +0000
@@ -2785,15 +2785,19 @@
(defun function-get (f prop &optional autoload)
"Return the value of property PROP of function F.
-If AUTOLOAD is non-nil and F is an autoloaded macro, try to autoload
-the macro in the hope that it will set PROP."
+If AUTOLOAD is non-nil and F is autoloaded, try to autoload it
+in the hope that it will set PROP. If AUTOLOAD is `macro', only do it
+if it's an autoloaded macro."
(let ((val nil))
(while (and (symbolp f)
(null (setq val (get f prop)))
(fboundp f))
(let ((fundef (symbol-function f)))
(if (and autoload (autoloadp fundef)
- (not (equal fundef (autoload-do-load fundef f 'macro))))
+ (not (equal fundef
+ (autoload-do-load fundef f
+ (if (eq autoload 'macro)
+ 'macro)))))
nil ;Re-try `get' on the same `f'.
(setq f fundef))))
val))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109587: * lisp/subr.el (function-get): Refine `autoload' arg so it can also,
Stefan Monnier <=