~ubuntu-branches/ubuntu/karmic/emacs-snapshot/karmic

« back to all changes in this revision

Viewing changes to lisp/isearchb.el

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-04-05 09:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090405091430-nw07lynn2arotjbe
Tags: upstream-20090320
ImportĀ upstreamĀ versionĀ 20090320

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
;;; isearchb --- a marriage between iswitchb and isearch
2
2
 
3
 
;; Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
3
;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
 
4
;;   Free Software Foundation, Inc.
4
5
 
5
6
;; Author: John Wiegley <johnw@gnu.org>
6
7
;; Maintainer: FSF
82
83
  :group 'iswitchb)
83
84
 
84
85
(defcustom isearchb-idle-timeout nil
85
 
  "*Number of idle seconds before isearchb turns itself off.
 
86
  "Number of idle seconds before isearchb turns itself off.
86
87
If nil, don't use a timeout."
87
88
  :type '(choice (integer :tag "Seconds")
88
89
                 (const :tag "Disable" nil))
89
90
  :group 'isearchb)
90
91
 
91
92
(defcustom isearchb-show-completions t
92
 
  "*If non-nil, show possible completions in the minibuffer."
 
93
  "If non-nil, show possible completions in the minibuffer."
93
94
  :type 'boolean
94
95
  :group 'isearchb)
95
96
 
136
137
  (unless iswitchb-text
137
138
    (setq iswitchb-text "")
138
139
    (iswitchb-make-buflist nil))
139
 
  (if last-command-char
 
140
  (if last-command-event
140
141
      (setq iswitchb-rescan t
141
142
            iswitchb-text (concat iswitchb-text
142
 
                                  (char-to-string last-command-char))))
 
143
                                  (char-to-string last-command-event))))
143
144
  (iswitchb-set-matches)
144
145
  (let* ((match (car iswitchb-matches))
145
146
         (buf (and match (get-buffer match))))
176
177
              (substring iswitchb-text 0 (1- (length iswitchb-text))))
177
178
        (if (= 0 (length iswitchb-text))
178
179
            (isearchb-stop t t)
179
 
          (setq last-command-char nil)
 
180
          (setq last-command-event nil)
180
181
          (setq this-command 'isearchb)))
181
182
       ((or (equal keys "\C-i") (equal keys [tab]))
182
183
        (setq this-command 'isearchb-iswitchb))
183
184
       ((equal keys "\C-s")
184
185
        (iswitchb-next-match)
185
 
        (setq last-command-char nil)
 
186
        (setq last-command-event nil)
186
187
        (setq this-command 'isearchb))
187
188
       ((equal keys "\C-r")
188
189
        (iswitchb-prev-match)
189
 
        (setq last-command-char nil)
 
190
        (setq last-command-event nil)
190
191
        (setq this-command 'isearchb))
191
192
       ((equal keys "\C-g")
192
193
        (ding)