all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: Patch for completion-setup-function
Date: Mon, 26 Jul 2004 17:58:46 -0600	[thread overview]
Message-ID: <41059AB6.9010907@yahoo.com> (raw)
In-Reply-To: 29170.1090780565@trantor.xilinx.com

Satyaki Das wrote:
 > Recently, I noticed the nifty highlighting for the first letter
 > that differs among the available choices during file completion.
 > This feature doesn't work perfectly for MH-E folder completion
 > since the regexp to recognize the root is hardcoded.
 >
 > The attached patch to simple.el changes this.  If this patch were
 > applied then I could just bind the variable and make the
 > highlighting work better in MH-E.

completion-root-regexp should be renamed to something like
completion-root-chars, since it's not a true regexp.

Or perhaps it could be defined as a regexp and skipped via
re-search-backward.

 > Index: simple.el
 > ===================================================================
 > RCS file: /cvsroot/emacs/emacs/lisp/simple.el,v
 > retrieving revision 1.651
 > diff -u -r1.651 simple.el
 > --- simple.el	23 Jul 2004 11:52:03 -0000	1.651
 > +++ simple.el	25 Jul 2004 18:26:52 -0000
 > @@ -4304,6 +4304,8 @@
 >  of the differing parts is, by contrast, slightly highlighted."
 >    :group 'completion)
 >
 > +(defvar completion-root-regexp "^/")
 > +
 >  (defun completion-setup-function ()
 >    (let ((mainbuf (current-buffer))
 >  	(mbuf-contents (minibuffer-contents)))
 > @@ -4332,7 +4334,7 @@
 >  		(with-current-buffer mainbuf
 >  		  (save-excursion
 >  		    (goto-char (point-max))
 > -		    (skip-chars-backward "^/")
 > +		    (skip-chars-backward completion-root-regexp)
 >  		    (- (point) (minibuffer-prompt-end)))))
 >  	;; Otherwise, in minibuffer, the whole input is being completed.
 >  	(if (minibufferp mainbuf)

-- 
Kevin Rodgers

  reply	other threads:[~2004-07-26 23:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-25 18:36 Patch for completion-setup-function Satyaki Das
2004-07-26 23:58 ` Kevin Rodgers [this message]
2004-07-27  0:40   ` Satyaki Das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41059AB6.9010907@yahoo.com \
    --to=ihs_4664@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.