diff options
| author | Chong Yidong | 2012-02-27 10:34:12 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-02-27 10:34:12 +0800 |
| commit | c98c62764aad6136abc78e7e14cc89f938a17aec (patch) | |
| tree | b4c49e335284b3d1eeb0af15cc1d57c1465e0e44 | |
| parent | 8ac9e52930219a1621e59aafcf7b30d97c325702 (diff) | |
| download | emacs-c98c62764aad6136abc78e7e14cc89f938a17aec.tar.gz emacs-c98c62764aad6136abc78e7e14cc89f938a17aec.zip | |
* font-lock.el (font-lock-specified-p): Rename from font-lock-spec-present.
Callers changed.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/font-core.el | 2 | ||||
| -rw-r--r-- | lisp/font-lock.el | 11 |
3 files changed, 13 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 57ae84c0fff..c97aa54ca0b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-02-27 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * font-lock.el (font-lock-specified-p): Rename from | ||
| 4 | font-lock-spec-present. Callers changed. | ||
| 5 | |||
| 1 | 2012-02-27 Daniel Hackney <dan@haxney.org> (tiny change) | 6 | 2012-02-27 Daniel Hackney <dan@haxney.org> (tiny change) |
| 2 | 7 | ||
| 3 | * emacs-lisp/package.el (package-compute-transaction): Handle | 8 | * emacs-lisp/package.el (package-compute-transaction): Handle |
diff --git a/lisp/font-core.el b/lisp/font-core.el index 4a88d973913..fc647a3727b 100644 --- a/lisp/font-core.el +++ b/lisp/font-core.el | |||
| @@ -192,7 +192,7 @@ this function onto `change-major-mode-hook'." | |||
| 192 | 192 | ||
| 193 | ;; Only do hard work if the mode has specified stuff in | 193 | ;; Only do hard work if the mode has specified stuff in |
| 194 | ;; `font-lock-defaults'. | 194 | ;; `font-lock-defaults'. |
| 195 | (when (font-lock-spec-present mode) | 195 | (when (font-lock-specified-p mode) |
| 196 | (font-lock-mode-internal mode))) | 196 | (font-lock-mode-internal mode))) |
| 197 | 197 | ||
| 198 | (defun turn-on-font-lock () | 198 | (defun turn-on-font-lock () |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 7750b30f096..1a7022da012 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -629,10 +629,13 @@ Major/minor modes can set this variable if they know which option applies.") | |||
| 629 | ;; Shut up the byte compiler. | 629 | ;; Shut up the byte compiler. |
| 630 | (defvar font-lock-face-attributes)) ; Obsolete but respected if set. | 630 | (defvar font-lock-face-attributes)) ; Obsolete but respected if set. |
| 631 | 631 | ||
| 632 | (defun font-lock-spec-present (mode) | 632 | (defun font-lock-specified-p (mode) |
| 633 | ;; Is there enough specification to do fontification at all? | 633 | "Return non-nil if the current buffer is ready for fontification. |
| 634 | The MODE argument, if non-nil, means Font Lock mode is about to | ||
| 635 | be enabled." | ||
| 634 | (or font-lock-defaults | 636 | (or font-lock-defaults |
| 635 | (if (boundp 'font-lock-keywords) font-lock-keywords) | 637 | (and (boundp 'font-lock-keywords) |
| 638 | font-lock-keywords) | ||
| 636 | (and mode | 639 | (and mode |
| 637 | (boundp 'font-lock-set-defaults) | 640 | (boundp 'font-lock-set-defaults) |
| 638 | font-lock-set-defaults | 641 | font-lock-set-defaults |
| @@ -643,7 +646,7 @@ Major/minor modes can set this variable if they know which option applies.") | |||
| 643 | ;; The first fontification after turning the mode on. This must | 646 | ;; The first fontification after turning the mode on. This must |
| 644 | ;; only be called after the mode hooks have been run. | 647 | ;; only be called after the mode hooks have been run. |
| 645 | (when (and font-lock-mode | 648 | (when (and font-lock-mode |
| 646 | (font-lock-spec-present t)) | 649 | (font-lock-specified-p t)) |
| 647 | (let ((max-size (font-lock-value-in-major-mode font-lock-maximum-size))) | 650 | (let ((max-size (font-lock-value-in-major-mode font-lock-maximum-size))) |
| 648 | (cond (font-lock-fontified | 651 | (cond (font-lock-fontified |
| 649 | nil) | 652 | nil) |