浏览代码

Use define-error instead of manually defining error symbol

Now that we depend on Emacs 24.4 or higher, we can use "define-error".
Ryan C. Thompson 8 年之前
父节点
当前提交
53c53d16e0
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      ido-completing-read+.el

+ 2 - 4
ido-completing-read+.el

@@ -313,10 +313,8 @@ incompatibilities, please file a bug report at
 https://github.com/DarwinAwardWinner/ido-ubiquitous/issues"
   :type 'boolean)
 
-;; Signal used to trigger fallback (don't use `define-error' because
-;; it's only supported in 24.4 and up)
-(put 'ido-cr+-fallback 'error-conditions '(ido-cr+-fallback error))
-(put 'ido-cr+-fallback 'error-message "ido-cr+-fallback")
+;; Signal used to trigger fallback
+(define-error 'ido-cr+-fallback "ido-cr+-fallback")
 
 (defsubst ido-cr+--explain-fallback (arg)
   ;; This function accepts a string, or an ido-cr+-fallback