]> git.eshelyaron.com Git - emacs.git/commitdiff
(font-lock-compile-keywords): Don't complain if the end
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 27 Nov 2004 00:17:22 +0000 (00:17 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 27 Nov 2004 00:17:22 +0000 (00:17 +0000)
of defun-prompt-regexp matches inside a comment/string but the
beginning is correctly outside everything.

lisp/font-lock.el

index bdf31881cc47d392d9d1ff52795bd4713f992bbd..c17949c0c9706890b622123bcdbdc79f9edc8eb7 100644 (file)
@@ -1456,7 +1456,7 @@ If REGEXP is non-nil, it means these keywords are used for
                       (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)