diff options
author | Mark Oteiza <mvoteiza@udel.edu> | 2015-10-13 18:14:49 -0400 |
---|---|---|
committer | Mark Oteiza <mvoteiza@udel.edu> | 2015-10-13 18:14:49 -0400 |
commit | e90de8276fb8c8365be8b8d0f696b3c93c4b7c4f (patch) | |
tree | 50bb0c0b4f4bdf5ac47a6282ef0331ed9b4cd17f | |
parent | 18b0eb7f1cc16fe33f89c74d2497a6fcb4b863fd (diff) | |
download | emacs-e90de8276fb8c8365be8b8d0f696b3c93c4b7c4f.tar.gz |
Derive mpc-mode from special-mode
lisp/mpc.el (mpc-mode-map): Make from sparse keymap. Unbind g.
(mpc-mode): Derive from special mode.
(mpc-songs-mode-map): Don't set parent keymap.
-rw-r--r-- | lisp/mpc.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/mpc.el b/lisp/mpc.el index 063a545da81..2142529b2e0 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -1090,8 +1090,7 @@ If PLAYLIST is t or nil or missing, use the main playlist." ;;; The actual UI code ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar mpc-mode-map - (let ((map (make-keymap))) - (suppress-keymap map) + (let ((map (make-sparse-keymap))) ;; (define-key map "\e" 'mpc-stop) (define-key map "q" 'mpc-quit) (define-key map "\r" 'mpc-select) @@ -1110,6 +1109,7 @@ If PLAYLIST is t or nil or missing, use the main playlist." ;; is applied elsewhere :-( ;; (define-key map [(double mouse-2)] 'mpc-play-at-point) (define-key map "p" 'mpc-pause) + (define-key map "g" nil) map)) (easy-menu-define mpc-mode-menu mpc-mode-map @@ -1158,10 +1158,9 @@ If PLAYLIST is t or nil or missing, use the main playlist." :help "Append to the playlist") map)) -(define-derived-mode mpc-mode fundamental-mode "MPC" +(define-derived-mode mpc-mode special-mode "MPC" "Major mode for the features common to all buffers of MPC." (buffer-disable-undo) - (setq buffer-read-only t) (if (boundp 'tool-bar-map) ; not if --without-x (setq-local tool-bar-map mpc-tool-bar-map)) (setq-local truncate-lines t)) @@ -1883,7 +1882,6 @@ A value of t means the main playlist.") (defvar mpc-songs-mode-map (let ((map (make-sparse-keymap))) - (set-keymap-parent map mpc-mode-map) (define-key map [remap mpc-select] 'mpc-songs-jump-to) map)) |