]> code.delx.au - gnu-emacs/blobdiff - lisp/font-lock.el
Merged from emacs@sv.gnu.org
[gnu-emacs] / lisp / font-lock.el
index a1e103624b342da8046fe920236e8f0c3337daa6..c398ca0a0127ab15db792bc0848c178d028009b8 100644 (file)
@@ -1075,22 +1075,25 @@ 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 (bolp)
+      (setq changed t font-lock-beg (line-beginning-position)))
     (goto-char font-lock-end)
-    (unless (bolp) (setq changed t font-lock-end (line-beginning-position 2)))
+    (unless (bolp)
+      (unless (eq font-lock-end
+                  (setq font-lock-end (line-beginning-position 2)))
+        (setq changed t)))
     changed))
 
 (defun font-lock-default-fontify-region (beg end loudly)