mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-31 20:02:42 +00:00
* lisp/emacs-lisp/advice.el (ad-activate-advised-definition): Refresh the
advice list when the interactive-spec of ad-Advice-* changes.
This commit is contained in:
parent
3bee311e97
commit
4986fa2175
@ -1,3 +1,8 @@
|
||||
2013-01-07 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/advice.el (ad-activate-advised-definition): Refresh the
|
||||
advice list when the interactive-spec of ad-Advice-* changes.
|
||||
|
||||
2013-01-07 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* wid-edit.el (widget-default-get): Work for inlined elements.
|
||||
@ -7,7 +12,7 @@
|
||||
|
||||
* net/tramp.el (tramp-default-host-alist): New defcustom.
|
||||
(tramp-find-host): Use it.
|
||||
(tramp-eshell-directory-change): Moved from tramp-sh.el. Add to
|
||||
(tramp-eshell-directory-change): Move from tramp-sh.el. Add to
|
||||
`eshell-directory-change-hook'.
|
||||
|
||||
* net/tramp-adb.el (top): Add adb specific entry in
|
||||
@ -26,8 +31,8 @@
|
||||
|
||||
* net/tramp-adb.el (tramp-adb-ls-toolbox-regexp): The file size can
|
||||
consist of more than one digit.
|
||||
(tramp-adb-file-name-handler-alist): Use
|
||||
`tramp-handle-file-exists-p' consistently.
|
||||
(tramp-adb-file-name-handler-alist):
|
||||
Use `tramp-handle-file-exists-p' consistently.
|
||||
(tramp-adb-file-name-handler): Don't tweak `tramp-default-host'.
|
||||
(tramp-adb-handle-file-exists-p): Remove function.
|
||||
(tramp-adb-file-name-host): New defun.
|
||||
@ -161,8 +166,8 @@
|
||||
(tramp-do-copy-or-rename-file): Ignore errors when calling
|
||||
`set-file-extended-attributes'.
|
||||
|
||||
* net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add
|
||||
handler for `file-acl'.
|
||||
* net/tramp-smb.el (tramp-smb-file-name-handler-alist):
|
||||
Add handler for `file-acl'.
|
||||
(tramp-smb-handle-file-acl): New defun.
|
||||
|
||||
2013-01-02 Jay Belanger <jay.p.belanger@gmail.com>
|
||||
|
@ -2917,13 +2917,18 @@ If COMPILE is nil then the result depends on the value of
|
||||
"Redefine FUNCTION with its advised definition from cache or scratch.
|
||||
The resulting FUNCTION will be compiled if `ad-should-compile' returns t.
|
||||
The current definition and its cache-id will be put into the cache."
|
||||
(let ((verified-cached-definition
|
||||
(if (ad-verify-cache-id function)
|
||||
(ad-get-cache-definition function)))
|
||||
(advicefunname (ad-get-advice-info-field function 'advicefunname)))
|
||||
(let* ((verified-cached-definition
|
||||
(if (ad-verify-cache-id function)
|
||||
(ad-get-cache-definition function)))
|
||||
(advicefunname (ad-get-advice-info-field function 'advicefunname))
|
||||
(old-ispec (interactive-form advicefunname)))
|
||||
(fset advicefunname
|
||||
(or verified-cached-definition
|
||||
(ad-make-advised-definition function)))
|
||||
(unless (equal (interactive-form advicefunname) old-ispec)
|
||||
;; If the interactive-spec of advicefunname has changed, force nadvice to
|
||||
;; refresh its copy.
|
||||
(advice-remove function advicefunname))
|
||||
(advice-add function :around advicefunname)
|
||||
(if (ad-should-compile function compile)
|
||||
(ad-compile-function function))
|
||||
|
@ -107,6 +107,12 @@
|
||||
(lambda (f &rest args)
|
||||
(cons (cons 2 (called-interactively-p)) (apply f args))))
|
||||
(should (equal (call-interactively 'sm-test7) '((2 . t) (1 . t) 11)))
|
||||
|
||||
;; Check handling of interactive spec.
|
||||
(defun sm-test8 (a) (interactive "p") a)
|
||||
(defadvice sm-test8 (before adv1 activate) nil)
|
||||
(defadvice sm-test8 (before adv2 activate) (interactive "P") nil)
|
||||
(should (equal (interactive-form 'sm-test8) '(interactive "P")))
|
||||
))
|
||||
|
||||
;; Local Variables:
|
||||
|
Loading…
Reference in New Issue
Block a user