Home | History | Annotate | Download | only in emacs

Lines Matching defs:mode

2 ;; Description: Major mode for the LLVM assembler language.

5 ;; Create mode-specific tables.
6 (defvar llvm-mode-syntax-table nil
7 "Syntax table used while in LLVM mode.")
52 (if (not llvm-mode-syntax-table)
54 (setq llvm-mode-syntax-table (make-syntax-table))
58 llvm-mode-syntax-table)))
92 (defvar llvm-mode-abbrev-table nil
93 "Abbrev table used while in LLVM mode.")
94 (define-abbrev-table 'llvm-mode-abbrev-table ())
96 (defvar llvm-mode-hook nil)
97 (defvar llvm-mode-map nil) ; Create a mode-specific keymap.
99 (if (not llvm-mode-map)
101 (setq llvm-mode-map (make-sparse-keymap))
102 (define-key llvm-mode-map "\t" 'tab-to-tab-stop)
103 (define-key llvm-mode-map "\es" 'center-line)
104 (define-key llvm-mode-map "\eS" 'center-paragraph))
107 (defun llvm-mode ()
108 "Major mode for editing LLVM source files.
109 \\{llvm-mode-map}
110 Runs llvm-mode-hook on startup."
113 (use-local-map llvm-mode-map) ; Provides the local keymap.
114 (setq major-mode 'llvm-mode)
117 (setq major-mode 'llvm-mode ; This is how describe-mode
119 mode-name "LLVM" ; This name goes into the modeline.
122 (setq local-abbrev-table llvm-mode-abbrev-table)
123 (set-syntax-table llvm-mode-syntax-table)
125 (run-hooks 'llvm-mode-hook)) ; Finally, this permits the user to
126 ; customize the mode with a hook.
128 ;; Associate .ll files with llvm-mode
129 (setq auto-mode-alist
130 (append '(("\\.ll$" . llvm-mode)) auto-mode-alist))
132 (provide 'llvm-mode)
133 ;; end of llvm-mode.el