Quellcode durchsuchen

Fix some compile warnings

This time I fixed warnings that I can actually reproduce. Yay!
Strangely, fixing ido-cr+ seems to have stopped ido-ubiquitous from
producing any warnings either, even though ido-ubiquitous.el does some
of the same warning-generating actions.
Ryan C. Thompson vor 9 Jahren
Ursprung
Commit
7a4d763577
1 geänderte Dateien mit 9 neuen und 15 gelöschten Zeilen
  1. 9 15
      ido-completing-read+.el

+ 9 - 15
ido-completing-read+.el

@@ -52,7 +52,13 @@ not be updated until you restart Emacs.")
 
 ;;; Debug messages
 
-(defvar ido-cr+-debug-mode)
+(define-minor-mode ido-cr+-debug-mode
+  "If non-nil, ido-cr+ will print debug info.
+
+Debug info is printed to the *Messages* buffer."
+  nil
+  :global t
+  :group 'ido-completing-read-plus)
 
 ;; Defined as a macro for efficiency (args are not evaluated unless
 ;; debug mode is on)
@@ -285,29 +291,17 @@ sets up C-j to be equivalent to TAB in the same situation."
        ;; Only if using ico-cr+
        ido-cr+-enable-this-call
        ;; Only if require-match is non-nil
-       ido-require-match
+       (with-no-warnings ido-require-match)
        ;; Only if current text is non-empty
        (not (string= ido-text ""))
        ;; Only if current text is not a complete choice
-       (not (member ido-text ido-cur-list)))
+       (not (member ido-text (with-no-warnings ido-cur-list))))
       (progn
         (ido-cr+--debug-message
          "Overriding C-j behavior for require-match: performing completion instead of exiting.")
         (ido-complete))
     ad-do-it))
 
-;;; Debug mode
-
-;; This is defined at the end so it goes at the bottom of the
-;; customization group
-(define-minor-mode ido-cr+-debug-mode
-  "If non-nil, ido-cr+ will print debug info.
-
-Debug info is printed to the *Messages* buffer."
-  nil
-  :global t
-  :group 'ido-completing-read-plus)
-
 (provide 'ido-completing-read+)
 
 ;;; ido-completing-read+.el ends here