diff options
| author | Stefan Kangas | 2022-07-08 14:55:42 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2022-07-09 12:33:14 +0200 |
| commit | 76ca5f5eceda6c78f209588da0893bab5b42165c (patch) | |
| tree | 9d500d9138cfd42f0690430b15d624ccce84d309 | |
| parent | 5f8922b9e26f8c0bf68bd72ff6804616a7134792 (diff) | |
| download | emacs-76ca5f5eceda6c78f209588da0893bab5b42165c.tar.gz emacs-76ca5f5eceda6c78f209588da0893bab5b42165c.zip | |
Delete obsolete variable font-lock-maximum-size
* lisp/font-lock.el (font-lock-maximum-size): Delete variable
obsolete since 24.1.
(font-lock-initial-fontify):
* lisp/mail/rmail.el (rmail-variables):
* lisp/mh-e/mh-mime.el (mh-small-show-buffer-p): Don't use above
deleted variable.
* lisp/font-core.el (font-lock-mode):
* lisp/font-lock.el:
* lisp/info.el: Don't mention above deleted variable.
| -rw-r--r-- | etc/NEWS | 3 | ||||
| -rw-r--r-- | lisp/font-core.el | 3 | ||||
| -rw-r--r-- | lisp/font-lock.el | 44 | ||||
| -rw-r--r-- | lisp/info.el | 2 | ||||
| -rw-r--r-- | lisp/mail/rmail.el | 1 | ||||
| -rw-r--r-- | lisp/mh-e/mh-mime.el | 10 |
6 files changed, 10 insertions, 53 deletions
| @@ -2276,7 +2276,8 @@ This change is now applied in 'dired-insert-directory'. | |||
| 2276 | 'deferred-action-function', 'dired-x-submit-report', | 2276 | 'deferred-action-function', 'dired-x-submit-report', |
| 2277 | 'eieio-defgeneric', 'eieio-defmethod', 'emacs-lock-from-exiting', | 2277 | 'eieio-defgeneric', 'eieio-defmethod', 'emacs-lock-from-exiting', |
| 2278 | 'erc-complete-word', 'eshell-cmpl-suffix-list', 'eshell-for', | 2278 | 'erc-complete-word', 'eshell-cmpl-suffix-list', 'eshell-for', |
| 2279 | 'gnus-carpal', 'gnus-debug-exclude-variables', 'gnus-debug-files', | 2279 | 'font-lock-maximum-size', 'gnus-carpal', |
| 2280 | 'gnus-debug-exclude-variables', 'gnus-debug-files', | ||
| 2280 | 'gnus-local-domain', 'gnus-outgoing-message-group', | 2281 | 'gnus-local-domain', 'gnus-outgoing-message-group', |
| 2281 | 'gnus-registry-user-format-function-M', 'image-extension-data', | 2282 | 'gnus-registry-user-format-function-M', 'image-extension-data', |
| 2282 | 'image-library-alist', 'inhibit-first-line-modes-regexps', | 2283 | 'image-library-alist', 'inhibit-first-line-modes-regexps', |
diff --git a/lisp/font-core.el b/lisp/font-core.el index 2b75309ff3f..db07aa011c4 100644 --- a/lisp/font-core.el +++ b/lisp/font-core.el | |||
| @@ -105,8 +105,7 @@ example, put in your ~/.emacs: | |||
| 105 | Where major modes support different levels of fontification, you | 105 | Where major modes support different levels of fontification, you |
| 106 | can use the variable `font-lock-maximum-decoration' to specify | 106 | can use the variable `font-lock-maximum-decoration' to specify |
| 107 | which level you generally prefer. When you turn Font Lock mode | 107 | which level you generally prefer. When you turn Font Lock mode |
| 108 | on/off the buffer is fontified/defontified, though fontification | 108 | on/off the buffer is fontified/defontified. |
| 109 | occurs only if the buffer is less than `font-lock-maximum-size'. | ||
| 110 | 109 | ||
| 111 | To add your own highlighting for some major mode, and modify the | 110 | To add your own highlighting for some major mode, and modify the |
| 112 | highlighting selected automatically via the variable | 111 | highlighting selected automatically via the variable |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 206879b1694..181a7dc90ef 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -47,9 +47,9 @@ | |||
| 47 | ;; | 47 | ;; |
| 48 | ;; Fontification for a particular mode may be available in a number of levels | 48 | ;; Fontification for a particular mode may be available in a number of levels |
| 49 | ;; of decoration. The higher the level, the more decoration, but the more time | 49 | ;; of decoration. The higher the level, the more decoration, but the more time |
| 50 | ;; it takes to fontify. See the variable `font-lock-maximum-decoration', and | 50 | ;; it takes to fontify. See the variable `font-lock-maximum-decoration'. |
| 51 | ;; also the variable `font-lock-maximum-size'. Support modes for Font Lock | 51 | ;; Support modes for Font Lock mode can be used to speed up Font Lock |
| 52 | ;; mode can be used to speed up Font Lock mode. See `font-lock-support-mode'. | 52 | ;; mode. See `font-lock-support-mode'. |
| 53 | 53 | ||
| 54 | ;;;; How Font Lock mode fontifies: | 54 | ;;;; How Font Lock mode fontifies: |
| 55 | 55 | ||
| @@ -228,32 +228,6 @@ | |||
| 228 | 228 | ||
| 229 | ;; User variables. | 229 | ;; User variables. |
| 230 | 230 | ||
| 231 | (defcustom font-lock-maximum-size 256000 | ||
| 232 | "Maximum buffer size for unsupported buffer fontification. | ||
| 233 | When `font-lock-support-mode' is nil, only buffers smaller than | ||
| 234 | this are fontified. This variable has no effect if a Font Lock | ||
| 235 | support mode (usually `jit-lock-mode') is enabled. | ||
| 236 | |||
| 237 | If nil, means size is irrelevant. | ||
| 238 | If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE), | ||
| 239 | where MAJOR-MODE is a symbol or t (meaning the default). For example: | ||
| 240 | ((c-mode . 256000) (c++-mode . 256000) (rmail-mode . 1048576)) | ||
| 241 | means that the maximum size is 250K for buffers in C or C++ modes, one megabyte | ||
| 242 | for buffers in Rmail mode, and size is irrelevant otherwise." | ||
| 243 | :type '(choice (const :tag "none" nil) | ||
| 244 | (integer :tag "size") | ||
| 245 | (repeat :menu-tag "mode specific" :tag "mode specific" | ||
| 246 | :value ((t . nil)) | ||
| 247 | (cons :tag "Instance" | ||
| 248 | (radio :tag "Mode" | ||
| 249 | (const :tag "all" t) | ||
| 250 | (symbol :tag "name")) | ||
| 251 | (radio :tag "Size" | ||
| 252 | (const :tag "none" nil) | ||
| 253 | (integer :tag "size"))))) | ||
| 254 | :group 'font-lock) | ||
| 255 | (make-obsolete-variable 'font-lock-maximum-size nil "24.1") | ||
| 256 | |||
| 257 | (defcustom font-lock-maximum-decoration t | 231 | (defcustom font-lock-maximum-decoration t |
| 258 | "Maximum decoration level for fontification. | 232 | "Maximum decoration level for fontification. |
| 259 | If nil, use the default decoration (typically the minimum available). | 233 | If nil, use the default decoration (typically the minimum available). |
| @@ -695,15 +669,9 @@ be enabled." | |||
| 695 | ;; The first fontification after turning the mode on. This must | 669 | ;; The first fontification after turning the mode on. This must |
| 696 | ;; only be called after the mode hooks have been run. | 670 | ;; only be called after the mode hooks have been run. |
| 697 | (when (and font-lock-mode | 671 | (when (and font-lock-mode |
| 698 | (font-lock-specified-p t)) | 672 | (font-lock-specified-p t) |
| 699 | (let ((max-size (font-lock-value-in-major-mode font-lock-maximum-size))) | 673 | (not font-lock-fontified)) |
| 700 | (cond (font-lock-fontified | 674 | (with-no-warnings (font-lock-fontify-buffer)))) |
| 701 | nil) | ||
| 702 | ((or (null max-size) (> max-size (buffer-size))) | ||
| 703 | (with-no-warnings (font-lock-fontify-buffer))) | ||
| 704 | (font-lock-verbose | ||
| 705 | (message "Fontifying %s...buffer size greater than font-lock-maximum-size" | ||
| 706 | (buffer-name))))))) | ||
| 707 | 675 | ||
| 708 | (defun font-lock-mode-internal (arg) | 676 | (defun font-lock-mode-internal (arg) |
| 709 | ;; Turn on Font Lock mode. | 677 | ;; Turn on Font Lock mode. |
diff --git a/lisp/info.el b/lisp/info.el index 0d0dda8c066..7fdb893edc5 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -133,8 +133,6 @@ orientation. See `Info-nth-menu-item'.") | |||
| 133 | :version "22.1" | 133 | :version "22.1" |
| 134 | :type 'boolean) | 134 | :type 'boolean) |
| 135 | 135 | ||
| 136 | ;; It's unfortunate that nil means no fontification, as opposed to no limit, | ||
| 137 | ;; since that differs from font-lock-maximum-size. | ||
| 138 | (defcustom Info-fontify-maximum-menu-size 400000 | 136 | (defcustom Info-fontify-maximum-menu-size 400000 |
| 139 | "Maximum size of menu to fontify if `font-lock-mode' is non-nil. | 137 | "Maximum size of menu to fontify if `font-lock-mode' is non-nil. |
| 140 | Set to nil to disable node fontification; set to t for no limit." | 138 | Set to nil to disable node fontification; set to t for no limit." |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 467375dbe1f..a970ab2a760 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -1451,7 +1451,6 @@ If so restore the actual mbox message collection." | |||
| 1451 | (setq-local font-lock-defaults | 1451 | (setq-local font-lock-defaults |
| 1452 | '(rmail-font-lock-keywords | 1452 | '(rmail-font-lock-keywords |
| 1453 | t t nil nil | 1453 | t t nil nil |
| 1454 | (font-lock-maximum-size . nil) | ||
| 1455 | (font-lock-dont-widen . t) | 1454 | (font-lock-dont-widen . t) |
| 1456 | (font-lock-inhibit-thing-lock . (lazy-lock-mode fast-lock-mode)))) | 1455 | (font-lock-inhibit-thing-lock . (lazy-lock-mode fast-lock-mode)))) |
| 1457 | (setq-local require-final-newline nil) | 1456 | (setq-local require-final-newline nil) |
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index d2e07977e5d..144eb9b3f96 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el | |||
| @@ -1141,15 +1141,7 @@ this ;-)" | |||
| 1141 | "Check if show buffer is small. | 1141 | "Check if show buffer is small. |
| 1142 | This is used to decide if smileys and graphical emphasis should be | 1142 | This is used to decide if smileys and graphical emphasis should be |
| 1143 | displayed." | 1143 | displayed." |
| 1144 | (let ((max nil)) | 1144 | (>= 32000 (buffer-size))) |
| 1145 | ;; FIXME: font-lock-maximum-size is obsolete. | ||
| 1146 | (when (and (boundp 'font-lock-maximum-size) font-lock-maximum-size) | ||
| 1147 | (cond ((numberp font-lock-maximum-size) | ||
| 1148 | (setq max font-lock-maximum-size)) | ||
| 1149 | ((listp font-lock-maximum-size) | ||
| 1150 | (setq max (cdr (or (assoc 'mh-show-mode font-lock-maximum-size) | ||
| 1151 | (assoc t font-lock-maximum-size))))))) | ||
| 1152 | (or (not (numberp max)) (>= (/ max 8) (buffer-size))))) | ||
| 1153 | 1145 | ||
| 1154 | 1146 | ||
| 1155 | 1147 | ||