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.")
53 (if (not llvm-mode-syntax-table)
55 (setq llvm-mode-syntax-table (make-syntax-table))
59 llvm-mode-syntax-table)))
93 (defvar llvm-mode-abbrev-table nil
94 "Abbrev table used while in LLVM mode.")
95 (define-abbrev-table 'llvm-mode-abbrev-table ())
97 (defvar llvm-mode-hook nil)
98 (defvar llvm-mode-map nil) ; Create a mode-specific keymap.
100 (if (not llvm-mode-map)
102 (setq llvm-mode-map (make-sparse-keymap))
103 (define-key llvm-mode-map "\t" 'tab-to-tab-stop)
104 (define-key llvm-mode-map "\es" 'center-line)
105 (define-key llvm-mode-map "\eS" 'center-paragraph))
108 (defun llvm-mode ()
109 "Major mode for editing LLVM source files.
110 \\{llvm-mode-map}
111 Runs llvm-mode-hook on startup."
114 (use-local-map llvm-mode-map) ; Provides the local keymap.
115 (setq major-mode 'llvm-mode)
118 (setq major-mode 'llvm-mode ; This is how describe-mode
120 mode-name "LLVM" ; This name goes into the modeline.
123 (setq local-abbrev-table llvm-mode-abbrev-table)
124 (set-syntax-table llvm-mode-syntax-table)
126 (run-hooks 'llvm-mode-hook)) ; Finally, this permits the user to
127 ; customize the mode with a hook.
129 ;; Associate .ll files with llvm-mode
130 (setq auto-mode-alist
131 (append '(("\\.ll$" . llvm-mode)) auto-mode-alist))
133 (provide 'llvm-mode)
134 ;; end of llvm-mode.el