[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/simple.el
From: |
Masatake YAMATO |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/simple.el |
Date: |
Sun, 16 Oct 2005 05:32:06 -0400 |
Index: emacs/lisp/simple.el
diff -c emacs/lisp/simple.el:1.754 emacs/lisp/simple.el:1.755
*** emacs/lisp/simple.el:1.754 Thu Oct 6 06:55:45 2005
--- emacs/lisp/simple.el Sun Oct 16 09:31:47 2005
***************
*** 4844,4853 ****
"Normal hook run at the end of setting up a completion list buffer.
When this hook is run, the current buffer is the one in which the
command to display the completion list buffer was run.
! The completion list buffer is available as the value of `standard-output'.")
- ;; This function goes in completion-setup-hook, so that it is called
- ;; after the text of the completion list buffer is written.
(defface completions-first-difference
'((t (:inherit bold)))
"Face put on the first uncommon character in completions in *Completions*
buffer."
--- 4844,4856 ----
"Normal hook run at the end of setting up a completion list buffer.
When this hook is run, the current buffer is the one in which the
command to display the completion list buffer was run.
! The completion list buffer is available as the value of `standard-output'.
! The common prefix substring for completion may be available as the
! value of `completion-common-substring'. See also `display-completion-list'.")
!
!
! ;; Variables and faces used in `completion-setup-function'.
(defface completions-first-difference
'((t (:inherit bold)))
"Face put on the first uncommon character in completions in *Completions*
buffer."
***************
*** 4867,4872 ****
--- 4870,4886 ----
(defvar completion-root-regexp "^/"
"Regexp to use in `completion-setup-function' to find the root directory.")
+ (defvar completion-common-substring nil
+ "Common prefix substring to use in `completion-setup-function' to put faces.
+ The value is set by `display-completion-list' during running
`completion-setup-hook'.
+
+ To put faces, `completions-first-difference' and `completions-common-part'
+ into \"*Completions*\* buffer, the common prefix substring in completions is
+ needed as a hint. (Minibuffer is a special case. The content of minibuffer
itself
+ is the substring.)")
+
+ ;; This function goes in completion-setup-hook, so that it is called
+ ;; after the text of the completion list buffer is written.
(defun completion-setup-function ()
(let ((mainbuf (current-buffer))
(mbuf-contents (minibuffer-contents)))
***************
*** 4905,4913 ****
(funcall (get minibuffer-completion-table
'completion-base-size-function)))
(setq completion-base-size 0))))
;; Put faces on first uncommon characters and common parts.
! (when completion-base-size
(let* ((common-string-length
! (- (length mbuf-contents) completion-base-size))
(element-start (next-single-property-change
(point-min)
'mouse-face))
--- 4919,4929 ----
(funcall (get minibuffer-completion-table
'completion-base-size-function)))
(setq completion-base-size 0))))
;; Put faces on first uncommon characters and common parts.
! (when (or completion-base-size completion-common-substring)
(let* ((common-string-length
! (if completion-base-size
! (- (length mbuf-contents) completion-base-size)
! (length completion-common-substring)))
(element-start (next-single-property-change
(point-min)
'mouse-face))
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Richard M . Stallman, 2005/10/01
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Kenichi Handa, 2005/10/06
- [Emacs-diffs] Changes to emacs/lisp/simple.el,
Masatake YAMATO <=
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Juri Linkov, 2005/10/21
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Richard M . Stallman, 2005/10/23
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Masatake YAMATO, 2005/10/24
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Richard M . Stallman, 2005/10/29