Просмотр исходного кода

Minor fix to "called-interactively-p" advice

Ryan C. Thompson 11 лет назад
Родитель
Сommit
1655b327e0
1 измененных файлов с 8 добавлено и 4 удалено
  1. 8 4
      ido-ubiquitous.el

+ 8 - 4
ido-ubiquitous.el

@@ -779,17 +779,21 @@ Does not work for keybindings or anything else that skips `command-execute'."
       ad-do-it))
 
   (defadvice interactive-p (around ido-ubiquitous activate)
-    "Return the correct result when `call-interactively' is advised."
+    "Return the correct result when `call-interactively' is advised.
+
+This advice completely overrides the original definition."
     (condition-case nil
         (setq ad-return-value
               (and (ido-ubiquitous--interactive-internal)
                    (ido-ubiquitous--interactive-p-internal)))
       ;; In case of error in the advice, fall back to the default
       ;; implementation
-      ad-do-it))
+      (error ad-do-it)))
 
   (defadvice called-interactively-p (around ido-ubiquitous activate)
-    "Return the correct result when `call-interactively' is advised."
+    "Return the correct result when `call-interactively' is advised.
+
+This advice completely overrides the original definition."
     (condition-case nil
         (setq ad-return-value
               (and (or (ido-ubiquitous--interactive-internal)
@@ -797,7 +801,7 @@ Does not work for keybindings or anything else that skips `command-execute'."
                    (ido-ubiquitous--interactive-p-internal)))
       ;; In case of error in the advice, fall back to the default
       ;; implementation
-      ad-do-it)))
+      (error ad-do-it)))
 
 ;;; Other