diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2005-09-19 12:08:07 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2005-09-19 12:08:07 +0000 |
commit | 5d4247d31a0e3377afeb20b878c6cb90bb695e53 (patch) | |
tree | 824f86c36e1df9a435c5b8beae86c4e9dfd4abbe /lisp/font-lock.el | |
parent | e3fba586d63c36a5d8eab0835ab542c7b3ae7483 (diff) | |
download | emacs-5d4247d31a0e3377afeb20b878c6cb90bb695e53.tar.gz |
(font-lock-default-fontify-region): Don't unconditionally add a line, since
the after-change-function already did it.
Diffstat (limited to 'lisp/font-lock.el')
-rw-r--r-- | lisp/font-lock.el | 15 |
1 files changed, 8 insertions, 7 deletions
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.") 'font-lock-multiline nil) (point-max)))) (goto-char end) - (setq end (line-beginning-position 2)) + ;; Round up to a whole line. + (unless (bolp) (setq end (line-beginning-position 2))) ;; Now do the fontification. (font-lock-unfontify-region beg end) (when font-lock-syntactic-keywords @@ -1073,12 +1074,12 @@ a very meaningful entity to highlight.") (set-syntax-table old-syntax-table)))) ;; The following must be rethought, since keywords can override fontification. -; ;; Now scan for keywords, but not if we are inside a comment now. -; (or (and (not font-lock-keywords-only) -; (let ((state (parse-partial-sexp beg end nil nil -; font-lock-cache-state))) -; (or (nth 4 state) (nth 7 state)))) -; (font-lock-fontify-keywords-region beg end)) +;; ;; Now scan for keywords, but not if we are inside a comment now. +;; (or (and (not font-lock-keywords-only) +;; (let ((state (parse-partial-sexp beg end nil nil +;; font-lock-cache-state))) +;; (or (nth 4 state) (nth 7 state)))) +;; (font-lock-fontify-keywords-region beg end)) (defvar font-lock-extra-managed-props nil "Additional text properties managed by font-lock. |