changeset 75975:c99663d585cc

(font-lock-extend-region-wholelines): Test for EOB in addition to BOL.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 17 Feb 2007 11:27:26 +0000
parents ec222266014a
children 22b8991d91fe
files lisp/font-lock.el
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/font-lock.el	Sat Feb 17 02:36:19 2007 +0000
+++ b/lisp/font-lock.el	Sat Feb 17 11:27:26 2007 +0000
@@ -1075,20 +1075,20 @@
       (setq font-lock-beg (or (previous-single-property-change
                                font-lock-beg 'font-lock-multiline)
                               (point-min))))
-    ;; 
+    ;;
     (when (get-text-property font-lock-end 'font-lock-multiline)
       (setq changed t)
       (setq font-lock-end (or (text-property-any font-lock-end (point-max)
                                                  'font-lock-multiline nil)
                               (point-max))))
     changed))
-  
-  
+
 (defun font-lock-extend-region-wholelines ()
   "Move fontification boundaries to beginning of lines."
   (let ((changed nil))
     (goto-char font-lock-beg)
-    (unless (bolp) (setq changed t font-lock-beg (line-beginning-position)))
+    (unless (or (bolp) (eobp))
+      (setq changed t font-lock-beg (line-beginning-position)))
     (goto-char font-lock-end)
     (unless (bolp)
       (unless (eq font-lock-end