# HG changeset patch # User Stefan Monnier # Date 1127131687 0 # Node ID b9c26f9516da2e6a2e5c8640f7eaf6b912d5e8c8 # Parent 2148ae4e135af2c508c5e7e4513906f2032b99fe (font-lock-default-fontify-region): Don't unconditionally add a line, since the after-change-function already did it. diff -r 2148ae4e135a -r b9c26f9516da lisp/ChangeLog --- a/lisp/ChangeLog Mon Sep 19 10:41:15 2005 +0000 +++ b/lisp/ChangeLog Mon Sep 19 12:08:07 2005 +0000 @@ -1,3 +1,9 @@ +2005-09-19 Stefan Monnier + + * font-lock.el (font-lock-default-fontify-region): + Don't unconditionally add a line, since the after-change-function + already did it. + 2005-09-19 Miles Bader * net/newsticker.el: Get rid of CVS keyword. diff -r 2148ae4e135a -r b9c26f9516da lisp/font-lock.el --- a/lisp/font-lock.el Mon Sep 19 10:41:15 2005 +0000 +++ b/lisp/font-lock.el Mon Sep 19 12:08:07 2005 +0000 @@ -1061,7 +1061,8 @@ '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 @@ (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.