diff options
author | Lockywolf <lockywolf@gmail.com> | 2019-08-28 18:09:12 +0800 |
---|---|---|
committer | Lockywolf <lockywolf@gmail.com> | 2019-09-03 15:06:02 +0800 |
commit | 8fa3ceefd0ec8674a76e1052095474cbe3221a24 (patch) | |
tree | 7f2a681c8b008bea77d0988d6a8de036215d3b6a /elisp/geiser-log.el | |
parent | c8daa71db73e6f9bfbf9b7d23477d8e885fe8d64 (diff) | |
download | geiser-8fa3ceefd0ec8674a76e1052095474cbe3221a24.tar.gz geiser-8fa3ceefd0ec8674a76e1052095474cbe3221a24.tar.bz2 |
Add a custom variable to scroll *geiser messages*.
Diffstat (limited to 'elisp/geiser-log.el')
-rw-r--r-- | elisp/geiser-log.el | 11 |
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) |