unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* `ido.el' improvement
@ 2004-09-11 22:16 Paul Pogonyshev
  2004-09-13  7:00 ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Pogonyshev @ 2004-09-11 22:16 UTC (permalink / raw)


Hi.

Will you mind this change (basically explained in
`defcustom's comment)?  Note that it doesn't change
`ido's default behaviour and so must be acceptable
even now.  It is also very simple.

Paul


2004-09-11  Paul Pogonyshev  <pogonyshev@gmx.net>

	* ido.el (ido-match-leading-dot): New defcustom.
	(ido-set-matches1): Add handling of `ido-match-leading-dot'
	option.


*** ido.el	22 Aug 2004 08:58:16 -0200	1.40
--- ido.el	11 Sep 2004 20:12:40 -0200	
***************
*** 490,495 ****
--- 490,503 ----
    :type 'boolean
    :group 'ido)
  
+ (defcustom ido-match-leading-dot nil
+   "*Non-nil means that `ido' will match leading dot as prefix
+ even if the rest of text is matched as substring.  I.e. hidden
+ files and corresponding buffers will match only if you type a dot
+ first."
+   :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)))
--- 2936,2954 ----
  		       (concat "\\`" re "\\'")))
  	 (prefix-re (and full-re (not ido-enable-prefix)
  			 (concat "\\`" rexq)))
+ 	 (dont-match-leading-dot (or (not ido-match-leading-dot)
+ 				     ido-enable-prefix
+ 				     (= (length ido-text) 0)))
  	 full-matches
  	 prefix-matches
  	 matches)
      (mapcar
       (lambda (item)
         (let ((name (ido-name item)))
! 	 (if (and (or dont-match-leading-dot
! 		      (funcall (if (= (aref ido-text 0) ?.) '= '/=)
! 			       (aref name 0) ?.))
! 		  (string-match re name))
  	     (cond
  	      ((and full-re (string-match full-re name))
  	       (setq full-matches (cons item full-matches)))

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: `ido.el' improvement
  2004-09-11 22:16 `ido.el' improvement Paul Pogonyshev
@ 2004-09-13  7:00 ` Richard Stallman
  2004-09-13  8:21   ` Kim F. Storm
  2004-09-13 18:20   ` Paul Pogonyshev
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Stallman @ 2004-09-13  7:00 UTC (permalink / raw)
  Cc: emacs-devel

    + (defcustom ido-match-leading-dot nil
    +   "*Non-nil means that `ido' will match leading dot as prefix
    + even if the rest of text is matched as substring.  I.e. hidden

Please keep in mind that the first line of a doc string
is supposed to stand on its own.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: `ido.el' improvement
  2004-09-13  7:00 ` Richard Stallman
@ 2004-09-13  8:21   ` Kim F. Storm
  2004-09-13 18:20   ` Paul Pogonyshev
  1 sibling, 0 replies; 4+ messages in thread
From: Kim F. Storm @ 2004-09-13  8:21 UTC (permalink / raw)
  Cc: emacs-devel, Paul Pogonyshev

Richard Stallman <rms@gnu.org> writes:

>     + (defcustom ido-match-leading-dot nil
>     +   "*Non-nil means that `ido' will match leading dot as prefix
>     + even if the rest of text is matched as substring.  I.e. hidden
>
> Please keep in mind that the first line of a doc string
> is supposed to stand on its own.

I fixed that before installing the change (slightly modified).

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: `ido.el' improvement
  2004-09-13  7:00 ` Richard Stallman
  2004-09-13  8:21   ` Kim F. Storm
@ 2004-09-13 18:20   ` Paul Pogonyshev
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Pogonyshev @ 2004-09-13 18:20 UTC (permalink / raw)
  Cc: emacs-devel


>     + (defcustom ido-match-leading-dot nil
>     +   "*Non-nil means that `ido' will match leading dot as prefix
>     + even if the rest of text is matched as substring.  I.e. hidden
>
> Please keep in mind that the first line of a doc string
> is supposed to stand on its own.

OK, I will.  Anyway, this was replaced with another
(similar) patch.

Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-09-13 18:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-11 22:16 `ido.el' improvement Paul Pogonyshev
2004-09-13  7:00 ` Richard Stallman
2004-09-13  8:21   ` Kim F. Storm
2004-09-13 18:20   ` Paul Pogonyshev

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).