[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/ido.el
From: |
Kim F. Storm |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/ido.el |
Date: |
Mon, 02 Sep 2002 06:40:58 -0400 |
Index: emacs/lisp/ido.el
diff -c emacs/lisp/ido.el:1.11 emacs/lisp/ido.el:1.12
*** emacs/lisp/ido.el:1.11 Mon Jul 22 22:26:56 2002
--- emacs/lisp/ido.el Mon Sep 2 06:40:56 2002
***************
*** 835,840 ****
--- 835,845 ----
"List of file-name-all-completions results.
Each element in the list is of the form (dir (mtime) file...).")
+ (defvar ido-ignore-item-temp-list nil
+ "List of items to ignore in current ido invocation.
+ Intended to be let-bound by functions which calls ido repeatedly.
+ Should never be set permanently.")
+
;; Temporary storage
(defvar ido-eoinput 1
***************
*** 1451,1467 ****
(setq ido-rescan t)
(setq ido-rotate nil)
(setq ido-text "")
! (if ido-set-default-item
! (setq ido-default-item
! (cond
! ((eq item 'buffer)
! (if (bufferp default) (buffer-name default) default))
! ((stringp default) default)
! ((eq item 'file)
! (and ido-enable-last-directory-history
! (let ((d (assoc ido-current-directory
ido-last-directory-list)))
! (and d (cdr d))))))
! ido-set-default-item nil))
(if ido-process-ignore-lists-inhibit
(setq ido-process-ignore-lists nil))
--- 1456,1474 ----
(setq ido-rescan t)
(setq ido-rotate nil)
(setq ido-text "")
! (when ido-set-default-item
! (setq ido-default-item
! (cond
! ((eq item 'buffer)
! (if (bufferp default) (buffer-name default) default))
! ((stringp default) default)
! ((eq item 'file)
! (and ido-enable-last-directory-history
! (let ((d (assoc ido-current-directory
ido-last-directory-list)))
! (and d (cdr d)))))))
! (if (member ido-default-item ido-ignore-item-temp-list)
! (setq ido-default-item nil))
! (setq ido-set-default-item nil))
(if ido-process-ignore-lists-inhibit
(setq ido-process-ignore-lists nil))
***************
*** 1620,1632 ****
(t
(setq ido-selected
! (if (and ido-matches (equal ido-final-text ""))
! (ido-name (car ido-matches)) ;; possibly choose the default
file
! (if (or (eq ido-exit 'takeprompt)
! (null ido-matches))
! ido-final-text
! ;; else take head of list
! (ido-name (car ido-matches)))))
(cond
((eq item 'buffer)
--- 1627,1637 ----
(t
(setq ido-selected
! (if (or (eq ido-exit 'takeprompt)
! (null ido-matches))
! ido-final-text
! ;; else take head of list
! (ido-name (car ido-matches))))
(cond
((eq item 'buffer)
***************
*** 1641,1647 ****
(or (ido-is-root-directory)
(ido-set-current-directory (file-name-directory (substring
ido-current-directory 0 -1))))
(setq ido-set-default-item t))
-
((and (string-equal ido-current-directory "/")
(string-match "..:\\'" ido-selected)) ;; Ange-ftp
(ido-set-current-directory "/" ido-selected)
--- 1646,1651 ----
***************
*** 1700,1705 ****
--- 1704,1710 ----
;; Check buf is non-nil.
((not buf) nil)
+ ((= (length buf) 0) nil)
;; View buffer if it exists
((get-buffer buf)
***************
*** 2526,2532 ****
(mapcar
(lambda (x)
(let ((name (buffer-name x)))
! (if (not (or (ido-ignore-item-p name ido-ignore-buffers) (memq
name visible)))
name)))
(buffer-list frame))))
--- 2531,2537 ----
(mapcar
(lambda (x)
(let ((name (buffer-name x)))
! (if (not (or (ido-ignore-item-p name ido-ignore-buffers) (member
name visible)))
name)))
(buffer-list frame))))
***************
*** 2716,2727 ****
(defun ido-get-bufname (win)
;; Used by `ido-get-buffers-in-frames' to walk through all windows
(let ((buf (buffer-name (window-buffer win))))
! (if (not (member buf ido-bufs-in-frame))
! ;; Only add buf if it is not already in list.
! ;; This prevents same buf in two different windows being
! ;; put into the list twice.
! (setq ido-bufs-in-frame
! (cons buf ido-bufs-in-frame)))))
;;; FIND MATCHING ITEMS
--- 2721,2733 ----
(defun ido-get-bufname (win)
;; Used by `ido-get-buffers-in-frames' to walk through all windows
(let ((buf (buffer-name (window-buffer win))))
! (unless (or (member buf ido-bufs-in-frame)
! (member buf ido-ignore-item-temp-list))
! ;; Only add buf if it is not already in list.
! ;; This prevents same buf in two different windows being
! ;; put into the list twice.
! (setq ido-bufs-in-frame
! (cons buf ido-bufs-in-frame)))))
;;; FIND MATCHING ITEMS
***************
*** 2777,2783 ****
(defun ido-ignore-item-p (name re-list &optional ignore-ext)
;; Return t if the buffer or file NAME should be ignored.
! (and ido-process-ignore-lists re-list
(let ((data (match-data))
(ext-list (and ignore-ext ido-ignore-extensions
completion-ignored-extensions))
--- 2783,2791 ----
(defun ido-ignore-item-p (name re-list &optional ignore-ext)
;; Return t if the buffer or file NAME should be ignored.
! (or (member name ido-ignore-item-temp-list)
! (and
! ido-process-ignore-lists re-list
(let ((data (match-data))
(ext-list (and ignore-ext ido-ignore-extensions
completion-ignored-extensions))
***************
*** 2808,2814 ****
(if ignorep
(setq ido-ignored-list (cons name ido-ignored-list)))
(set-match-data data)
! ignorep)))
;; Private variable used by `ido-word-matching-substring'.
--- 2816,2822 ----
(if ignorep
(setq ido-ignored-list (cons name ido-ignored-list)))
(set-match-data data)
! ignorep))))
;; Private variable used by `ido-word-matching-substring'.
***************
*** 3009,3015 ****
;; If BUFFER is visible in the current frame, return nil.
(let ((blist (ido-get-buffers-in-frames 'current)))
;;If the buffer is visible in current frame, return nil
! (if (memq buffer blist)
nil
;; maybe in other frame or icon
(get-buffer-window buffer 0) ; better than 'visible
--- 3017,3023 ----
;; If BUFFER is visible in the current frame, return nil.
(let ((blist (ido-get-buffers-in-frames 'current)))
;;If the buffer is visible in current frame, return nil
! (if (member buffer blist)
nil
;; maybe in other frame or icon
(get-buffer-window buffer 0) ; better than 'visible
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/ido.el,
Kim F. Storm <=