Index: sbbs.el ================================================================== --- sbbs.el +++ sbbs.el @@ -43,10 +43,14 @@ (boolean :tag "Use TLS?")))) (defcustom sbbs-jump-to-link t "Jump to first link after narrowing posts." :type 'boolean) + +(defcustom sbbs-recenter-to-top t + "Move point to top of frame when moving through posts." + :type 'boolean) (defface sbbs--spoiler-face '((((background light)) :background "black" :foreground "black") (((background dark)) :background "white" :foreground "white")) "Face for spoiler text in threads.") @@ -478,11 +482,13 @@ (catch 'found (while (search-forward-regexp "^#" nil t) (when (and (eq 'highlight (get-text-property (point) 'face)) (not (get-text-property (point) 'invisible))) (throw 'found t))))) - (beginning-of-line)) + (beginning-of-line) + (when sbbs-recenter-to-top + (set-window-start (selected-window) (point)))) (defun sbbs-read-previous (arg) "Move point ARG posts backwards." (interactive "p") (dotimes (_ arg) @@ -489,11 +495,13 @@ (catch 'found (while (search-backward-regexp "^#" nil t) (when (and (eq 'highlight (get-text-property (point) 'face)) (not (get-text-property (point) 'invisible))) (throw 'found t))))) - (beginning-of-line)) + (beginning-of-line) + (when sbbs-recenter-to-top + (set-window-start (selected-window) (point)))) ;;;###autoload (defun sbbs-browse (board reload) "Open thread overview for BOARD." (interactive (list (sbbs-read-board) nil))