aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2005-09-19 12:08:07 +0000
committerStefan Monnier2005-09-19 12:08:07 +0000
commit5d4247d31a0e3377afeb20b878c6cb90bb695e53 (patch)
tree824f86c36e1df9a435c5b8beae86c4e9dfd4abbe
parente3fba586d63c36a5d8eab0835ab542c7b3ae7483 (diff)
downloademacs-5d4247d31a0e3377afeb20b878c6cb90bb695e53.tar.gz
emacs-5d4247d31a0e3377afeb20b878c6cb90bb695e53.zip
(font-lock-default-fontify-region): Don't unconditionally add a line, since
the after-change-function already did it.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/font-lock.el15
2 files changed, 14 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9ebb686e28e..e2ef572c6c2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12005-09-19 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * font-lock.el (font-lock-default-fontify-region):
4 Don't unconditionally add a line, since the after-change-function
5 already did it.
6
12005-09-19 Miles Bader <miles@gnu.org> 72005-09-19 Miles Bader <miles@gnu.org>
2 8
3 * net/newsticker.el: Get rid of CVS keyword. 9 * net/newsticker.el: Get rid of CVS keyword.
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 99dd61bacb2..c4228c2841d 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1061,7 +1061,8 @@ a very meaningful entity to highlight.")
1061 'font-lock-multiline nil) 1061 'font-lock-multiline nil)
1062 (point-max)))) 1062 (point-max))))
1063 (goto-char end) 1063 (goto-char end)
1064 (setq end (line-beginning-position 2)) 1064 ;; Round up to a whole line.
1065 (unless (bolp) (setq end (line-beginning-position 2)))
1065 ;; Now do the fontification. 1066 ;; Now do the fontification.
1066 (font-lock-unfontify-region beg end) 1067 (font-lock-unfontify-region beg end)
1067 (when font-lock-syntactic-keywords 1068 (when font-lock-syntactic-keywords
@@ -1073,12 +1074,12 @@ a very meaningful entity to highlight.")
1073 (set-syntax-table old-syntax-table)))) 1074 (set-syntax-table old-syntax-table))))
1074 1075
1075;; The following must be rethought, since keywords can override fontification. 1076;; The following must be rethought, since keywords can override fontification.
1076; ;; Now scan for keywords, but not if we are inside a comment now. 1077;; ;; Now scan for keywords, but not if we are inside a comment now.
1077; (or (and (not font-lock-keywords-only) 1078;; (or (and (not font-lock-keywords-only)
1078; (let ((state (parse-partial-sexp beg end nil nil 1079;; (let ((state (parse-partial-sexp beg end nil nil
1079; font-lock-cache-state))) 1080;; font-lock-cache-state)))
1080; (or (nth 4 state) (nth 7 state)))) 1081;; (or (nth 4 state) (nth 7 state))))
1081; (font-lock-fontify-keywords-region beg end)) 1082;; (font-lock-fontify-keywords-region beg end))
1082 1083
1083(defvar font-lock-extra-managed-props nil 1084(defvar font-lock-extra-managed-props nil
1084 "Additional text properties managed by font-lock. 1085 "Additional text properties managed by font-lock.