From 0053f1b53ffeb94298ceb99b7127c86d4fd43dbe Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Mon, 11 Apr 2016 10:52:41 +0300 Subject: Define 'geiser-debug-mode' with 'define-derived-mode' --- elisp/geiser-debug.el | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'elisp') diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el index dbeefba..00fd4d9 100644 --- a/elisp/geiser-debug.el +++ b/elisp/geiser-debug.el @@ -75,18 +75,14 @@ See also `geiser-repl-auto-display-images-p'." (let ((map (make-sparse-keymap))) (suppress-keymap map) (set-keymap-parent map button-buffer-map) - map)) + map) + "Keymap for `geiser-debug-mode'.") -(defun geiser-debug-mode () +(define-derived-mode geiser-debug-mode nil "Geiser DBG" "A major mode for displaying Scheme compilation and evaluation results. \\{geiser-debug-mode-map}" - (interactive) - (kill-all-local-variables) (buffer-disable-undo) - (use-local-map geiser-debug-mode-map) (set-syntax-table scheme-mode-syntax-table) - (setq mode-name "Geiser DBG") - (setq major-mode 'geiser-debug-mode) (setq next-error-function 'geiser-edit--open-next) (setq buffer-read-only t)) -- cgit v1.2.3