Mercurial > emacs
annotate lisp/cedet/srecode/template.el @ 105666:933cd581fbcf
* ibuffer.el (ibuffer-confirm-operation-on): Correction to error
re-throw, `err' is a pair not a list so can't use apply (Bug#4740).
author | Kevin Ryde <user42@zip.com.au> |
---|---|
date | Sun, 18 Oct 2009 23:12:02 +0000 |
parents | 5b8c8cd21526 |
children | 91f3ea36baf8 |
rev | line source |
---|---|
104498 | 1 ;;; srecode-template.el --- SRecoder template language parser support. |
2 | |
105284 | 3 ;; Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc. |
104498 | 4 |
5 ;; This file is part of GNU Emacs. | |
6 | |
7 ;; GNU Emacs is free software: you can redistribute it and/or modify | |
8 ;; it under the terms of the GNU General Public License as published by | |
9 ;; the Free Software Foundation, either version 3 of the License, or | |
10 ;; (at your option) any later version. | |
11 | |
12 ;; GNU Emacs is distributed in the hope that it will be useful, | |
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 ;; GNU General Public License for more details. | |
16 | |
17 ;; You should have received a copy of the GNU General Public License | |
18 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | |
19 | |
20 ;;; Commentary: | |
21 ;; | |
22 ;; Parser setup for the semantic recoder template parser. | |
23 | |
24 ;;; Code: | |
25 (require 'semantic) | |
26 (require 'semantic/ctxt) | |
27 (require 'semantic/wisent) | |
28 (require 'srecode/srt-wy) | |
29 | |
30 (define-mode-local-override semantic-tag-components | |
31 srecode-template-mode (tag) | |
32 "Return sectiondictionary tags." | |
33 (when (semantic-tag-of-class-p tag 'function) | |
34 (let ((dicts (semantic-tag-get-attribute tag :dictionaries)) | |
35 (ans nil)) | |
36 (while dicts | |
37 (setq ans (append ans (cdr (car dicts)))) | |
38 (setq dicts (cdr dicts))) | |
39 ans) | |
40 )) | |
41 | |
105406
5b8c8cd21526
* cedet/srecode/srt-mode.el (srecode-template-mode): Doc fix.
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
42 ;;;###autoload |
104498 | 43 (defun srecode-template-setup-parser () |
44 "Setup buffer for parse." | |
45 (srecode-template-wy--install-parser) | |
46 | |
47 (setq | |
48 ;; Lexical Analysis | |
49 semantic-lex-analyzer 'wisent-srecode-template-lexer | |
50 ;; Parsing | |
51 ;; Environment | |
52 semantic-imenu-summary-function 'semantic-format-tag-name | |
53 imenu-create-index-function 'semantic-create-imenu-index | |
54 semantic-command-separation-character "\n" | |
55 semantic-lex-comment-regex ";;" | |
56 ;; Speedbar | |
57 semantic-symbol->name-assoc-list | |
58 '((function . "Template") | |
59 (variable . "Variable") | |
60 ) | |
61 ;; Navigation | |
62 senator-step-at-tag-classes '(function variable) | |
63 )) | |
64 | |
105406
5b8c8cd21526
* cedet/srecode/srt-mode.el (srecode-template-mode): Doc fix.
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
65 (provide 'srecode/template) |
104498 | 66 |
105406
5b8c8cd21526
* cedet/srecode/srt-mode.el (srecode-template-mode): Doc fix.
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
67 ;; Local variables: |
5b8c8cd21526
* cedet/srecode/srt-mode.el (srecode-template-mode): Doc fix.
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
68 ;; generated-autoload-file: "loaddefs.el" |
5b8c8cd21526
* cedet/srecode/srt-mode.el (srecode-template-mode): Doc fix.
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
69 ;; generated-autoload-feature: srecode/loaddefs |
5b8c8cd21526
* cedet/srecode/srt-mode.el (srecode-template-mode): Doc fix.
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
70 ;; generated-autoload-load-name: "srecode/template" |
5b8c8cd21526
* cedet/srecode/srt-mode.el (srecode-template-mode): Doc fix.
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
71 ;; End: |
104498 | 72 |
105377 | 73 ;; arch-tag: 037fbca7-e846-4521-b801-3463f50c3080 |
104498 | 74 ;;; srecode/template.el ends here |