my-emacs-d/elpa/yasnippet-20161022.646/snippets/emacs-lisp-mode/minor_mode
2016-10-24 08:30:06 +02:00

20 lines
467 B
Plaintext

# -*- mode: snippet -*-
# name: minor_mode
# key: minor
# --
(defvar ${1:mode}-modeline-indicator " ${2:indicator}"
"call ($1-install-mode) again if this is changed")
(defvar $1-mode nil)
(make-variable-buffer-local '$1-mode)
(put '$1-mode 'permanent-local t)
(defun $1-mode (&optional arg)
"$0"
(interactive "P")
(setq $1-mode
(if (null arg) (not $1-mode)
(> (prefix-numeric-value arg) 0)))
(force-mode-line-update))
(provide '$1-mode)