diff options
| author | Richard M. Stallman | 2006-09-16 17:52:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-09-16 17:52:32 +0000 |
| commit | 533047c2e524edbe71de421312692fcbcb9d1fea (patch) | |
| tree | fc290cda1d7034991e7582f76179ef83e95dade2 | |
| parent | 641c0105e5eff1110b0119ac3df674992f2a892e (diff) | |
| download | emacs-533047c2e524edbe71de421312692fcbcb9d1fea.tar.gz emacs-533047c2e524edbe71de421312692fcbcb9d1fea.zip | |
(font-lock-compile-keywords): Rename optional arg to SYNTACTIC-KEYWORDS
and reverse the sense. All callers changed.
| -rw-r--r-- | lisp/font-lock.el | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 241a09b7908..a63d726d2fd 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -718,7 +718,7 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', | |||
| 718 | ;; If the keywords were compiled before, compile them again. | 718 | ;; If the keywords were compiled before, compile them again. |
| 719 | (if was-compiled | 719 | (if was-compiled |
| 720 | (setq font-lock-keywords | 720 | (setq font-lock-keywords |
| 721 | (font-lock-compile-keywords font-lock-keywords t))))))) | 721 | (font-lock-compile-keywords font-lock-keywords))))))) |
| 722 | 722 | ||
| 723 | (defun font-lock-update-removed-keyword-alist (mode keywords how) | 723 | (defun font-lock-update-removed-keyword-alist (mode keywords how) |
| 724 | "Update `font-lock-removed-keywords-alist' when adding new KEYWORDS to MODE." | 724 | "Update `font-lock-removed-keywords-alist' when adding new KEYWORDS to MODE." |
| @@ -825,7 +825,7 @@ happens, so the major mode can be corrected." | |||
| 825 | ;; If the keywords were compiled before, compile them again. | 825 | ;; If the keywords were compiled before, compile them again. |
| 826 | (if was-compiled | 826 | (if was-compiled |
| 827 | (setq font-lock-keywords | 827 | (setq font-lock-keywords |
| 828 | (font-lock-compile-keywords font-lock-keywords t))))))) | 828 | (font-lock-compile-keywords font-lock-keywords))))))) |
| 829 | 829 | ||
| 830 | ;;; Font Lock Support mode. | 830 | ;;; Font Lock Support mode. |
| 831 | 831 | ||
| @@ -1414,7 +1414,8 @@ START should be at the beginning of a line." | |||
| 1414 | ;; If `font-lock-syntactic-keywords' is not compiled, compile it. | 1414 | ;; If `font-lock-syntactic-keywords' is not compiled, compile it. |
| 1415 | (unless (eq (car font-lock-syntactic-keywords) t) | 1415 | (unless (eq (car font-lock-syntactic-keywords) t) |
| 1416 | (setq font-lock-syntactic-keywords (font-lock-compile-keywords | 1416 | (setq font-lock-syntactic-keywords (font-lock-compile-keywords |
| 1417 | font-lock-syntactic-keywords))) | 1417 | font-lock-syntactic-keywords |
| 1418 | t))) | ||
| 1418 | ;; Get down to business. | 1419 | ;; Get down to business. |
| 1419 | (let ((case-fold-search font-lock-keywords-case-fold-search) | 1420 | (let ((case-fold-search font-lock-keywords-case-fold-search) |
| 1420 | (keywords (cddr font-lock-syntactic-keywords)) | 1421 | (keywords (cddr font-lock-syntactic-keywords)) |
| @@ -1570,7 +1571,7 @@ START should be at the beginning of a line. | |||
| 1570 | LOUDLY, if non-nil, allows progress-meter bar." | 1571 | LOUDLY, if non-nil, allows progress-meter bar." |
| 1571 | (unless (eq (car font-lock-keywords) t) | 1572 | (unless (eq (car font-lock-keywords) t) |
| 1572 | (setq font-lock-keywords | 1573 | (setq font-lock-keywords |
| 1573 | (font-lock-compile-keywords font-lock-keywords t))) | 1574 | (font-lock-compile-keywords font-lock-keywords))) |
| 1574 | (let ((case-fold-search font-lock-keywords-case-fold-search) | 1575 | (let ((case-fold-search font-lock-keywords-case-fold-search) |
| 1575 | (keywords (cddr font-lock-keywords)) | 1576 | (keywords (cddr font-lock-keywords)) |
| 1576 | (bufname (buffer-name)) (count 0) | 1577 | (bufname (buffer-name)) (count 0) |
| @@ -1626,12 +1627,12 @@ LOUDLY, if non-nil, allows progress-meter bar." | |||
| 1626 | 1627 | ||
| 1627 | ;; Various functions. | 1628 | ;; Various functions. |
| 1628 | 1629 | ||
| 1629 | (defun font-lock-compile-keywords (keywords &optional regexp) | 1630 | (defun font-lock-compile-keywords (keywords &optional syntactic-keywords) |
| 1630 | "Compile KEYWORDS into the form (t KEYWORDS COMPILED...) | 1631 | "Compile KEYWORDS into the form (t KEYWORDS COMPILED...) |
| 1631 | Here each COMPILED is of the form (MATCHER HIGHLIGHT ...) as shown in the | 1632 | Here each COMPILED is of the form (MATCHER HIGHLIGHT ...) as shown in the |
| 1632 | `font-lock-keywords' doc string. | 1633 | `font-lock-keywords' doc string. |
| 1633 | If REGEXP is non-nil, it means these keywords are used for | 1634 | If SYNTACTIC-KEYWORDS is non-nil, it means these keywords are used for |
| 1634 | `font-lock-keywords' rather than for `font-lock-syntactic-keywords'." | 1635 | `font-lock-syntactic-keywords' rather than for `font-lock-keywords'." |
| 1635 | (if (not font-lock-set-defaults) | 1636 | (if (not font-lock-set-defaults) |
| 1636 | ;; This should never happen. But some external packages sometimes | 1637 | ;; This should never happen. But some external packages sometimes |
| 1637 | ;; call font-lock in unexpected and incorrect ways. It's important to | 1638 | ;; call font-lock in unexpected and incorrect ways. It's important to |
| @@ -1644,7 +1645,7 @@ If REGEXP is non-nil, it means these keywords are used for | |||
| 1644 | (setq keywords | 1645 | (setq keywords |
| 1645 | (cons t (cons keywords | 1646 | (cons t (cons keywords |
| 1646 | (mapcar 'font-lock-compile-keyword keywords)))) | 1647 | (mapcar 'font-lock-compile-keyword keywords)))) |
| 1647 | (if (and regexp | 1648 | (if (and (not syntactic-keywords) |
| 1648 | (eq (or syntax-begin-function | 1649 | (eq (or syntax-begin-function |
| 1649 | font-lock-beginning-of-syntax-function) | 1650 | font-lock-beginning-of-syntax-function) |
| 1650 | 'beginning-of-defun) | 1651 | 'beginning-of-defun) |
| @@ -1774,7 +1775,7 @@ Sets various variables using `font-lock-defaults' (or, if nil, using | |||
| 1774 | ;; Now compile the keywords. | 1775 | ;; Now compile the keywords. |
| 1775 | (unless (eq (car font-lock-keywords) t) | 1776 | (unless (eq (car font-lock-keywords) t) |
| 1776 | (setq font-lock-keywords | 1777 | (setq font-lock-keywords |
| 1777 | (font-lock-compile-keywords font-lock-keywords t)))))) | 1778 | (font-lock-compile-keywords font-lock-keywords)))))) |
| 1778 | 1779 | ||
| 1779 | ;;; Colour etc. support. | 1780 | ;;; Colour etc. support. |
| 1780 | 1781 | ||