summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-14 23:21:23 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-12-14 23:21:23 +0100
commit176b84f5aedc1bb23d91337b10570981e9af7545 (patch)
treeff29e22aeccc69482271cf60652d323c169363be /elisp
parent8cac1fd62779f6552ce4e5ac5d8f9a886526420d (diff)
downloadgeiser-chez-176b84f5aedc1bb23d91337b10570981e9af7545.tar.gz
geiser-chez-176b84f5aedc1bb23d91337b10570981e9af7545.tar.bz2
Debugging aids
A couple functions to manage logs, and a fix to the definition of geiser-messages-mode: do not ever kill all local variables in a derived mode definition!
Diffstat (limited to 'elisp')
-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