Function: snmp-common-mode
snmp-common-mode is a byte-compiled function defined in
snmp-mode.el.gz.
Signature
(snmp-common-mode NAME MODE ABBREV FONT-KEYWORDS IMENU-INDEX MODE-TEMPO-TAGS)
Source Code
;; Defined in /usr/src/emacs/lisp/net/snmp-mode.el.gz
;; Set up the stuff that's common between snmp-mode and snmpv2-mode
;;
(defun snmp-common-mode (name mode abbrev font-keywords imenu-index mode-tempo-tags)
(kill-all-local-variables)
;; Become the current major mode
(setq mode-name name)
(setq major-mode mode)
;; Activate keymap, syntax table, and abbrev table
(use-local-map snmp-mode-map)
(set-syntax-table snmp-mode-syntax-table)
(setq local-abbrev-table abbrev)
;; Set up paragraphs (?)
(setq-local paragraph-start (concat "$\\|" page-delimiter))
(setq-local paragraph-separate paragraph-start)
(setq-local paragraph-ignore-fill-prefix t)
;; Set up comments
(setq-local comment-start "-- ")
(setq-local comment-start-skip "--+[ \t]*")
(setq-local comment-column 40)
(setq-local parse-sexp-ignore-comments t)
;; Set up indentation
(if snmp-special-indent
(setq-local indent-line-function 'snmp-indent-line))
(setq-local tab-always-indent snmp-tab-always-indent)
;; Font Lock
(setq-local font-lock-defaults (cons font-keywords '(nil nil ((?- . "w 1234")))))
;; Imenu
(setq-local imenu-create-index-function imenu-index)
;; Tempo
(tempo-use-tag-list mode-tempo-tags)
(setq-local tempo-match-finder "\\b\\(.+\\)\\=")
(setq-local tempo-interactive t)
;; Miscellaneous customization
(setq-local require-final-newline mode-require-final-newline))