scel: bytecompile fix, correct use of defvar and defconst and add requirements

Signed-off-by: Tim Blechmann <tim@klingt.org>
This commit is contained in:
Tim Blechmann 2011-07-22 20:31:17 +02:00
parent 5aa9b34534
commit 83d0d94a1a
6 changed files with 45 additions and 10 deletions

View file

@ -1,3 +1,25 @@
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2 of the
;; License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
;; USA
(eval-when-compile
(require 'sclang-interp)
)
(sclang-set-command-handler
'openDevSource
(lambda (file)

View file

@ -25,7 +25,8 @@
;; (defun sclang-execute-key (char)
;; (sclang-eval-string (sclang-format "Emacs.executeKey(%o)" char)))
(require 'sclang-interp)
(eval-and-compile (require 'sclang-util)
(require 'sclang-interp))
(defun sclang-read-keys ()
(interactive)
@ -34,7 +35,7 @@
(while t
(setq char (read-event))
(clear-this-command-keys)
(when (char-valid-p char)
(when (characterp char)
(message "%s (%d)" (char-to-string char) char)
(sclang-eval-string (format "Emacs.keys.at(%d).value(%d)" char char))))))

View file

@ -16,6 +16,11 @@
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
(eval-when-compile
(require 'sclang-mode)
)
(easy-mmode-define-minor-mode sclang-minor-mode
"Toggle sclang-minor-mode.
With no argument, this command toggles the mode.

View file

@ -18,7 +18,8 @@
(eval-when-compile
(require 'cl)
(load "cl-seq" nil t)
(require 'font-lock))
(require 'font-lock)
(require 'sclang-util))
(require 'sclang-interp)
(require 'sclang-language)
@ -154,7 +155,7 @@
;; font-lock support
;; =====================================================================
(defvar sclang-font-lock-keyword-list
(defconst sclang-font-lock-keyword-list
'(
"arg"
"classvar"
@ -170,7 +171,7 @@
)
"*List of keywords to highlight in SCLang mode.")
(defvar sclang-font-lock-builtin-list
(defconst sclang-font-lock-builtin-list
'(
"false"
"inf"
@ -179,7 +180,7 @@
)
"*List of builtins to highlight in SCLang mode.")
(defvar sclang-font-lock-method-list
(defconst sclang-font-lock-method-list
'(
"ar"
"for"
@ -193,7 +194,7 @@
)
"*List of methods to highlight in SCLang mode.")
(defvar sclang-font-lock-error-list
(defconst sclang-font-lock-error-list
'(
"die"
"error"
@ -215,7 +216,7 @@
(defvar sclang-font-lock-keywords-3 nil
"Gaudy level highlighting for SCLang mode.")
(defconst sclang-font-lock-keywords nil
(defvar sclang-font-lock-keywords nil
"Default expressions to highlight in SCLang mode.")
(defconst sclang-font-lock-defaults '((sclang-font-lock-keywords

View file

@ -15,8 +15,12 @@
;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
;; USA
(eval-and-compile
(require 'cl))
(eval-when-compile
(require 'cl)
(require 'sclang-util)
(require 'sclang-interp)
(require 'sclang-language)
(require 'sclang-mode))
(defcustom sclang-server-panel "Server.default.makeWindow"
"*Expression to execute when `sclang-show-server-panel' is invoked."

View file

@ -26,6 +26,8 @@
;;; Code:
(eval-when-compile (require 'sclang-util)
(require 'sclang-language))
(eval-and-compile (require 'sclang-interp))
(defvar sclang-widgets nil)