瀏覽代碼

Minor fix to "called-interactively-p" advice

Ryan C. Thompson 11 年之前
父節點
當前提交
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