summaryrefslogtreecommitdiff
path: root/elisp/geiser-log.el
diff options
context:
space:
mode:
Diffstat (limited to 'elisp/geiser-log.el')
-rw-r--r--elisp/geiser-log.el16
1 files changed, 15 insertions, 1 deletions
diff --git a/elisp/geiser-log.el b/elisp/geiser-log.el
index 49b067d..aa1b477 100644
--- a/elisp/geiser-log.el
+++ b/elisp/geiser-log.el
@@ -42,7 +42,6 @@
(define-derived-mode geiser-messages-mode fundamental-mode "Geiser Messages"
"Simple mode for Geiser log messages buffer."
- (kill-all-local-variables)
(buffer-disable-undo)
(add-hook 'after-change-functions
'(lambda (b e len)
@@ -90,6 +89,21 @@ With prefix, activates all logging levels."
(interactive)
(geiser-log--with-buffer (delete-region (point-min) (point-max))))
+(defun geiser-log-toggle-verbose ()
+ "Toggle verbose logs"
+ (interactive)
+ (setq geiser-log-verbose-p (not geiser-log-verbose-p))
+ (message "Geiser verbose logs %s"
+ (if geiser-log-verbose-p "enabled" "disabled")))
+
+(defun geiser-log--deactivate ()
+ (interactive)
+ (setq geiser-log-verbose-p nil)
+ (when (eq (current-buffer) (geiser-log--buffer)) (View-quit)))
+
+(define-key geiser-messages-mode-map "c" 'geiser-log-clear)
+(define-key geiser-messages-mode-map "Q" 'geiser-log--deactivate)
+
(provide 'geiser-log)
;;; geiser-log.el ends here