[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114016: * lisp/progmodes/python.el (python-font-loc
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] trunk r114016: * lisp/progmodes/python.el (python-font-lock-keywords): Don't return nil |
Date: |
Tue, 27 Aug 2013 02:41:46 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114016
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15161
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2013-08-26 22:41:41 -0400
message:
* lisp/progmodes/python.el (python-font-lock-keywords): Don't return nil
from a matcher-function unless there's no more matches.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/python.el python.el-20091113204419-o5vbwnq5f7feedwu-3008
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-08-26 13:17:22 +0000
+++ b/lisp/ChangeLog 2013-08-27 02:41:41 +0000
@@ -1,3 +1,8 @@
+2013-08-27 Stefan Monnier <address@hidden>
+
+ * progmodes/python.el (python-font-lock-keywords): Don't return nil
+ from a matcher-function unless there's no more matches (bug#15161).
+
2013-08-26 Michael Albinus <address@hidden>
* minibuffer.el: Revert change from 2013-08-20.
=== modified file 'lisp/progmodes/python.el'
--- a/lisp/progmodes/python.el 2013-08-16 05:15:51 +0000
+++ b/lisp/progmodes/python.el 2013-08-27 02:41:41 +0000
@@ -501,29 +501,24 @@
(,(lambda (limit)
(let ((re (python-rx (group (+ (any word ?. ?_)))
(? ?\[ (+ (not (any ?\]))) ?\]) (* space)
- assignment-operator)))
- (when (re-search-forward re limit t)
- (while (and (python-syntax-context 'paren)
- (re-search-forward re limit t)))
- (if (not (or (python-syntax-context 'paren)
- (equal (char-after (point-marker)) ?=)))
- t
- (set-match-data nil)))))
+ assignment-operator))
+ (res nil))
+ (while (and (setq res (re-search-forward re limit t))
+ (or (python-syntax-context 'paren)
+ (equal (char-after (point-marker)) ?=))))
+ res))
(1 font-lock-variable-name-face nil nil))
;; support for a, b, c = (1, 2, 3)
(,(lambda (limit)
(let ((re (python-rx (group (+ (any word ?. ?_))) (* space)
(* ?, (* space) (+ (any word ?. ?_)) (* space))
?, (* space) (+ (any word ?. ?_)) (* space)
- assignment-operator)))
- (when (and (re-search-forward re limit t)
- (goto-char (nth 3 (match-data))))
- (while (and (python-syntax-context 'paren)
- (re-search-forward re limit t))
- (goto-char (nth 3 (match-data))))
- (if (not (python-syntax-context 'paren))
- t
- (set-match-data nil)))))
+ assignment-operator))
+ (res nil))
+ (while (and (setq res (re-search-forward re limit t))
+ (goto-char (match-end 1))
+ (python-syntax-context 'paren)))
+ res))
(1 font-lock-variable-name-face nil nil))))
(defconst python-syntax-propertize-function
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114016: * lisp/progmodes/python.el (python-font-lock-keywords): Don't return nil,
Stefan Monnier <=