[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/simple.el [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/simple.el [lexbind] |
Date: |
Sat, 04 Sep 2004 05:51:42 -0400 |
Index: emacs/lisp/simple.el
diff -c emacs/lisp/simple.el:1.551.2.22 emacs/lisp/simple.el:1.551.2.23
*** emacs/lisp/simple.el:1.551.2.22 Sat Sep 4 09:18:38 2004
--- emacs/lisp/simple.el Sat Sep 4 09:21:44 2004
***************
*** 4304,4309 ****
--- 4304,4315 ----
of the differing parts is, by contrast, slightly highlighted."
:group 'completion)
+ ;; This is for packages that need to bind it to a non-default regexp
+ ;; in order to make the first-differing character highlight work
+ ;; to their liking
+ (defvar completion-root-regexp "^/"
+ "Regexp to use in `completion-setup-function' to find the root directory.")
+
(defun completion-setup-function ()
(let ((mainbuf (current-buffer))
(mbuf-contents (minibuffer-contents)))
***************
*** 4332,4338 ****
(with-current-buffer mainbuf
(save-excursion
(goto-char (point-max))
! (skip-chars-backward "^/")
(- (point) (minibuffer-prompt-end)))))
;; Otherwise, in minibuffer, the whole input is being completed.
(if (minibufferp mainbuf)
--- 4338,4344 ----
(with-current-buffer mainbuf
(save-excursion
(goto-char (point-max))
! (skip-chars-backward completion-root-regexp)
(- (point) (minibuffer-prompt-end)))))
;; Otherwise, in minibuffer, the whole input is being completed.
(if (minibufferp mainbuf)