(defcustom dojo-workspace-path "/home/wpausch/workspace/" "Workspace path, used e.g. for resolving imports" :type 'string :group 'dojo ) (defcustom dojo-indent-width 4 "Indentation width to use when generating js code" :type 'integer :group 'dojo ) ; icicles - file name completion (require 'icicles) (icy-mode 1) (load-file "~/workspace/emacs-dojo-support/elisp/common/strings.el") (load-file "~/workspace/emacs-dojo-support/elisp/common/source.el") (load-file "~/workspace/emacs-dojo-support/elisp/dojo-support/includes.el") (defvar dojo-mode-hook nil) (defvar dojo-mode-map (let ((map (make-keymap)) ) (define-key map "\C-xf" 'icicle-locate) (define-key map "\C-xi" 'dojo-include-file) (define-key map "\C-c\C-f" 'dojo-add-function) map ) "Keymap for dojo-mode" ) (add-to-list 'auto-mode-alist '("\\.js\\'" . dojo-mode)) (defun dojo-mode () "Major mode for editing Dojo js files" (interactive) (kill-all-local-variables) ;(set-syntax-table wpdl-mode-syntax-table) (use-local-map dojo-mode-map) ;(global-set-key (kbd "C-x i") 'dojo-include-file) ;(set (make-local-variable 'font-lock-defaults) '(wpdl-font-lock-keywords)) ;(set (make-local-variable 'indent-line-function) 'wpdl-indent-line) (setq major-mode 'dojo-mode) (setq mode-name "Dojo") (setq tab-width dojo-indent-width) (setq indent-tabs-mode nil) (run-hooks 'dojo-mode-hook)) ) (provide 'dojo-mode)