summaryrefslogtreecommitdiff
path: root/elisp/geiser-log.el
diff options
context:
space:
mode:
authorLockywolf <lockywolf@gmail.com>2019-08-28 18:09:12 +0800
committerLockywolf <lockywolf@gmail.com>2019-09-03 15:06:02 +0800
commitee24d693951dfb6bc6683930c63b1eecfc4b628e (patch)
tree5e2ca6f785e87b932a832998a0933b9a9c59da81 /elisp/geiser-log.el
parent30e63ffd655f5fafb3e3bdb0aac99716ed097c5a (diff)
downloadgeiser-guile-ee24d693951dfb6bc6683930c63b1eecfc4b628e.tar.gz
geiser-guile-ee24d693951dfb6bc6683930c63b1eecfc4b628e.tar.bz2
Add a custom variable to scroll *geiser messages*.
Diffstat (limited to 'elisp/geiser-log.el')
-rw-r--r--elisp/geiser-log.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/elisp/geiser-log.el b/elisp/geiser-log.el
index 1828cb8..a252144 100644
--- a/elisp/geiser-log.el
+++ b/elisp/geiser-log.el
@@ -22,6 +22,11 @@
;;; Customization:
+(geiser-custom--defcustom geiser-log-autoscroll-buffer-p nil
+ "Set this so than the buffer *geiser messages* always shows the last message"
+ :group 'geiser
+ :type 'boolean)
+
(defvar geiser-log--buffer-name "*geiser messages*"
"Name of the Geiser log buffer.")
@@ -49,6 +54,12 @@
(when (> b geiser-log--max-buffer-size)
(delete-region (point-min) b))))
nil t)
+ (add-hook 'after-change-functions
+ '(lambda (b e len)
+ (when geiser-log-autoscroll-buffer-p
+ (let ((my-window (get-buffer-window (geiser-log--buffer) t)))
+ (set-window-point my-window (point)))))
+ nil t)
(setq buffer-read-only t))
(geiser-popup--define log geiser-log--buffer-name geiser-messages-mode)