summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2016-04-11 10:54:48 +0300
committerJose Antonio Ortega Ruiz <jao@gnu.org>2016-04-23 02:20:25 +0200
commitdcaf849ccdfd488fb26e0d9131bbc59928690e0d (patch)
tree5bead0cd137c326b610aece78f1640a7d9d0282b
parent0053f1b53ffeb94298ceb99b7127c86d4fd43dbe (diff)
downloadgeiser-guile-dcaf849ccdfd488fb26e0d9131bbc59928690e0d.tar.gz
geiser-guile-dcaf849ccdfd488fb26e0d9131bbc59928690e0d.tar.bz2
Define 'geiser-xref-mode' with 'define-derived-mode'
-rw-r--r--elisp/geiser-xref.el10
1 files changed, 3 insertions, 7 deletions
diff --git a/elisp/geiser-xref.el b/elisp/geiser-xref.el
index a64795c..4bb22d8 100644
--- a/elisp/geiser-xref.el
+++ b/elisp/geiser-xref.el
@@ -46,18 +46,14 @@
(let ((map (make-sparse-keymap)))
(suppress-keymap map)
(set-keymap-parent map button-buffer-map)
- map))
+ map)
+ "Keymap for `geiser-xref-mode'.")
-(defun geiser-xref-mode ()
+(define-derived-mode geiser-xref-mode nil "Geiser Xref"
"Major mode for displaying cross-references.
\\{geiser-xref-mode-map}"
- (interactive)
- (kill-all-local-variables)
(buffer-disable-undo)
- (use-local-map geiser-xref-mode-map)
(set-syntax-table scheme-mode-syntax-table)
- (setq mode-name "Geiser Xref")
- (setq major-mode 'geiser-xref-mode)
(setq buffer-read-only t))