summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2004-11-27 00:17:22 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2004-11-27 00:17:22 +0000
commit048aac39388861b0117ad22d51ca8b7dba16d2bf (patch)
tree80b032511b2117467b5fe40d921b43f05a700637
parent9921b91aeaa67886b0bd0ce0905535a7ce050c7f (diff)
downloademacs-048aac39388861b0117ad22d51ca8b7dba16d2bf.tar.gz
emacs-048aac39388861b0117ad22d51ca8b7dba16d2bf.tar.bz2
emacs-048aac39388861b0117ad22d51ca8b7dba16d2bf.zip
(font-lock-compile-keywords): Don't complain if the end
of defun-prompt-regexp matches inside a comment/string but the beginning is correctly outside everything.
-rw-r--r--lisp/font-lock.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index bdf31881cc4..c17949c0c97 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -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)