diff options
| author | Lute Kamstra | 2005-04-28 11:48:53 +0000 |
|---|---|---|
| committer | Lute Kamstra | 2005-04-28 11:48:53 +0000 |
| commit | 95965740cf51d558b20b5ddb144d9b0040460cb2 (patch) | |
| tree | 423a3699f7077ef2360aa7e9102d2493d8f35ff1 | |
| parent | 18acc6552310054e3d450c0a3b38b9a0ba679c58 (diff) | |
| download | emacs-95965740cf51d558b20b5ddb144d9b0040460cb2.tar.gz emacs-95965740cf51d558b20b5ddb144d9b0040460cb2.zip | |
(font-lock-add-keywords, font-lock-remove-keywords): Clarify docstring.
(font-lock-keywords-alist, font-lock-removed-keywords-alist):
Don't start docstrings with a `*'.
(font-lock-update-removed-keyword-alist): Give it a docstring.
| -rw-r--r-- | lisp/font-lock.el | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 9c5851abd2f..19a5f6a2f4b 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -466,12 +466,12 @@ user-level keywords, but normally their values have been | |||
| 466 | optimized.") | 466 | optimized.") |
| 467 | 467 | ||
| 468 | (defvar font-lock-keywords-alist nil | 468 | (defvar font-lock-keywords-alist nil |
| 469 | "*Alist of `font-lock-keywords' local to a `major-mode'. | 469 | "Alist of `font-lock-keywords' local to a `major-mode'. |
| 470 | This is normally set via `font-lock-add-keywords' and | 470 | This is normally set via `font-lock-add-keywords' and |
| 471 | `font-lock-remove-keywords'.") | 471 | `font-lock-remove-keywords'.") |
| 472 | 472 | ||
| 473 | (defvar font-lock-removed-keywords-alist nil | 473 | (defvar font-lock-removed-keywords-alist nil |
| 474 | "*Alist of `font-lock-keywords' removed from `major-mode'. | 474 | "Alist of `font-lock-keywords' removed from `major-mode'. |
| 475 | This is normally set via `font-lock-add-keywords' and | 475 | This is normally set via `font-lock-add-keywords' and |
| 476 | `font-lock-remove-keywords'.") | 476 | `font-lock-remove-keywords'.") |
| 477 | 477 | ||
| @@ -664,9 +664,9 @@ For example: | |||
| 664 | adds two fontification patterns for C mode, to fontify `FIXME:' words, even in | 664 | adds two fontification patterns for C mode, to fontify `FIXME:' words, even in |
| 665 | comments, and to fontify `and', `or' and `not' words as keywords. | 665 | comments, and to fontify `and', `or' and `not' words as keywords. |
| 666 | 666 | ||
| 667 | When used from an elisp package (such as a minor mode), it is recommended | 667 | When used from a Lisp program (such as a minor mode), it is recommended to |
| 668 | to use nil for MODE (and place the call in a loop or on a hook) to avoid | 668 | use nil for MODE (and place the call on a hook) to avoid subtle problems |
| 669 | subtle problems due to details of the implementation. | 669 | due to details of the implementation. |
| 670 | 670 | ||
| 671 | Note that some modes have specialized support for additional patterns, e.g., | 671 | Note that some modes have specialized support for additional patterns, e.g., |
| 672 | see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', | 672 | see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', |
| @@ -707,9 +707,7 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', | |||
| 707 | (font-lock-compile-keywords font-lock-keywords t))))))) | 707 | (font-lock-compile-keywords font-lock-keywords t))))))) |
| 708 | 708 | ||
| 709 | (defun font-lock-update-removed-keyword-alist (mode keywords append) | 709 | (defun font-lock-update-removed-keyword-alist (mode keywords append) |
| 710 | ;; Update `font-lock-removed-keywords-alist' when adding new | 710 | "Update `font-lock-removed-keywords-alist' when adding new KEYWORDS to MODE." |
| 711 | ;; KEYWORDS to MODE. | ||
| 712 | ;; | ||
| 713 | ;; When font-lock is enabled first all keywords in the list | 711 | ;; When font-lock is enabled first all keywords in the list |
| 714 | ;; `font-lock-keywords-alist' are added, then all keywords in the | 712 | ;; `font-lock-keywords-alist' are added, then all keywords in the |
| 715 | ;; list `font-lock-removed-keywords-alist' are removed. If a | 713 | ;; list `font-lock-removed-keywords-alist' are removed. If a |
| @@ -757,9 +755,9 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', | |||
| 757 | MODE should be a symbol, the major mode command name, such as `c-mode' | 755 | MODE should be a symbol, the major mode command name, such as `c-mode' |
| 758 | or nil. If nil, highlighting keywords are removed for the current buffer. | 756 | or nil. If nil, highlighting keywords are removed for the current buffer. |
| 759 | 757 | ||
| 760 | When used from an elisp package (such as a minor mode), it is recommended | 758 | When used from a Lisp program (such as a minor mode), it is recommended to |
| 761 | to use nil for MODE (and place the call in a loop or on a hook) to avoid | 759 | use nil for MODE (and place the call on a hook) to avoid subtle problems |
| 762 | subtle problems due to details of the implementation." | 760 | due to details of the implementation." |
| 763 | (cond (mode | 761 | (cond (mode |
| 764 | ;; Remove one keyword at the time. | 762 | ;; Remove one keyword at the time. |
| 765 | (dolist (keyword keywords) | 763 | (dolist (keyword keywords) |