summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschinz <schinz@epfl.ch>2003-10-30 15:31:04 +0000
committerschinz <schinz@epfl.ch>2003-10-30 15:31:04 +0000
commit53b20443935f9e873b79aca3247eff17102c5778 (patch)
treebc085d4dfebfe5a07fbc76990320d2ea3407d888
parentd23d0a9c737c6350b3f00a555a3ec61fff8d92dc (diff)
downloadscala-53b20443935f9e873b79aca3247eff17102c5778.tar.gz
scala-53b20443935f9e873b79aca3247eff17102c5778.tar.bz2
scala-53b20443935f9e873b79aca3247eff17102c5778.zip
- added compatibility function scala-regexp-opt...
- added compatibility function scala-regexp-opt-charset to work around different versions in GNU Emacs and XEmacs
-rw-r--r--support/emacs/scala-mode.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/support/emacs/scala-mode.el b/support/emacs/scala-mode.el
index 179e98a872..c203f00abb 100644
--- a/support/emacs/scala-mode.el
+++ b/support/emacs/scala-mode.el
@@ -12,6 +12,13 @@
(defconst scala-bug-e-mail "Michel.Schinz@epfl.ch")
(defconst scala-web-url "http://lamp.epfl.ch/scala/")
+;; XEmacs compatibility
+
+(defun scala-regexp-opt-charset (cset)
+ (regexp-opt-charset (if (integerp ?a)
+ cset
+ (mapcar #'char-to-string cset))))
+
;; Customization
(defgroup scala
@@ -52,11 +59,11 @@ reserved keywords when used alone.")
"List of all Scala special characters.")
(defconst scala-most-special-char-re
- (regexp-opt-charset scala-most-special-chars)
+ (scala-regexp-opt-charset scala-most-special-chars)
"Regular expression matching a single Scala special character")
(defconst scala-all-special-char-re
- (regexp-opt-charset scala-all-special-chars)
+ (scala-regexp-opt-charset scala-all-special-chars)
"Regular expression matching a single Scala special character")
(defconst scala-keywords-re
@@ -478,7 +485,7 @@ When called repeatedly, indent each time one stop further on the right."
(defvar scala-font-lock-keywords
`(;; keywords
(,scala-keywords-re
- 1 font-lock-keyword-face nil)
+ 0 font-lock-keyword-face nil)
;; constants
(,scala-constants-re