Mercurial > emacs
comparison lisp/font-lock.el @ 78492:7c8949dbfa0d
Replace `iff' in doc-strings and comments.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 08 Aug 2007 07:38:50 +0000 |
parents | 9355f9b7bbff |
children | f99fcd1db425 e5a68f18fcb9 |
comparison
equal
deleted
inserted
replaced
78491:3ccc56d2b79e | 78492:7c8949dbfa0d |
---|---|
353 (MATCHER HIGHLIGHT ...) | 353 (MATCHER HIGHLIGHT ...) |
354 (eval . FORM) | 354 (eval . FORM) |
355 | 355 |
356 where MATCHER can be either the regexp to search for, or the function name to | 356 where MATCHER can be either the regexp to search for, or the function name to |
357 call to make the search (called with one argument, the limit of the search; | 357 call to make the search (called with one argument, the limit of the search; |
358 it should return non-nil, move point, and set `match-data' appropriately iff | 358 it should return non-nil, move point, and set `match-data' appropriately if |
359 it succeeds; like `re-search-forward' would). | 359 it succeeds; like `re-search-forward' would). |
360 MATCHER regexps can be generated via the function `regexp-opt'. | 360 MATCHER regexps can be generated via the function `regexp-opt'. |
361 | 361 |
362 FORM is an expression, whose value should be a keyword element, evaluated when | 362 FORM is an expression, whose value should be a keyword element, evaluated when |
363 the keyword is (first) used in a buffer. This feature can be used to provide a | 363 the keyword is (first) used in a buffer. This feature can be used to provide a |
1066 the problem of /identification/ of multiline elements by providing a function | 1066 the problem of /identification/ of multiline elements by providing a function |
1067 that tries to find such elements and move the boundaries such that they do | 1067 that tries to find such elements and move the boundaries such that they do |
1068 not fall in the middle of one. | 1068 not fall in the middle of one. |
1069 Each function is called with no argument; it is expected to adjust the | 1069 Each function is called with no argument; it is expected to adjust the |
1070 dynamically bound variables `font-lock-beg' and `font-lock-end'; and return | 1070 dynamically bound variables `font-lock-beg' and `font-lock-end'; and return |
1071 non-nil iff it did make such an adjustment. | 1071 non-nil if it did make such an adjustment. |
1072 These functions are run in turn repeatedly until they all return nil. | 1072 These functions are run in turn repeatedly until they all return nil. |
1073 Put first the functions more likely to cause a change and cheaper to compute.") | 1073 Put first the functions more likely to cause a change and cheaper to compute.") |
1074 ;; Mark it as a special hook which doesn't use any global setting | 1074 ;; Mark it as a special hook which doesn't use any global setting |
1075 ;; (i.e. doesn't obey the element t in the buffer-local value). | 1075 ;; (i.e. doesn't obey the element t in the buffer-local value). |
1076 (make-variable-buffer-local 'font-lock-extend-region-functions) | 1076 (make-variable-buffer-local 'font-lock-extend-region-functions) |
1744 (defvar font-lock-mode-major-mode) | 1744 (defvar font-lock-mode-major-mode) |
1745 (defun font-lock-set-defaults () | 1745 (defun font-lock-set-defaults () |
1746 "Set fontification defaults appropriately for this mode. | 1746 "Set fontification defaults appropriately for this mode. |
1747 Sets various variables using `font-lock-defaults' (or, if nil, using | 1747 Sets various variables using `font-lock-defaults' (or, if nil, using |
1748 `font-lock-defaults-alist') and `font-lock-maximum-decoration'." | 1748 `font-lock-defaults-alist') and `font-lock-maximum-decoration'." |
1749 ;; Set fontification defaults iff not previously set for correct major mode. | 1749 ;; Set fontification defaults if not previously set for correct major mode. |
1750 (unless (and font-lock-set-defaults | 1750 (unless (and font-lock-set-defaults |
1751 (eq font-lock-mode-major-mode major-mode)) | 1751 (eq font-lock-mode-major-mode major-mode)) |
1752 (setq font-lock-mode-major-mode major-mode) | 1752 (setq font-lock-mode-major-mode major-mode) |
1753 (set (make-local-variable 'font-lock-set-defaults) t) | 1753 (set (make-local-variable 'font-lock-set-defaults) t) |
1754 (make-local-variable 'font-lock-fontified) | 1754 (make-local-variable 'font-lock-fontified) |