/[emacs]/emacs/lisp/simple.el
ViewVC logotype

Diff of /emacs/lisp/simple.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.551.2.22 by miles, Sat Sep 4 09:18:38 2004 UTC revision 1.551.2.23 by miles, Sat Sep 4 09:21:44 2004 UTC
# Line 4304  make the common parts less visible than Line 4304  make the common parts less visible than
4304  of the differing parts is, by contrast, slightly highlighted."  of the differing parts is, by contrast, slightly highlighted."
4305    :group 'completion)    :group 'completion)
4306    
4307    ;; This is for packages that need to bind it to a non-default regexp
4308    ;; in order to make the first-differing character highlight work
4309    ;; to their liking
4310    (defvar completion-root-regexp "^/"
4311      "Regexp to use in `completion-setup-function' to find the root directory.")
4312    
4313  (defun completion-setup-function ()  (defun completion-setup-function ()
4314    (let ((mainbuf (current-buffer))    (let ((mainbuf (current-buffer))
4315          (mbuf-contents (minibuffer-contents)))          (mbuf-contents (minibuffer-contents)))
# Line 4332  of the differing parts is, by contrast, Line 4338  of the differing parts is, by contrast,
4338                  (with-current-buffer mainbuf                  (with-current-buffer mainbuf
4339                    (save-excursion                    (save-excursion
4340                      (goto-char (point-max))                      (goto-char (point-max))
4341                      (skip-chars-backward "^/")                      (skip-chars-backward completion-root-regexp)
4342                      (- (point) (minibuffer-prompt-end)))))                      (- (point) (minibuffer-prompt-end)))))
4343          ;; Otherwise, in minibuffer, the whole input is being completed.          ;; Otherwise, in minibuffer, the whole input is being completed.
4344          (if (minibufferp mainbuf)          (if (minibufferp mainbuf)

Legend:
Removed from v.1.551.2.22  
changed lines
  Added in v.1.551.2.23

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26