From 53b20443935f9e873b79aca3247eff17102c5778 Mon Sep 17 00:00:00 2001 From: schinz Date: Thu, 30 Oct 2003 15:31:04 +0000 Subject: - added compatibility function scala-regexp-opt... - added compatibility function scala-regexp-opt-charset to work around different versions in GNU Emacs and XEmacs --- support/emacs/scala-mode.el | 13 ++++++++++--- 1 file 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 -- cgit v1.2.3