aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/cedet/srecode
diff options
context:
space:
mode:
authorPaul Eggert2011-01-13 16:33:24 -0800
committerPaul Eggert2011-01-13 16:33:24 -0800
commit096d914f5d64f1606be8f6c2674c69c8de4eb5b3 (patch)
tree2fb30c9c3c418716ba9ac47d488a7360f730b3c2 /lisp/cedet/srecode
parent193770eec942defa96c7ea310773b40534f709d1 (diff)
parent4d789d84b8d74fc01b83277fa9834bb9aa83642b (diff)
downloademacs-096d914f5d64f1606be8f6c2674c69c8de4eb5b3.tar.gz
emacs-096d914f5d64f1606be8f6c2674c69c8de4eb5b3.zip
Merge from mainline.
Diffstat (limited to 'lisp/cedet/srecode')
-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 @@
1;;; srecode/srt-mode.el --- Major mode for writing screcode macros 1;;; srecode/srt-mode.el --- Major mode for writing screcode macros
2 2
3;; Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 3;; Copyright (C) 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
4 4
5;; This file is part of GNU Emacs. 5;; This file is part of GNU Emacs.
6 6
@@ -183,27 +183,20 @@ we can tell font lock about them.")
183 "Keymap used in srecode mode.") 183 "Keymap used in srecode mode.")
184 184
185;;;###autoload 185;;;###autoload
186(defun srecode-template-mode () 186(define-derived-mode srecode-template-mode fundamental-mode "SRecorder"
187 "Major-mode for writing SRecode macros." 187 "Major-mode for writing SRecode macros."
188 (interactive) 188 (setq comment-start ";;"
189 (kill-all-local-variables)
190 (setq major-mode 'srecode-template-mode
191 mode-name "SRecoder"
192 comment-start ";;"
193 comment-end "") 189 comment-end "")
194 (set (make-local-variable 'parse-sexp-ignore-comments) t) 190 (set (make-local-variable 'parse-sexp-ignore-comments) t)
195 (set (make-local-variable 'comment-start-skip) 191 (set (make-local-variable 'comment-start-skip)
196 "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") 192 "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
197 (set-syntax-table srecode-template-mode-syntax-table)
198 (use-local-map srecode-template-mode-map)
199 (set (make-local-variable 'font-lock-defaults) 193 (set (make-local-variable 'font-lock-defaults)
200 '(srecode-font-lock-keywords 194 '(srecode-font-lock-keywords
201 nil ;; perform string/comment fontification 195 nil ;; perform string/comment fontification
202 nil ;; keywords are case sensitive. 196 nil ;; keywords are case sensitive.
203 ;; This puts _ & - as a word constituant, 197 ;; This puts _ & - as a word constituant,
204 ;; simplifying our keywords significantly 198 ;; simplifying our keywords significantly
205 ((?_ . "w") (?- . "w")))) 199 ((?_ . "w") (?- . "w")))))
206 (run-hooks 'srecode-template-mode-hook))
207 200
208;;;###autoload 201;;;###autoload
209(defalias 'srt-mode 'srecode-template-mode) 202(defalias 'srt-mode 'srecode-template-mode)