declare smobs in alloc.c
[bpt/emacs.git] / lisp / cedet / srecode / srt-mode.el
index 7df06a6..48a4865 100644 (file)
@@ -1,6 +1,6 @@
 ;;; 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-+\""
@@ -183,10 +187,11 @@ we can tell font lock about them.")
   "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]\\)\\(\\\\\\\\\\)*\\);+ *")
@@ -194,7 +199,7 @@ we can tell font lock about them.")
        '(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")))))
 
@@ -228,7 +233,7 @@ we can tell font lock about them.")
   "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))
         )
@@ -244,7 +249,7 @@ we can tell font lock about them.")
               (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)
@@ -483,7 +488,7 @@ section or ? for an ask variable."
 
        (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))
@@ -740,5 +745,4 @@ When optional BUFFER is provided, search that buffer."
 ;; generated-autoload-load-name: "srecode/srt-mode"
 ;; End:
 
-;; arch-tag: 9c613c25-d885-417a-8f0d-1824b26b22a5
 ;;; srecode/srt-mode.el ends here