diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 378ff8cc2c1..eb84b494e35 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -662,10 +662,14 @@ builtins.") | |||
| 662 | ;; assignments | 662 | ;; assignments |
| 663 | ;; support for a = b = c = 5 | 663 | ;; support for a = b = c = 5 |
| 664 | (,(lambda (limit) | 664 | (,(lambda (limit) |
| 665 | (let ((re (python-rx (group (+ (any word ?. ?_))) | 665 | (let ((re (python-rx (group (+ symbol-name)) |
| 666 | (? ?\[ (+ (not (any ?\]))) ?\]) (* space) | 666 | (? ?\[ (+ (not ?\])) ?\]) |
| 667 | (* space) | ||
| 667 | ;; A type, like " : int ". | 668 | ;; A type, like " : int ". |
| 668 | (? ?: (* space) (+ (any word ?. ?_)) (* space)) | 669 | (? ?: |
| 670 | (* space) | ||
| 671 | (+ not-simple-operator) | ||
| 672 | (* space)) | ||
| 669 | assignment-operator)) | 673 | assignment-operator)) |
| 670 | (res nil)) | 674 | (res nil)) |
| 671 | (while (and (setq res (re-search-forward re limit t)) | 675 | (while (and (setq res (re-search-forward re limit t)) |
| @@ -675,9 +679,9 @@ builtins.") | |||
| 675 | (1 font-lock-variable-name-face nil nil)) | 679 | (1 font-lock-variable-name-face nil nil)) |
| 676 | ;; support for a, b, c = (1, 2, 3) | 680 | ;; support for a, b, c = (1, 2, 3) |
| 677 | (,(lambda (limit) | 681 | (,(lambda (limit) |
| 678 | (let ((re (python-rx (group (+ (any word ?. ?_))) (* space) | 682 | (let ((re (python-rx (group (+ symbol-name)) (* space) |
| 679 | (* ?, (* space) (+ (any word ?. ?_)) (* space)) | 683 | (* ?, (* space) (+ symbol-name) (* space)) |
| 680 | ?, (* space) (+ (any word ?. ?_)) (* space) | 684 | ?, (* space) (+ symbol-name) (* space) |
| 681 | assignment-operator)) | 685 | assignment-operator)) |
| 682 | (res nil)) | 686 | (res nil)) |
| 683 | (while (and (setq res (re-search-forward re limit t)) | 687 | (while (and (setq res (re-search-forward re limit t)) |