aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/coq/xemacs21528.v7
-rw-r--r--generic/proof-script.el15
2 files changed, 21 insertions, 1 deletions
diff --git a/etc/coq/xemacs21528.v b/etc/coq/xemacs21528.v
index bad593d7..b48ab9ee 100644
--- a/etc/coq/xemacs21528.v
+++ b/etc/coq/xemacs21528.v
@@ -1,4 +1,9 @@
-(* There are regexp problems with XEmacs 21.5.28 which break this example *)
+(* There are regexp problems with XEmacs 21.5.28 which break this example.
+
+ 9.12.07: It turned out that the default syntax table wasn't merged
+ properly with the default, suspect bugs in derived.el.
+ Patched in `proof-script.el' for now.
+*)
Module Type T.
diff --git a/generic/proof-script.el b/generic/proof-script.el
index 15eda466..e30ddcfc 100644
--- a/generic/proof-script.el
+++ b/generic/proof-script.el
@@ -2442,6 +2442,21 @@ command."
;; font-lock-keywords isn't automatically buffer-local in Emacs 21.2
(make-local-variable 'font-lock-keywords)
+ ;; Syntax table in XEmacs 21.5.b28 does not classify newline as space,
+ ;; breaking regexps using \\s- that rely on that (showed up for Coq).
+ ;; In fact it seems to be broken rather more seriously than that:
+ ;; default syntax table of fundamental mode is not merged at all!
+ (if (and proof-running-on-XEmacs
+ ;; hopefully fixed for later versions but we don't know yet
+ (>= 21 emacs-major-version)
+ (>= 5 emacs-minor-version))
+ (progn
+ (derived-mode-merge-syntax-tables
+ (standard-syntax-table) (syntax-table))
+ ;; We also need this
+ (modify-syntax-entry ?\n " ")))
+
+
;; During write-file it can happen that we re-set the mode for
;; the currently active scripting buffer. The user might also
;; do this for some reason. We could maybe let