]> git.eshelyaron.com Git - emacs.git/commitdiff
(font-lock-default-fontify-region): Don't unconditionally add a line, since
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 19 Sep 2005 12:08:07 +0000 (12:08 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 19 Sep 2005 12:08:07 +0000 (12:08 +0000)
the after-change-function already did it.

lisp/ChangeLog
lisp/font-lock.el

index 9ebb686e28e6243e8e03f3c05c627f5ce43107c9..e2ef572c6c216842abac557ff2b303a0510d3e66 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * 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  <miles@gnu.org>
 
        * net/newsticker.el: Get rid of CVS keyword.
index 99dd61bacb2e76d30346ce5639338454c2bf9369..c4228c2841d05fb78c4c3aee1dbc014fd1f375f2 100644 (file)
@@ -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.