summaryrefslogtreecommitdiff
path: root/lisp/cedet/srecode/srt-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/cedet/srecode/srt-mode.el')
-rw-r--r--lisp/cedet/srecode/srt-mode.el15
1 files changed, 4 insertions, 11 deletions
diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el
index 5fb2433b19e..7df06a608f5 100644
--- a/lisp/cedet/srecode/srt-mode.el
+++ b/lisp/cedet/srecode/srt-mode.el
@@ -1,6 +1,6 @@
;;; srecode/srt-mode.el --- Major mode for writing screcode macros
-;; Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -183,27 +183,20 @@ we can tell font lock about them.")
"Keymap used in srecode mode.")
;;;###autoload
-(defun srecode-template-mode ()
+(define-derived-mode srecode-template-mode fundamental-mode "SRecorder"
"Major-mode for writing SRecode macros."
- (interactive)
- (kill-all-local-variables)
- (setq major-mode 'srecode-template-mode
- mode-name "SRecoder"
- comment-start ";;"
+ (setq comment-start ";;"
comment-end "")
(set (make-local-variable 'parse-sexp-ignore-comments) t)
(set (make-local-variable 'comment-start-skip)
"\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
- (set-syntax-table srecode-template-mode-syntax-table)
- (use-local-map srecode-template-mode-map)
(set (make-local-variable 'font-lock-defaults)
'(srecode-font-lock-keywords
nil ;; perform string/comment fontification
nil ;; keywords are case sensitive.
;; This puts _ & - as a word constituant,
;; simplifying our keywords significantly
- ((?_ . "w") (?- . "w"))))
- (run-hooks 'srecode-template-mode-hook))
+ ((?_ . "w") (?- . "w")))))
;;;###autoload
(defalias 'srt-mode 'srecode-template-mode)