diff options
| author | Glenn Morris | 2014-02-27 21:29:45 -0800 |
|---|---|---|
| committer | Glenn Morris | 2014-02-27 21:29:45 -0800 |
| commit | 5e618aba8ba6a0d780b9f7ef549eba021827bff4 (patch) | |
| tree | bdc3767cf6d34787660085b2b6c84fbd11162f40 | |
| parent | ecc384ac0abed461ae29a762261b1d69fc903093 (diff) | |
| download | emacs-5e618aba8ba6a0d780b9f7ef549eba021827bff4.tar.gz emacs-5e618aba8ba6a0d780b9f7ef549eba021827bff4.zip | |
Some doc fixes for completion-hilit-commonality and friends
* lisp/minibuffer.el (completions-first-difference)
(completions-common-part, completion-hilit-commonality): Doc fixes.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 21 |
2 files changed, 21 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6d8c296d366..65dbcf65e6e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-02-28 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * minibuffer.el (completions-first-difference) | ||
| 4 | (completions-common-part, completion-hilit-commonality): Doc fixes. | ||
| 5 | |||
| 1 | 2014-02-28 Karl Berry <karl@gnu.org> | 6 | 2014-02-28 Karl Berry <karl@gnu.org> |
| 2 | 7 | ||
| 3 | * info.el (Info-mode-map): Add H for describe-mode, | 8 | * info.el (Info-mode-map): Add H for describe-mode, |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 88ab94f0521..c888721fb49 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -1576,15 +1576,26 @@ See also `display-completion-list'.") | |||
| 1576 | 1576 | ||
| 1577 | (defface completions-first-difference | 1577 | (defface completions-first-difference |
| 1578 | '((t (:inherit bold))) | 1578 | '((t (:inherit bold))) |
| 1579 | "Face added on the first uncommon character in completions in *Completions* buffer.") | 1579 | "Face for the first uncommon character in completions. |
| 1580 | See also the face `completions-common-part'.") | ||
| 1580 | 1581 | ||
| 1581 | (defface completions-common-part '((t nil)) | 1582 | (defface completions-common-part '((t nil)) |
| 1582 | "Face added on the common prefix substring in completions in *Completions* buffer. | 1583 | "Face for the common prefix substring in completions. |
| 1583 | The idea of `completions-common-part' is that you can use it to | 1584 | The idea of this face is that you can use it to make the common parts |
| 1584 | make the common parts less visible than normal, so that the rest | 1585 | less visible than normal, so that the differing parts are emphasized |
| 1585 | of the differing parts is, by contrast, slightly highlighted.") | 1586 | by contrast. |
| 1587 | See also the face `completions-first-difference'.") | ||
| 1586 | 1588 | ||
| 1587 | (defun completion-hilit-commonality (completions prefix-len base-size) | 1589 | (defun completion-hilit-commonality (completions prefix-len base-size) |
| 1590 | "Apply font-lock highlighting to a list of completions, COMPLETIONS. | ||
| 1591 | PREFIX-LEN is an integer. BASE-SIZE is an integer or nil (meaning zero). | ||
| 1592 | |||
| 1593 | This adds the face `completions-common-part' to the first | ||
| 1594 | \(PREFIX-LEN - BASE-SIZE) characters of each completion, and the face | ||
| 1595 | `completions-first-difference' to the first character after that. | ||
| 1596 | |||
| 1597 | It returns a list with font-lock properties applied to each element, | ||
| 1598 | and with BASE-SIZE appended as the last element." | ||
| 1588 | (when completions | 1599 | (when completions |
| 1589 | (let ((com-str-len (- prefix-len (or base-size 0)))) | 1600 | (let ((com-str-len (- prefix-len (or base-size 0)))) |
| 1590 | (nconc | 1601 | (nconc |