summaryrefslogtreecommitdiff
path: root/lisp/font-lock.el
diff options
context:
space:
mode:
authorPaul W. Rankin <pwr@bydasein.com>2021-03-25 00:26:59 +1000
committerPaul W. Rankin <pwr@bydasein.com>2021-03-25 00:27:38 +1000
commit23995414fec483287e7fb9c9a279483319f9fc54 (patch)
tree13d1b30066192c769dc6edf8d714e780b943b63f /lisp/font-lock.el
parent344eea4113f8eb3e78cd201a90cc968a8c3658f5 (diff)
downloademacs-23995414fec483287e7fb9c9a279483319f9fc54.tar.gz
Remove font-lock toggle from font-lock-update
* lisp/font-lock.el (font-lock-update): Remove call to font-lock-unfontify-region and font-lock-mode toggle with ARG; this did not perform what original author intended
Diffstat (limited to 'lisp/font-lock.el')
-rw-r--r--lisp/font-lock.el16
1 files changed, 6 insertions, 10 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 82915d8c8b0..3105242a1f8 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1120,17 +1120,13 @@ portion of the buffer."
(funcall font-lock-ensure-function
(or beg (point-min)) (or end (point-max)))))
-(defun font-lock-update (&optional arg)
- "Updates the syntax highlighting in this buffer.
-Refontify the accessible portion of this buffer, or enable Font Lock mode
-in this buffer if it is currently disabled. With prefix ARG, toggle Font
-Lock mode."
- (interactive "P")
+(defun font-lock-update ()
+ "Refontify the accessible portion of the buffer.
+Unconditionally activate `font-lock-mode'."
+ (interactive)
+ (unless font-lock-mode (font-lock-mode 1))
(save-excursion
- (if (and (not arg) font-lock-mode)
- (font-lock-fontify-region (point-min) (point-max))
- (font-lock-unfontify-region (point-min) (point-max))
- (font-lock-mode 'toggle))))
+ (font-lock-fontify-region (point-min) (point-max))))
(defun font-lock-default-fontify-buffer ()
"Fontify the whole buffer using `font-lock-fontify-region-function'."