mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-23 14:10:28 -08:00
* lisp/progmodes/python.el (python-font-lock-keywords): Don't return nil
from a matcher-function unless there's no more matches. Fixes: debbugs:15161
This commit is contained in:
parent
12c4970d70
commit
9e89d835b0
2 changed files with 17 additions and 17 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2013-08-27 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* 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 <michael.albinus@gmx.de>
|
2013-08-26 Michael Albinus <michael.albinus@gmx.de>
|
||||||
|
|
||||||
* minibuffer.el: Revert change from 2013-08-20.
|
* minibuffer.el: Revert change from 2013-08-20.
|
||||||
|
|
|
||||||
|
|
@ -501,29 +501,24 @@ The type returned can be `comment', `string' or `paren'."
|
||||||
(,(lambda (limit)
|
(,(lambda (limit)
|
||||||
(let ((re (python-rx (group (+ (any word ?. ?_)))
|
(let ((re (python-rx (group (+ (any word ?. ?_)))
|
||||||
(? ?\[ (+ (not (any ?\]))) ?\]) (* space)
|
(? ?\[ (+ (not (any ?\]))) ?\]) (* space)
|
||||||
assignment-operator)))
|
assignment-operator))
|
||||||
(when (re-search-forward re limit t)
|
(res nil))
|
||||||
(while (and (python-syntax-context 'paren)
|
(while (and (setq res (re-search-forward re limit t))
|
||||||
(re-search-forward re limit t)))
|
(or (python-syntax-context 'paren)
|
||||||
(if (not (or (python-syntax-context 'paren)
|
(equal (char-after (point-marker)) ?=))))
|
||||||
(equal (char-after (point-marker)) ?=)))
|
res))
|
||||||
t
|
|
||||||
(set-match-data nil)))))
|
|
||||||
(1 font-lock-variable-name-face nil nil))
|
(1 font-lock-variable-name-face nil nil))
|
||||||
;; support for a, b, c = (1, 2, 3)
|
;; support for a, b, c = (1, 2, 3)
|
||||||
(,(lambda (limit)
|
(,(lambda (limit)
|
||||||
(let ((re (python-rx (group (+ (any word ?. ?_))) (* space)
|
(let ((re (python-rx (group (+ (any word ?. ?_))) (* space)
|
||||||
(* ?, (* space) (+ (any word ?. ?_)) (* space))
|
(* ?, (* space) (+ (any word ?. ?_)) (* space))
|
||||||
?, (* space) (+ (any word ?. ?_)) (* space)
|
?, (* space) (+ (any word ?. ?_)) (* space)
|
||||||
assignment-operator)))
|
assignment-operator))
|
||||||
(when (and (re-search-forward re limit t)
|
(res nil))
|
||||||
(goto-char (nth 3 (match-data))))
|
(while (and (setq res (re-search-forward re limit t))
|
||||||
(while (and (python-syntax-context 'paren)
|
(goto-char (match-end 1))
|
||||||
(re-search-forward re limit t))
|
(python-syntax-context 'paren)))
|
||||||
(goto-char (nth 3 (match-data))))
|
res))
|
||||||
(if (not (python-syntax-context 'paren))
|
|
||||||
t
|
|
||||||
(set-match-data nil)))))
|
|
||||||
(1 font-lock-variable-name-face nil nil))))
|
(1 font-lock-variable-name-face nil nil))))
|
||||||
|
|
||||||
(defconst python-syntax-propertize-function
|
(defconst python-syntax-propertize-function
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue