Explorar el Código

Avoid use of define-error

define-error was introduced in Emacs 24.4, and ido-ubiquitous supports
earlier versions than that.

Fixes #71.
Ryan C. Thompson hace 10 años
padre
commit
c7226a3f07
Se han modificado 2 ficheros con 4 adiciones y 2 borrados
  1. 2 1
      ido-completing-read+.el
  2. 2 1
      ido-ubiquitous.el

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

@@ -126,7 +126,8 @@ https://github.com/DarwinAwardWinner/ido-ubiquitous/issues"
   :type 'boolean)
 
 ;; Signal used to trigger fallback
-(define-error 'ido-cr+-fallback "ido-cr+-fallback")
+(put 'ido-cr+-fallback 'error-conditions '(ido-cr+-fallback error))
+(put 'ido-cr+-fallback 'error-message "ido-cr+-fallback")
 
 ;;;###autoload
 (defun ido-completing-read+ (prompt collection &optional predicate

+ 2 - 1
ido-ubiquitous.el

@@ -533,7 +533,8 @@ ido-ubiquitous, not for ordinary ido completion."
     ad-do-it))
 
 ;; Signal used to trigger fallback
-(define-error 'ido-ubiquitous-fallback "ido-ubiquitous-fallback")
+(put 'ido-ubiquitous-fallback 'error-conditions '(ido-ubiquitous-fallback error))
+(put 'ido-ubiquitous-fallback 'error-message "ido-ubiquitous-fallback")
 
 (defun completing-read-ido-ubiquitous
     (prompt collection &optional predicate