diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-12-14 23:21:23 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-12-14 23:21:23 +0100 |
commit | 753b2b8d34480ae39ce803b28aecb52d7c5ff99c (patch) | |
tree | 0d431c6d7fe8991e3211ed031405af8b1f63b9ef /elisp | |
parent | 759da77c957816820803d525ed8779224a89aec3 (diff) | |
download | geiser-753b2b8d34480ae39ce803b28aecb52d7c5ff99c.tar.gz geiser-753b2b8d34480ae39ce803b28aecb52d7c5ff99c.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.el | 16 |
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 |