diff options
author | schinz <schinz@epfl.ch> | 2003-10-30 15:31:04 +0000 |
---|---|---|
committer | schinz <schinz@epfl.ch> | 2003-10-30 15:31:04 +0000 |
commit | 53b20443935f9e873b79aca3247eff17102c5778 (patch) | |
tree | bc085d4dfebfe5a07fbc76990320d2ea3407d888 | |
parent | d23d0a9c737c6350b3f00a555a3ec61fff8d92dc (diff) | |
download | scala-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.el | 13 |
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 |