]> git.eshelyaron.com Git - emacs.git/commitdiff
(font-lock-extend-region-wholelines): Test for EOB in addition to BOL.
authorEli Zaretskii <eliz@gnu.org>
Sat, 17 Feb 2007 11:28:18 +0000 (11:28 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 17 Feb 2007 11:28:18 +0000 (11:28 +0000)
lisp/ChangeLog
lisp/font-lock.el

index 281cdd624a9a229b0edd39a3affe4e49df0dc36b..832d921c20a71f6a7ac167912617ad603e0bbb7f 100644 (file)
@@ -1,3 +1,8 @@
+2007-02-17  David Hansen  <david.hansen@physik.fu-berlin.de>  (tiny change)
+
+       * font-lock.el (font-lock-extend-region-wholelines): Test for EOB
+       in addition to BOL.
+
 2007-02-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * ps-print.el: Use (defvar <foo>) where applicable.
index 62008ac295b8e3d3d6794dbbb2b5645ce233989c..fd2dedc1dae7685080bf6cf02b1748380a42af3c 100644 (file)
@@ -1075,20 +1075,20 @@ Put first the functions more likely to cause a change and cheaper to compute.")
       (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