Browse Source

Define ido-cr+-fallback-function before using it

Ryan C. Thompson 10 years ago
parent
commit
6030bbb12a
1 changed files with 10 additions and 10 deletions
  1. 10 10
      ido-completing-read+.el

+ 10 - 10
ido-completing-read+.el

@@ -59,16 +59,6 @@ be updated until you restart Emacs.")
   `(when ido-cr+-debug-mode
      (message (concat "ido-completing-read+: " ,format-string) ,@args)))
 
-(defun ido-cr+--explain-fallback (arg)
-  ;; This function accepts a string, or an ido-cr+-fallback
-  ;; signal.
-  (when ido-cr+-debug-mode
-    (when (and (listp arg)
-               (eq (car arg) 'ido-cr+-fallback))
-      (setq arg (cdr arg)))
-    (ido-cr+--debug-message "Falling back to `%s' because %s."
-                                   ido-cr+-fallback-function arg)))
-
 ;;; Core code
 
 (defvar ido-cr+-enable-next-call nil
@@ -135,6 +125,16 @@ https://github.com/DarwinAwardWinner/ido-ubiquitous/issues"
 (put 'ido-cr+-fallback 'error-conditions '(ido-cr+-fallback error))
 (put 'ido-cr+-fallback 'error-message "ido-cr+-fallback")
 
+(defun ido-cr+--explain-fallback (arg)
+  ;; This function accepts a string, or an ido-cr+-fallback
+  ;; signal.
+  (when ido-cr+-debug-mode
+    (when (and (listp arg)
+               (eq (car arg) 'ido-cr+-fallback))
+      (setq arg (cdr arg)))
+    (ido-cr+--debug-message "Falling back to `%s' because %s."
+                                   ido-cr+-fallback-function arg)))
+
 ;;;###autoload
 (defun ido-completing-read+ (prompt collection &optional predicate
                                     require-match initial-input