emacs-diffs
[Top][All Lists]
Advanced

[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: Sat, 11 Sep 2004 20:08:49 -0400

Index: emacs/lisp/ido.el
diff -c emacs/lisp/ido.el:1.40 emacs/lisp/ido.el:1.41
*** emacs/lisp/ido.el:1.40      Sun Aug 22 10:58:16 2004
--- emacs/lisp/ido.el   Sat Sep 11 21:43:42 2004
***************
*** 482,495 ****
    :group 'ido)
  
  (defcustom ido-enable-prefix nil
!   "*Nil means that `ido' will match if the inserted text is an
! arbitrary substring (default). If non-nil `ido' will only match if the 
inserted
! text is a prefix \(this behavior is like the standard unix- or
! emacs-completion works).
  Value can be toggled within `ido' using `ido-toggle-prefix'."
    :type 'boolean
    :group 'ido)
  
  (defcustom ido-confirm-unique-completion nil
    "*Non-nil means that even a unique completion must be confirmed.
  This means that \\[ido-complete] must always be followed by 
\\[ido-exit-minibuffer]
--- 482,501 ----
    :group 'ido)
  
  (defcustom ido-enable-prefix nil
!   "*Non-nil means only match if the entered text is a prefix of file name.
! This behavior is like the standard emacs-completion.
! Nil means to match if the entered text is an arbitrary substring.
  Value can be toggled within `ido' using `ido-toggle-prefix'."
    :type 'boolean
    :group 'ido)
  
+ (defcustom ido-enable-dot-prefix nil
+   "*Non-nil means to match leading dot as prefix.
+ I.e. hidden files and buffers will match only if you type a dot
+ as first char even if `ido-enable-prefix' is nil."
+   :type 'boolean
+   :group 'ido)
+ 
  (defcustom ido-confirm-unique-completion nil
    "*Non-nil means that even a unique completion must be confirmed.
  This means that \\[ido-complete] must always be followed by 
\\[ido-exit-minibuffer]
***************
*** 2928,2940 ****
                       (concat "\\`" re "\\'")))
         (prefix-re (and full-re (not ido-enable-prefix)
                         (concat "\\`" rexq)))
         full-matches
         prefix-matches
         matches)
      (mapcar
       (lambda (item)
         (let ((name (ido-name item)))
!        (if (string-match re name)
             (cond
              ((and full-re (string-match full-re name))
               (setq full-matches (cons item full-matches)))
--- 2934,2955 ----
                       (concat "\\`" re "\\'")))
         (prefix-re (and full-re (not ido-enable-prefix)
                         (concat "\\`" rexq)))
+        (non-prefix-dot (or (not ido-enable-dot-prefix)
+                            (not ido-process-ignore-lists)
+                            ido-enable-prefix
+                            (= (length ido-text) 0)))
+ 
         full-matches
         prefix-matches
         matches)
      (mapcar
       (lambda (item)
         (let ((name (ido-name item)))
!        (if (and (or non-prefix-dot
!                     (if (= (aref ido-text 0) ?.)
!                         (= (aref name 0) ?.)
!                       (/= (aref name 0) ?.)))
!                 (string-match re name))
             (cond
              ((and full-re (string-match full-re name))
               (setq full-matches (cons item full-matches)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]