diff lisp/progmodes/python.el @ 111449:132f2dfd549f

Merge from emacs-23
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 09 Nov 2010 15:07:10 -0500
parents 249a1455856a 85a2b871f225
children bd93bfc2fc83
line wrap: on
line diff
--- a/lisp/progmodes/python.el	Tue Nov 09 10:29:37 2010 +0000
+++ b/lisp/progmodes/python.el	Tue Nov 09 15:07:10 2010 -0500
@@ -171,21 +171,9 @@
   ;; string delimiters.  Fixme: Is there a better way?
   ;; First avoid a sequence preceded by an odd number of backslashes.
   (syntax-propertize-rules
-   (;; (rx (not (any ?\\))
-    ;;     ?\\ (* (and ?\\ ?\\))
-    ;;     (group (syntax string-quote))
-    ;;     (backref 1)
-    ;;     (group (backref 1)))
-    ;; ĦBackrefs don't work in syntax-propertize-rules!
-    "[^\\]\\\\\\(\\\\\\\\\\)*\\(?:''\\('\\)\\|\"\"\\(?2:\"\\)\\)"
-    (2 "\""))                           ; dummy
-   (;; (rx (optional (group (any "uUrR"))) ; prefix gets syntax property
-    ;;     (optional (any "rR"))           ; possible second prefix
-    ;;     (group (syntax string-quote))   ; maybe gets property
-    ;;     (backref 2)                     ; per first quote
-    ;;     (group (backref 2)))            ; maybe gets property
-    ;; ĦBackrefs don't work in syntax-propertize-rules!
-    "\\([RUru]\\)?[Rr]?\\(?:\\('\\)'\\('\\)\\|\\(?2:\"\\)\"\\(?3:\"\\)\\)"
+   (;; ĦBackrefs don't work in syntax-propertize-rules!
+    (concat "\\(?:\\([RUru]\\)[Rr]?\\|^\\|[^\\]\\(?:\\\\.\\)*\\)" ;Prefix.
+              "\\(?:\\('\\)'\\('\\)\\|\\(?2:\"\\)\"\\(?3:\"\\)\\)")
     (3 (ignore (python-quote-syntax))))
    ;; This doesn't really help.
    ;;((rx (and ?\\ (group ?\n))) (1 " "))