[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/iswitchb.el
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/iswitchb.el |
Date: |
Fri, 04 Apr 2003 01:22:24 -0500 |
Index: emacs/lisp/iswitchb.el
diff -c emacs/lisp/iswitchb.el:1.39 emacs/lisp/iswitchb.el:1.40
*** emacs/lisp/iswitchb.el:1.39 Thu Sep 26 11:50:59 2002
--- emacs/lisp/iswitchb.el Tue Feb 4 06:31:09 2003
***************
*** 183,189 ****
;; Using iswitchb for other completion tasks.
;; Kin Cho (address@hidden) sent the following suggestion to use
! ;; iswitchb for other completion tasks.
;;
;; (defun my-icompleting-read (prompt choices)
;; "Use iswitch as a completing-read replacement to choose from
--- 183,189 ----
;; Using iswitchb for other completion tasks.
;; Kin Cho (address@hidden) sent the following suggestion to use
! ;; iswitchb for other completion tasks.
;;
;; (defun my-icompleting-read (prompt choices)
;; "Use iswitch as a completing-read replacement to choose from
***************
*** 209,216 ****
;; (delete-minibuffer-contents))
;;
;; (add-hook 'iswitchb-define-mode-map-hook
! ;; '(lambda () (define-key
! ;; iswitchb-mode-map "\C-o"
;; 'iswitchb-exclude-nonmatching)))
;; Other lisp packages extend iswitchb behaviour to other tasks. See
--- 209,216 ----
;; (delete-minibuffer-contents))
;;
;; (add-hook 'iswitchb-define-mode-map-hook
! ;; '(lambda () (define-key
! ;; iswitchb-mode-map "\C-o"
;; 'iswitchb-exclude-nonmatching)))
;; Other lisp packages extend iswitchb behaviour to other tasks. See
***************
*** 518,524 ****
(define-key map "\C-m" 'iswitchb-exit-minibuffer)
(setq iswitchb-mode-map map)
(run-hooks 'iswitchb-define-mode-map-hook)))
!
;;; MAIN FUNCTION
(defun iswitchb ()
"Switch to buffer matching a substring.
--- 518,524 ----
(define-key map "\C-m" 'iswitchb-exit-minibuffer)
(setq iswitchb-mode-map map)
(run-hooks 'iswitchb-define-mode-map-hook)))
!
;;; MAIN FUNCTION
(defun iswitchb ()
"Switch to buffer matching a substring.
***************
*** 547,553 ****
\\[iswitchb-kill-buffer] Kill buffer at head of buffer list."
;;\\[iswitchb-toggle-ignore] Toggle ignoring certain buffers (see \
;;`iswitchb-buffer-ignore')
!
(let* ((prompt "iswitch ")
(buf (iswitchb-read-buffer prompt)))
--- 547,553 ----
\\[iswitchb-kill-buffer] Kill buffer at head of buffer list."
;;\\[iswitchb-toggle-ignore] Toggle ignoring certain buffers (see \
;;`iswitchb-buffer-ignore')
!
(let* ((prompt "iswitch ")
(buf (iswitchb-read-buffer prompt)))
***************
*** 626,632 ****
(setq buf-sel iswitchb-final-text)
;; else take head of list
(setq buf-sel (car iswitchb-matches)))
!
;; Or possibly choose the default buffer
(if (equal iswitchb-final-text "")
(setq buf-sel
--- 626,632 ----
(setq buf-sel iswitchb-final-text)
;; else take head of list
(setq buf-sel (car iswitchb-matches)))
!
;; Or possibly choose the default buffer
(if (equal iswitchb-final-text "")
(setq buf-sel
***************
*** 661,671 ****
(let (res)
(cond ((not iswitchb-matches)
(run-hooks 'iswitchb-cannot-complete-hook))
!
((= 1 (length iswitchb-matches))
;; only one choice, so select it.
(exit-minibuffer))
!
(t
;; else there could be some completions
(setq res iswitchb-common-match-string)
--- 661,671 ----
(let (res)
(cond ((not iswitchb-matches)
(run-hooks 'iswitchb-cannot-complete-hook))
!
((= 1 (length iswitchb-matches))
;; only one choice, so select it.
(exit-minibuffer))
!
(t
;; else there could be some completions
(setq res iswitchb-common-match-string)
***************
*** 847,862 ****
ret)
(mapcar
(lambda (x)
!
(if do-string
(setq name x) ;We already have the name
(setq name (buffer-name x)))
!
(cond
((and (or (and string-format (string-match regexp name))
(and (null string-format)
(string-match (regexp-quote regexp) name)))
!
(not (iswitchb-ignore-buffername-p name)))
(setq ret (cons name ret))
)))
--- 847,862 ----
ret)
(mapcar
(lambda (x)
!
(if do-string
(setq name x) ;We already have the name
(setq name (buffer-name x)))
!
(cond
((and (or (and string-format (string-match regexp name))
(and (null string-format)
(string-match (regexp-quote regexp) name)))
!
(not (iswitchb-ignore-buffername-p name)))
(setq ret (cons name ret))
)))
***************
*** 954,963 ****
(set-window-start win (point-min))
(scroll-other-window))
(set-buffer buf))
!
(with-output-to-temp-buffer temp-buf
(if iswitchb-xemacs
!
;; XEmacs extents are put on by default, doesn't seem to be
;; any way of switching them off.
(display-completion-list (if iswitchb-matches
--- 954,963 ----
(set-window-start win (point-min))
(scroll-other-window))
(set-buffer buf))
!
(with-output-to-temp-buffer temp-buf
(if iswitchb-xemacs
!
;; XEmacs extents are put on by default, doesn't seem to be
;; any way of switching them off.
(display-completion-list (if iswitchb-matches
***************
*** 1043,1049 ****
(if (and iswitchb-newbuffer
(or
(not iswitchb-prompt-newbuffer)
!
(and iswitchb-prompt-newbuffer
(y-or-n-p
(format
--- 1043,1049 ----
(if (and iswitchb-newbuffer
(or
(not iswitchb-prompt-newbuffer)
!
(and iswitchb-prompt-newbuffer
(y-or-n-p
(format
***************
*** 1187,1193 ****
(iswitchb-set-common-completion)
;; Insert the match-status information:
! (insert (iswitchb-completions
contents
minibuffer-completion-table
minibuffer-completion-predicate
--- 1187,1193 ----
(iswitchb-set-common-completion)
;; Insert the match-status information:
! (insert (iswitchb-completions
contents
minibuffer-completion-table
minibuffer-completion-predicate
***************
*** 1196,1202 ****
(defun iswitchb-completions (name candidates predicate require-match)
"Return the string that is displayed after the user's text.
Modified from `icomplete-completions'."
!
(let ((comps iswitchb-matches)
; "-determined" - only one candidate
(open-bracket-determined (if require-match "(" "["))
--- 1196,1202 ----
(defun iswitchb-completions (name candidates predicate require-match)
"Return the string that is displayed after the user's text.
Modified from `icomplete-completions'."
!
(let ((comps iswitchb-matches)
; "-determined" - only one candidate
(open-bracket-determined (if require-match "(" "["))
***************
*** 1273,1279 ****
(concat open-bracket-determined
(substring most (length name))
close-bracket-determined))
!
;; list all alternatives
open-bracket-prospects
(if most-is-exact
--- 1273,1279 ----
(concat open-bracket-determined
(substring most (length name))
close-bracket-determined))
!
;; list all alternatives
open-bracket-prospects
(if most-is-exact
***************
*** 1304,1316 ****
(if (and (boundp 'iswitchb-eoinput)
iswitchb-eoinput)
!
(if (> iswitchb-eoinput (point-max))
;; Oops, got rug pulled out from under us - reinit:
(setq iswitchb-eoinput (point-max))
(let ((buffer-undo-list buffer-undo-list )) ; prevent entry
(delete-region iswitchb-eoinput (point-max))))
!
;; Reestablish the local variable 'cause minibuffer-setup is weird:
(make-local-variable 'iswitchb-eoinput)
(setq iswitchb-eoinput 1)))
--- 1304,1316 ----
(if (and (boundp 'iswitchb-eoinput)
iswitchb-eoinput)
!
(if (> iswitchb-eoinput (point-max))
;; Oops, got rug pulled out from under us - reinit:
(setq iswitchb-eoinput (point-max))
(let ((buffer-undo-list buffer-undo-list )) ; prevent entry
(delete-region iswitchb-eoinput (point-max))))
!
;; Reestablish the local variable 'cause minibuffer-setup is weird:
(make-local-variable 'iswitchb-eoinput)
(setq iswitchb-eoinput 1)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/iswitchb.el,
Miles Bader <=