summaryrefslogtreecommitdiffstats
path: root/emacs.d/nxhtml/etc/schema/nxml-erb.patch
blob: 362913b562650ca9c10d8ba6f1002fd8a9796a5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- nxml-mode-orig/xmltok.el	2005-10-16 15:32:53.000000000 -0400
+++ nxml-mode-erb/xmltok.el	2006-09-01 01:02:55.000000000 -0400
@@ -496,6 +496,9 @@
 	  (xmltok+ (xmltok-g markup-declaration "!")
 		   (xmltok-g comment-first-dash "-"
 			     (xmltok-g comment-open "-") opt) opt))
+         (erb-section
+          (xmltok+ "%"
+                   (xmltok-g erb-section-open "[^%]") opt))
 	 (cdata-section
 	  (xmltok+ "!"
 		  (xmltok-g marked-section-open "\\[")
@@ -526,6 +529,7 @@
 			       ;; by default
 			       or cdata-section
 			       or comment
+                               or erb-section
 			       or processing-instruction))
     (xmltok-defregexp
      xmltok-attribute
@@ -693,6 +697,16 @@
 					      nil
 					      "]]>")
 			'not-well-formed)))
+               ((xmltok-after-lt start erb-section-open)
+		(setq xmltok-type
+		      (if (re-search-forward "[^%]%>" nil t)
+			  'erb-section
+			(xmltok-add-error "No closing %>")
+			(xmltok-add-dependent 'xmltok-unclosed-reparse-p
+					      nil
+					      nil
+					      "%>")
+			'not-well-formed)))
 	       ((xmltok-after-lt start processing-instruction-question)
 		(xmltok-scan-after-processing-instruction-open))
 	       ((xmltok-after-lt start comment-open)