Mercurial > emacs
comparison lisp/simple.el @ 89961:3fd4a5c21153
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-29
Merge from lorentey@elte.hu--2004/emacs--multi-tty--0, emacs--cvs-trunk--0
Patches applied:
* lorentey@elte.hu--2004/emacs--multi-tty--0--patch-224
Added sorted-doc to backup regex in lib-src.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-479
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-482
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-483
Build-in-place tweak
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-484
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-485
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 10 Aug 2004 07:46:40 +0000 |
parents | c08afac24467 05c3cf703d59 |
children | d8411455de48 |
comparison
equal
deleted
inserted
replaced
89960:d79ab6afded5 | 89961:3fd4a5c21153 |
---|---|
4302 The idea of `completions-common-part' is that you can use it to | 4302 The idea of `completions-common-part' is that you can use it to |
4303 make the common parts less visible than normal, so that the rest | 4303 make the common parts less visible than normal, so that the rest |
4304 of the differing parts is, by contrast, slightly highlighted." | 4304 of the differing parts is, by contrast, slightly highlighted." |
4305 :group 'completion) | 4305 :group 'completion) |
4306 | 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 | |
4307 (defun completion-setup-function () | 4313 (defun completion-setup-function () |
4308 (let ((mainbuf (current-buffer)) | 4314 (let ((mainbuf (current-buffer)) |
4309 (mbuf-contents (minibuffer-contents))) | 4315 (mbuf-contents (minibuffer-contents))) |
4310 ;; When reading a file name in the minibuffer, | 4316 ;; When reading a file name in the minibuffer, |
4311 ;; set default-directory in the minibuffer | 4317 ;; set default-directory in the minibuffer |
4330 ;; last file name component. | 4336 ;; last file name component. |
4331 (setq completion-base-size | 4337 (setq completion-base-size |
4332 (with-current-buffer mainbuf | 4338 (with-current-buffer mainbuf |
4333 (save-excursion | 4339 (save-excursion |
4334 (goto-char (point-max)) | 4340 (goto-char (point-max)) |
4335 (skip-chars-backward "^/") | 4341 (skip-chars-backward completion-root-regexp) |
4336 (- (point) (minibuffer-prompt-end))))) | 4342 (- (point) (minibuffer-prompt-end))))) |
4337 ;; Otherwise, in minibuffer, the whole input is being completed. | 4343 ;; Otherwise, in minibuffer, the whole input is being completed. |
4338 (if (minibufferp mainbuf) | 4344 (if (minibufferp mainbuf) |
4339 (setq completion-base-size 0))) | 4345 (setq completion-base-size 0))) |
4340 ;; Put faces on first uncommon characters and common parts. | 4346 ;; Put faces on first uncommon characters and common parts. |