From 65a44e9fc083277175c8089bb0692a895df9cb66 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Sat, 14 Aug 1999 03:55:01 +0000 Subject: (ad-special-forms): Use track-mouse iff bound. --- lisp/emacs-lisp/advice.el | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'lisp/emacs-lisp/advice.el') diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 9f670e8010..6dab539a01 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -2472,13 +2472,16 @@ will clear the cache." ;; There is no way to determine whether some subr is a special form or not, ;; hence we need this list (which is probably out of date): (defvar ad-special-forms - (mapcar 'symbol-function - '(and catch cond condition-case defconst defmacro - defun defvar function if interactive let let* - or prog1 prog2 progn quote save-current-buffer - save-excursion save-restriction save-window-excursion - setq setq-default track-mouse unwind-protect while - with-output-to-temp-buffer))) + (let ((tem '(and catch cond condition-case defconst defmacro + defun defvar function if interactive let let* + or prog1 prog2 progn quote save-current-buffer + save-excursion save-restriction save-window-excursion + setq setq-default track-mouse unwind-protect while + with-output-to-temp-buffer))) + ;; track-mouse could be void in some configurations. + (if (fboundp 'track-mouse) + (setq tem (cons 'track-mouse tem))) + (mapcar 'symbol-function tem))) (defmacro ad-special-form-p (definition) ;;"non-nil if DEFINITION is a special form." -- cgit v1.2.3