;;; srecode/srt-mode.el --- Major mode for writing screcode macros
-;; Copyright (C) 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007-2014 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
(3 font-lock-builtin-face ))
("^\\(sectiondictionary\\)\\s-+\""
(1 font-lock-keyword-face))
+ ("^\\s\s*\\(section\\)\\s-+\""
+ (1 font-lock-keyword-face))
+ ("^\\s\s*\\(end\\)"
+ (1 font-lock-keyword-face))
("^\\(bind\\)\\s-+\""
(1 font-lock-keyword-face))
;; Variable type setting
- ("^\\(set\\)\\s-+\\(\\w+\\)\\s-+"
+ ("^\\s\s*\\(set\\)\\s-+\\(\\w+\\)\\s-+"
(1 font-lock-keyword-face)
(2 font-lock-variable-name-face))
- ("^\\(show\\)\\s-+\\(\\w+\\)\\s-*$"
+ ("^\\s\s*\\(show\\)\\s-+\\(\\w+\\)\\s-*$"
(1 font-lock-keyword-face)
(2 font-lock-variable-name-face))
("\\<\\(macro\\)\\s-+\""
"Keymap used in srecode mode.")
;;;###autoload
-(define-derived-mode srecode-template-mode fundamental-mode "SRecorder"
+(define-derived-mode srecode-template-mode fundamental-mode "SRecode"
+ ;; FIXME: Shouldn't it derive from prog-mode?
"Major-mode for writing SRecode macros."
- (setq comment-start ";;"
- comment-end "")
+ (set (make-local-variable 'comment-start) ";;")
+ (set (make-local-variable 'comment-end) "")
(set (make-local-variable 'parse-sexp-ignore-comments) t)
(set (make-local-variable 'comment-start-skip)
"\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
'(srecode-font-lock-keywords
nil ;; perform string/comment fontification
nil ;; keywords are case sensitive.
- ;; This puts _ & - as a word constituant,
+ ;; This puts _ & - as a word constituent,
;; simplifying our keywords significantly
((?_ . "w") (?- . "w")))))
"Provide help for working with macros in a template."
(interactive)
(let* ((root 'srecode-template-inserter)
- (chl (aref (class-v root) class-children))
+ (chl (eieio--class-children (class-v root)))
(ess (srecode-template-get-escape-start))
(ees (srecode-template-get-escape-end))
)
(showexample t)
)
(setq chl (cdr chl))
- (setq chl (append (aref (class-v C) class-children) chl))
+ (setq chl (append (eieio--class-children (class-v C)) chl))
(catch 'skip
(when (eq C 'srecode-template-inserter-section-end)
(if (> start (point))
;; If our starting point is after the found point, that
- ;; means we are not inside the macro. Retur nil.
+ ;; means we are not inside the macro. Return nil.
nil
;; We are inside the macro, extract the text so far.
(let* ((macroend (match-beginning 0))
;; generated-autoload-load-name: "srecode/srt-mode"
;; End:
-;; arch-tag: 9c613c25-d885-417a-8f0d-1824b26b22a5
;;; srecode/srt-mode.el ends here