mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
* font-lock.el (font-lock-value-in-major-mode): Doc fix
Clarify the meaning of the parameter. Fixes: debbugs:12282
This commit is contained in:
parent
2356b31687
commit
dd1631238d
2 changed files with 11 additions and 6 deletions
|
|
@ -1,5 +1,8 @@
|
|||
2014-02-09 Lars Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* font-lock.el (font-lock-value-in-major-mode): Clarify the
|
||||
meaning of the parameter (bug#12282).
|
||||
|
||||
* files.el (find-file-noselect): Clarify prompt when changing
|
||||
readedness (bug#13261).
|
||||
(locate-file): Suffixes aren't returned, so don't say that they
|
||||
|
|
|
|||
|
|
@ -1764,12 +1764,14 @@ If SYNTACTIC-KEYWORDS is non-nil, it means these keywords are used for
|
|||
(funcall keywords)
|
||||
(eval keywords)))))
|
||||
|
||||
(defun font-lock-value-in-major-mode (alist)
|
||||
"Return value in ALIST for `major-mode', or ALIST if it is not an alist.
|
||||
Structure is ((MAJOR-MODE . VALUE) ...) where MAJOR-MODE may be t."
|
||||
(if (consp alist)
|
||||
(cdr (or (assq major-mode alist) (assq t alist)))
|
||||
alist))
|
||||
(defun font-lock-value-in-major-mode (values)
|
||||
"If VALUES is an list, use `major-mode' as a key and return the `assq' value.
|
||||
VALUES should then be an alist on the form ((MAJOR-MODE . VALUE) ...) where
|
||||
MAJOR-MODE may be t.
|
||||
If VALUES isn't a list, return VALUES."
|
||||
(if (consp values)
|
||||
(cdr (or (assq major-mode values) (assq t values)))
|
||||
values))
|
||||
|
||||
(defun font-lock-choose-keywords (keywords level)
|
||||
"Return LEVELth element of KEYWORDS.
|
||||
|
|
|
|||
Loading…
Reference in a new issue