]> git.eshelyaron.com Git - emacs.git/commitdiff
(ad-make-advised-definition): Construct
authorGerd Moellmann <gerd@gnu.org>
Tue, 10 Apr 2001 15:17:09 +0000 (15:17 +0000)
committerGerd Moellmann <gerd@gnu.org>
Tue, 10 Apr 2001 15:17:09 +0000 (15:17 +0000)
advice for subrs differently.

lisp/emacs-lisp/advice.el

index 0333c51df643b05fca2f9cd564a4e26cd5599a9d..268fea55b0c0a73041fcacd4345e3e0eac0ca1ee 100644 (file)
@@ -3089,20 +3089,20 @@ Example: `(ad-map-arglists '(a &rest args) '(w x y z))' will return
                     ;; expansion time and return the result. The moral of that
                     ;; is that one should always deactivate advised special
                     ;; forms before one byte-compiles a file.
-                    (` ((, (if orig-macro-p
-                               'macroexpand
-                             'eval))
-                        (cons '(, origname)
-                              (, (ad-get-arguments advised-arglist 0))))))
+                    `(,(if orig-macro-p 'macroexpand 'eval)
+                      (cons ',origname
+                            ,(ad-get-arguments advised-arglist 0))))
                    ((and orig-subr-p
                          orig-interactive-p
+                         (not interactive-form)
                          (not advised-interactive-form))
                     ;; Check whether we were called interactively
                     ;; in order to do proper prompting:
-                    (` (if (interactive-p)
-                           (call-interactively '(, origname))
-                         (, (ad-make-mapped-call
-                             orig-arglist advised-arglist origname)))))
+                    `(if (interactive-p)
+                         (call-interactively ',origname)
+                       ,(ad-make-mapped-call orig-arglist 
+                                             advised-arglist
+                                             origname)))
                    ;; And now for normal functions and non-interactive subrs
                    ;; (or subrs whose interactive behavior was advised):
                    (t (ad-make-mapped-call