diff lisp/font-lock.el @ 90054:f2ebccfa87d4

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-74 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-709 Update from CVS: src/indent.c (Fvertical_motion): Fix last change. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-710 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-715 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-74 Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 08 Dec 2004 05:02:30 +0000
parents b637c617432f 8d1a39cde5e3
children 29e773288013
line wrap: on
line diff
--- a/lisp/font-lock.el	Mon Dec 06 12:38:25 2004 +0000
+++ b/lisp/font-lock.el	Wed Dec 08 05:02:30 2004 +0000
@@ -958,7 +958,8 @@
   (funcall font-lock-fontify-region-function beg end loudly))
 
 (defun font-lock-unfontify-region (beg end)
-  (funcall font-lock-unfontify-region-function beg end))
+  (save-buffer-state nil
+    (funcall font-lock-unfontify-region-function beg end)))
 
 (defun font-lock-default-fontify-buffer ()
   (let ((verbose (if (numberp font-lock-verbose)
@@ -1046,13 +1047,12 @@
 what properties to clear before refontifying a region.")
 
 (defun font-lock-default-unfontify-region (beg end)
-  (save-buffer-state nil
-    (remove-list-of-text-properties
-     beg end (append
-	      font-lock-extra-managed-props
-	      (if font-lock-syntactic-keywords
-		  '(syntax-table face font-lock-multiline)
-		'(face font-lock-multiline))))))
+  (remove-list-of-text-properties
+   beg end (append
+	    font-lock-extra-managed-props
+	    (if font-lock-syntactic-keywords
+		'(syntax-table face font-lock-multiline)
+	      '(face font-lock-multiline)))))
 
 ;; Called when any modification is made to buffer text.
 (defun font-lock-after-change-function (beg end old-len)
@@ -1456,7 +1456,7 @@
 		       (concat "^\\(?:" defun-prompt-regexp "\\)?\\s(")
 		     "^\\s(")
 		  (0
-		   (if (memq (get-text-property (1- (point)) 'face)
+		   (if (memq (get-text-property (match-beginning 0) 'face)
 			     '(font-lock-string-face font-lock-doc-face
 			       font-lock-comment-face))
 		       font-lock-warning-face)