aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-09-11 15:13:31 +0000
committerRichard M. Stallman1993-09-11 15:13:31 +0000
commit522779f4c6cf5a603fb519594e77a9b256f282eb (patch)
treebb2dc4efa5300181a00adaa196f6be593cc85813
parent9fa7bfe524cc2f64fa12887df017dc757b86e4e8 (diff)
downloademacs-522779f4c6cf5a603fb519594e77a9b256f282eb.tar.gz
emacs-522779f4c6cf5a603fb519594e77a9b256f282eb.zip
(font-lock-fontify-region): Put on `font-lock'
property as well as `face' property. (font-lock-hack-keywords): Likewise.
-rw-r--r--lisp/font-lock.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index c6f28b0739e..87a134f1e88 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -150,6 +150,7 @@ slow things down!")
150 (nth 3 (parse-partial-sexp beg (point) 150 (nth 3 (parse-partial-sexp beg (point)
151 nil nil state)))) 151 nil nil state))))
152 (put-text-property beg (point) 'face font-lock-string-face) 152 (put-text-property beg (point) 'face font-lock-string-face)
153 (put-text-property beg (point) 'font-lock t)
153 (setq state (parse-partial-sexp beg (point) nil nil state)))) 154 (setq state (parse-partial-sexp beg (point) nil nil state))))
154 ;; Likewise for a comment. 155 ;; Likewise for a comment.
155 (if (or (nth 4 state) (nth 7 state)) 156 (if (or (nth 4 state) (nth 7 state))
@@ -162,6 +163,7 @@ slow things down!")
162 (nth 3 (parse-partial-sexp beg (point) 163 (nth 3 (parse-partial-sexp beg (point)
163 nil nil state)))) 164 nil nil state))))
164 (put-text-property beg (point) 'face font-lock-comment-face) 165 (put-text-property beg (point) 'face font-lock-comment-face)
166 (put-text-property beg (point) 'font-lock t)
165 (setq state (parse-partial-sexp beg (point) nil nil state)))) 167 (setq state (parse-partial-sexp beg (point) nil nil state))))
166 ;; Find each interesting place between here and END. 168 ;; Find each interesting place between here and END.
167 (while (and (< (point) end) 169 (while (and (< (point) end)
@@ -191,6 +193,7 @@ slow things down!")
191 (skip-chars-backward " \t")) 193 (skip-chars-backward " \t"))
192 (error (goto-char end)))) 194 (error (goto-char end))))
193 (put-text-property beg (point) 'face font-lock-comment-face) 195 (put-text-property beg (point) 'face font-lock-comment-face)
196 (put-text-property beg (point) 'font-lock t)
194 (setq state (parse-partial-sexp here (point) nil nil state))) 197 (setq state (parse-partial-sexp here (point) nil nil state)))
195 (if (nth 3 state) 198 (if (nth 3 state)
196 (let ((beg (match-beginning 0))) 199 (let ((beg (match-beginning 0)))
@@ -198,6 +201,7 @@ slow things down!")
198 (nth 3 (parse-partial-sexp here (point) 201 (nth 3 (parse-partial-sexp here (point)
199 nil nil state)))) 202 nil nil state))))
200 (put-text-property beg (point) 'face font-lock-string-face) 203 (put-text-property beg (point) 'face font-lock-string-face)
204 (put-text-property beg (point) 'font-lock t)
201 (setq state (parse-partial-sexp here (point) nil nil state)))) 205 (setq state (parse-partial-sexp here (point) nil nil state))))
202 )) 206 ))
203 ;; Make sure PREV is non-nil after the loop 207 ;; Make sure PREV is non-nil after the loop
@@ -300,7 +304,8 @@ slow things down!")
300 ;; don't fontify this keyword if we're already in some other context. 304 ;; don't fontify this keyword if we're already in some other context.
301 (or (if allow-overlap-p nil (font-lock-any-properties-p s e)) 305 (or (if allow-overlap-p nil (font-lock-any-properties-p s e))
302 (progn 306 (progn
303 (put-text-property s e 'face face)))) 307 (put-text-property s e 'face face)
308 (put-text-property s e 'font-lock t))))
304 (if loudly (message "Fontifying %s... (regexps...%s)" 309 (if loudly (message "Fontifying %s... (regexps...%s)"
305 (buffer-name) 310 (buffer-name)
306 (make-string (setq count (1+ count)) ?.)))) 311 (make-string (setq count (1+ count)) ?.))))