aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2014-02-08 19:25:19 -0800
committerLars Ingebrigtsen2014-02-08 19:25:19 -0800
commitdd1631238d444827387480c84d64d4e7bf6ad0ed (patch)
treea7deeecf297ba252d40357948debb4387be1082f
parent2356b3168710ec6dc01f611557ea3af78d143c58 (diff)
downloademacs-dd1631238d444827387480c84d64d4e7bf6ad0ed.tar.gz
emacs-dd1631238d444827387480c84d64d4e7bf6ad0ed.zip
* font-lock.el (font-lock-value-in-major-mode): Doc fix
Clarify the meaning of the parameter. Fixes: debbugs:12282
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/font-lock.el14
2 files changed, 11 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6e55544253f..91a85c9b04a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12014-02-09 Lars Ingebrigtsen <larsi@gnus.org> 12014-02-09 Lars Ingebrigtsen <larsi@gnus.org>
2 2
3 * font-lock.el (font-lock-value-in-major-mode): Clarify the
4 meaning of the parameter (bug#12282).
5
3 * files.el (find-file-noselect): Clarify prompt when changing 6 * files.el (find-file-noselect): Clarify prompt when changing
4 readedness (bug#13261). 7 readedness (bug#13261).
5 (locate-file): Suffixes aren't returned, so don't say that they 8 (locate-file): Suffixes aren't returned, so don't say that they
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 7e9131df185..11a8466a4d6 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1764,12 +1764,14 @@ If SYNTACTIC-KEYWORDS is non-nil, it means these keywords are used for
1764 (funcall keywords) 1764 (funcall keywords)
1765 (eval keywords))))) 1765 (eval keywords)))))
1766 1766
1767(defun font-lock-value-in-major-mode (alist) 1767(defun font-lock-value-in-major-mode (values)
1768 "Return value in ALIST for `major-mode', or ALIST if it is not an alist. 1768 "If VALUES is an list, use `major-mode' as a key and return the `assq' value.
1769Structure is ((MAJOR-MODE . VALUE) ...) where MAJOR-MODE may be t." 1769VALUES should then be an alist on the form ((MAJOR-MODE . VALUE) ...) where
1770 (if (consp alist) 1770MAJOR-MODE may be t.
1771 (cdr (or (assq major-mode alist) (assq t alist))) 1771If VALUES isn't a list, return VALUES."
1772 alist)) 1772 (if (consp values)
1773 (cdr (or (assq major-mode values) (assq t values)))
1774 values))
1773 1775
1774(defun font-lock-choose-keywords (keywords level) 1776(defun font-lock-choose-keywords (keywords level)
1775 "Return LEVELth element of KEYWORDS. 1777 "Return LEVELth element of KEYWORDS.