diff options
| author | John Paul Wallington | 2008-06-04 16:20:04 +0000 |
|---|---|---|
| committer | John Paul Wallington | 2008-06-04 16:20:04 +0000 |
| commit | 2124318ae30f32a42a59f2efe1d88b2ac51ab752 (patch) | |
| tree | 292b8a4a5307af6ee9c4cb0bf87ffcfe53091d05 | |
| parent | 4ba5063490ddcadfa35b49675b76c2b67b37b984 (diff) | |
| download | emacs-2124318ae30f32a42a59f2efe1d88b2ac51ab752.tar.gz emacs-2124318ae30f32a42a59f2efe1d88b2ac51ab752.zip | |
(font-lock-turn-off-thing-lock, font-lock-after-fontify-buffer)
(font-lock-after-unfontify-buffer): Use `bound-and-true-p'.
(cpp-font-lock-keywords-source-directives, cpp-font-lock-keywords):
Doc fixes.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/font-lock.el | 24 |
2 files changed, 18 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 807e8668934..40c1eb4e7ef 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -8,6 +8,12 @@ | |||
| 8 | * echistory.el (electric-history-map): Define within defvar. | 8 | * echistory.el (electric-history-map): Define within defvar. |
| 9 | Add docstring. | 9 | Add docstring. |
| 10 | 10 | ||
| 11 | * font-lock.el (font-lock-turn-off-thing-lock) | ||
| 12 | (font-lock-after-fontify-buffer, font-lock-after-unfontify-buffer): | ||
| 13 | Use `bound-and-true-p'. | ||
| 14 | (cpp-font-lock-keywords-source-directives, cpp-font-lock-keywords): | ||
| 15 | Doc fixes. | ||
| 16 | |||
| 11 | * international/ccl.el (define-ccl-program): Add `doc-string' | 17 | * international/ccl.el (define-ccl-program): Add `doc-string' |
| 12 | declaration. | 18 | declaration. |
| 13 | 19 | ||
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 2ddbe603cb1..e139b5975c7 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -916,26 +916,26 @@ The value of this variable is used when Font Lock mode is turned on." | |||
| 916 | nil t))))) | 916 | nil t))))) |
| 917 | 917 | ||
| 918 | (defun font-lock-turn-off-thing-lock () | 918 | (defun font-lock-turn-off-thing-lock () |
| 919 | (cond ((and (boundp 'fast-lock-mode) fast-lock-mode) | 919 | (cond ((bound-and-true-p fast-lock-mode) |
| 920 | (fast-lock-mode -1)) | 920 | (fast-lock-mode -1)) |
| 921 | ((and (boundp 'jit-lock-mode) jit-lock-mode) | 921 | ((bound-and-true-p jit-lock-mode) |
| 922 | (jit-lock-unregister 'font-lock-fontify-region) | 922 | (jit-lock-unregister 'font-lock-fontify-region) |
| 923 | ;; Reset local vars to the non-jit-lock case. | 923 | ;; Reset local vars to the non-jit-lock case. |
| 924 | (kill-local-variable 'font-lock-fontify-buffer-function)) | 924 | (kill-local-variable 'font-lock-fontify-buffer-function)) |
| 925 | ((and (boundp 'lazy-lock-mode) lazy-lock-mode) | 925 | ((bound-and-true-p lazy-lock-mode) |
| 926 | (lazy-lock-mode -1)))) | 926 | (lazy-lock-mode -1)))) |
| 927 | 927 | ||
| 928 | (defun font-lock-after-fontify-buffer () | 928 | (defun font-lock-after-fontify-buffer () |
| 929 | (cond ((and (boundp 'fast-lock-mode) fast-lock-mode) | 929 | (cond ((bound-and-true-p fast-lock-mode) |
| 930 | (fast-lock-after-fontify-buffer)) | 930 | (fast-lock-after-fontify-buffer)) |
| 931 | ;; Useless now that jit-lock intercepts font-lock-fontify-buffer. -sm | 931 | ;; Useless now that jit-lock intercepts font-lock-fontify-buffer. -sm |
| 932 | ;; (jit-lock-mode | 932 | ;; (jit-lock-mode |
| 933 | ;; (jit-lock-after-fontify-buffer)) | 933 | ;; (jit-lock-after-fontify-buffer)) |
| 934 | ((and (boundp 'lazy-lock-mode) lazy-lock-mode) | 934 | ((bound-and-true-p lazy-lock-mode) |
| 935 | (lazy-lock-after-fontify-buffer)))) | 935 | (lazy-lock-after-fontify-buffer)))) |
| 936 | 936 | ||
| 937 | (defun font-lock-after-unfontify-buffer () | 937 | (defun font-lock-after-unfontify-buffer () |
| 938 | (cond ((and (boundp 'fast-lock-mode) fast-lock-mode) | 938 | (cond ((bound-and-true-p fast-lock-mode) |
| 939 | (fast-lock-after-unfontify-buffer)) | 939 | (fast-lock-after-unfontify-buffer)) |
| 940 | ;; Useless as well. It's only called when: | 940 | ;; Useless as well. It's only called when: |
| 941 | ;; - turning off font-lock: it does not matter if we leave spurious | 941 | ;; - turning off font-lock: it does not matter if we leave spurious |
| @@ -945,7 +945,7 @@ The value of this variable is used when Font Lock mode is turned on." | |||
| 945 | ;; | 945 | ;; |
| 946 | ;; (jit-lock-mode | 946 | ;; (jit-lock-mode |
| 947 | ;; (jit-lock-after-unfontify-buffer)) | 947 | ;; (jit-lock-after-unfontify-buffer)) |
| 948 | ((and (boundp 'lazy-lock-mode) lazy-lock-mode) | 948 | ((bound-and-true-p lazy-lock-mode) |
| 949 | (lazy-lock-after-unfontify-buffer)))) | 949 | (lazy-lock-after-unfontify-buffer)))) |
| 950 | 950 | ||
| 951 | ;;; End of Font Lock Support mode. | 951 | ;;; End of Font Lock Support mode. |
| @@ -2154,7 +2154,7 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." | |||
| 2154 | ;; | 2154 | ;; |
| 2155 | (defconst cpp-font-lock-keywords-source-directives | 2155 | (defconst cpp-font-lock-keywords-source-directives |
| 2156 | "define\\|e\\(?:l\\(?:if\\|se\\)\\|ndif\\|rror\\)\\|file\\|i\\(?:f\\(?:n?def\\)?\\|mport\\|nclude\\)\\|line\\|pragma\\|undef\\|warning" | 2156 | "define\\|e\\(?:l\\(?:if\\|se\\)\\|ndif\\|rror\\)\\|file\\|i\\(?:f\\(?:n?def\\)?\\|mport\\|nclude\\)\\|line\\|pragma\\|undef\\|warning" |
| 2157 | "Regular expressoin used in `cpp-font-lock-keywords'.") | 2157 | "Regular expression used in `cpp-font-lock-keywords'.") |
| 2158 | 2158 | ||
| 2159 | ;; `cpp-font-lock-keywords-source-depth' is calculated from: | 2159 | ;; `cpp-font-lock-keywords-source-depth' is calculated from: |
| 2160 | ;; | 2160 | ;; |
| @@ -2203,10 +2203,10 @@ Used in `cpp-font-lock-keywords'.") | |||
| 2203 | '(1 font-lock-preprocessor-face prepend) | 2203 | '(1 font-lock-preprocessor-face prepend) |
| 2204 | (list (+ 2 directives-depth) | 2204 | (list (+ 2 directives-depth) |
| 2205 | 'font-lock-variable-name-face nil t)))) | 2205 | 'font-lock-variable-name-face nil t)))) |
| 2206 | "Font lock keyords for C preprocessor directives. | 2206 | "Font lock keywords for C preprocessor directives. |
| 2207 | `c-mode', `c++-mode' and `objc-mode' have their own | 2207 | `c-mode', `c++-mode' and `objc-mode' have their own font lock keywords |
| 2208 | font lock keyords for C preprocessor directives. This definition is for the | 2208 | for C preprocessor directives. This definition is for the other modes |
| 2209 | other modes in which C preprocessor directives are used. e.g. `asm-mode' and | 2209 | in which C preprocessor directives are used. e.g. `asm-mode' and |
| 2210 | `ld-script-mode'.") | 2210 | `ld-script-mode'.") |
| 2211 | 2211 | ||
| 2212 | 2212 | ||