]> code.delx.au - gnu-emacs/blobdiff - lisp/isearchb.el
ibuffer-copy-filename-as-kill verbosity increase
[gnu-emacs] / lisp / isearchb.el
index 496bcf92914ddfe897cc353fb5c455018b88f899..05cbdcdabe2d9dfa18f0d1f6f01e3ec58cdce846 100644 (file)
@@ -1,9 +1,9 @@
 ;;; isearchb --- a marriage between iswitchb and isearch
 
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2016 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
 ;; Created: 16 Apr 2004
 ;; Version: 1.5
 ;; Keywords: lisp
@@ -75,7 +75,9 @@
 ;;   killing iswitchb.el and then trying to switch back is broken
 ;;   make sure TAB isn't broken
 
-(require 'iswitchb)
+;;; Code:
+
+(require 'iswitchb)                     ;FIXME: Don't rely on iswitchb!
 
 (defgroup isearchb nil
   "Switch between buffers using a mechanism like isearch."
@@ -118,7 +120,7 @@ Its purpose is to pass different call arguments to
   (interactive)
   (let* ((prompt "iswitch ")
         (iswitchb-method 'samewindow)
-        (buf (iswitchb-read-buffer prompt nil nil iswitchb-text t)))
+        (buf (iswitchb-read-buffer prompt nil nil nil iswitchb-text t)))
     (if (eq iswitchb-exit 'findfile)
        (call-interactively 'find-file)
       (when buf
@@ -136,10 +138,11 @@ Its purpose is to pass different call arguments to
   (unless iswitchb-text
     (setq iswitchb-text "")
     (iswitchb-make-buflist nil))
-  (if last-command-char
+  (if last-command-event
       (setq iswitchb-rescan t
            iswitchb-text (concat iswitchb-text
-                                 (char-to-string last-command-char))))
+                                 (char-to-string
+                                  (event-basic-type last-command-event)))))
   (iswitchb-set-matches)
   (let* ((match (car iswitchb-matches))
         (buf (and match (get-buffer match))))
@@ -176,17 +179,17 @@ Its purpose is to pass different call arguments to
              (substring iswitchb-text 0 (1- (length iswitchb-text))))
        (if (= 0 (length iswitchb-text))
            (isearchb-stop t t)
-         (setq last-command-char nil)
+         (setq last-command-event nil)
          (setq this-command 'isearchb)))
        ((or (equal keys "\C-i") (equal keys [tab]))
        (setq this-command 'isearchb-iswitchb))
        ((equal keys "\C-s")
        (iswitchb-next-match)
-       (setq last-command-char nil)
+       (setq last-command-event nil)
        (setq this-command 'isearchb))
        ((equal keys "\C-r")
        (iswitchb-prev-match)
-       (setq last-command-char nil)
+       (setq last-command-event nil)
        (setq this-command 'isearchb))
        ((equal keys "\C-g")
        (ding)
@@ -222,5 +225,4 @@ accessed via isearchb."
 
 (provide 'isearchb)
 
-;; arch-tag: 9277523f-a624-4aa0-ba10-b89eeb7b6e99
 ;;; isearchb.el ends here