diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index e72b18afd61..d2bb82e0580 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -171,21 +171,9 @@ | |||
| 171 | ;; string delimiters. Fixme: Is there a better way? | 171 | ;; string delimiters. Fixme: Is there a better way? |
| 172 | ;; First avoid a sequence preceded by an odd number of backslashes. | 172 | ;; First avoid a sequence preceded by an odd number of backslashes. |
| 173 | (syntax-propertize-rules | 173 | (syntax-propertize-rules |
| 174 | (;; (rx (not (any ?\\)) | 174 | (;; ĦBackrefs don't work in syntax-propertize-rules! |
| 175 | ;; ?\\ (* (and ?\\ ?\\)) | 175 | (concat "\\(?:\\([RUru]\\)[Rr]?\\|^\\|[^\\]\\(?:\\\\.\\)*\\)" ;Prefix. |
| 176 | ;; (group (syntax string-quote)) | 176 | "\\(?:\\('\\)'\\('\\)\\|\\(?2:\"\\)\"\\(?3:\"\\)\\)") |
| 177 | ;; (backref 1) | ||
| 178 | ;; (group (backref 1))) | ||
| 179 | ;; ĦBackrefs don't work in syntax-propertize-rules! | ||
| 180 | "[^\\]\\\\\\(\\\\\\\\\\)*\\(?:''\\('\\)\\|\"\"\\(?2:\"\\)\\)" | ||
| 181 | (2 "\"")) ; dummy | ||
| 182 | (;; (rx (optional (group (any "uUrR"))) ; prefix gets syntax property | ||
| 183 | ;; (optional (any "rR")) ; possible second prefix | ||
| 184 | ;; (group (syntax string-quote)) ; maybe gets property | ||
| 185 | ;; (backref 2) ; per first quote | ||
| 186 | ;; (group (backref 2))) ; maybe gets property | ||
| 187 | ;; ĦBackrefs don't work in syntax-propertize-rules! | ||
| 188 | "\\([RUru]\\)?[Rr]?\\(?:\\('\\)'\\('\\)\\|\\(?2:\"\\)\"\\(?3:\"\\)\\)" | ||
| 189 | (3 (ignore (python-quote-syntax)))) | 177 | (3 (ignore (python-quote-syntax)))) |
| 190 | ;; This doesn't really help. | 178 | ;; This doesn't really help. |
| 191 | ;;((rx (and ?\\ (group ?\n))) (1 " ")) | 179 | ;;((rx (and ?\\ (group ?\n))) (1 " ")) |