aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-04-10 15:17:09 +0000
committerGerd Moellmann2001-04-10 15:17:09 +0000
commit8541c92408c12c49dfa5c649dc6b9ddced0fc906 (patch)
tree6046d3dbfa2eb9a0cb442cde5a6fe0de6fa4d125
parent3fe35f35c02fd27ccfe458583bf3858a86143975 (diff)
downloademacs-8541c92408c12c49dfa5c649dc6b9ddced0fc906.tar.gz
emacs-8541c92408c12c49dfa5c649dc6b9ddced0fc906.zip
(ad-make-advised-definition): Construct
advice for subrs differently.
-rw-r--r--lisp/emacs-lisp/advice.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index 0333c51df64..268fea55b0c 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -3089,20 +3089,20 @@ Example: `(ad-map-arglists '(a &rest args) '(w x y z))' will return
3089 ;; expansion time and return the result. The moral of that 3089 ;; expansion time and return the result. The moral of that
3090 ;; is that one should always deactivate advised special 3090 ;; is that one should always deactivate advised special
3091 ;; forms before one byte-compiles a file. 3091 ;; forms before one byte-compiles a file.
3092 (` ((, (if orig-macro-p 3092 `(,(if orig-macro-p 'macroexpand 'eval)
3093 'macroexpand 3093 (cons ',origname
3094 'eval)) 3094 ,(ad-get-arguments advised-arglist 0))))
3095 (cons '(, origname)
3096 (, (ad-get-arguments advised-arglist 0))))))
3097 ((and orig-subr-p 3095 ((and orig-subr-p
3098 orig-interactive-p 3096 orig-interactive-p
3097 (not interactive-form)
3099 (not advised-interactive-form)) 3098 (not advised-interactive-form))
3100 ;; Check whether we were called interactively 3099 ;; Check whether we were called interactively
3101 ;; in order to do proper prompting: 3100 ;; in order to do proper prompting:
3102 (` (if (interactive-p) 3101 `(if (interactive-p)
3103 (call-interactively '(, origname)) 3102 (call-interactively ',origname)
3104 (, (ad-make-mapped-call 3103 ,(ad-make-mapped-call orig-arglist
3105 orig-arglist advised-arglist origname))))) 3104 advised-arglist
3105 origname)))
3106 ;; And now for normal functions and non-interactive subrs 3106 ;; And now for normal functions and non-interactive subrs
3107 ;; (or subrs whose interactive behavior was advised): 3107 ;; (or subrs whose interactive behavior was advised):
3108 (t (ad-make-mapped-call 3108 (t (ad-make-mapped-call