sbbs.el

Check-in [0376b0426c]
Login
Overview
Comment:Add sbbs-recenter-to-top variable
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: 0376b0426cbd2a98087a4231120aff4ea25d7700d34b6732e006e4cfd0004ecf
User & Date: philip@warpmail.net on 2020-03-07 20:52:08
Other Links: branch diff | manifest | tags
Context
2020-03-17
11:37
disabled paragraph filling while composing check-in: 0cea683e16 user: philip@warpmail.net tags: master, trunk
2020-03-07
20:52
Add sbbs-recenter-to-top variable check-in: 0376b0426c user: philip@warpmail.net tags: master, trunk
20:02
reworked link handling check-in: 9ba1b42fbc user: philip@warpmail.net tags: master, trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Modified sbbs.el from [7633d1775c] to [a964287a4e].

    41     41     :type '(repeat (list (string :tag "Board Domain")
    42     42                          (repeat (string :tag "Board Name"))
    43     43                          (boolean :tag "Use TLS?"))))
    44     44   
    45     45   (defcustom sbbs-jump-to-link t
    46     46     "Jump to first link after narrowing posts."
    47     47     :type 'boolean)
           48  +
           49  +(defcustom sbbs-recenter-to-top t
           50  +  "Move point to top of frame when moving through posts."
           51  +  :type 'boolean)
    48     52   
    49     53   (defface sbbs--spoiler-face
    50     54     '((((background light)) :background "black" :foreground "black")
    51     55       (((background dark)) :background "white" :foreground "white"))
    52     56     "Face for spoiler text in threads.")
    53     57   
    54     58   (defface sbbs--code-face
................................................................................
   476    480     (dotimes (_ arg)
   477    481       (end-of-line)
   478    482       (catch 'found
   479    483         (while (search-forward-regexp "^#" nil t)
   480    484           (when (and (eq 'highlight (get-text-property (point) 'face))
   481    485                      (not (get-text-property (point) 'invisible)))
   482    486             (throw 'found t)))))
   483         -  (beginning-of-line))
          487  +  (beginning-of-line)
          488  +  (when sbbs-recenter-to-top
          489  +    (set-window-start (selected-window) (point))))
   484    490   
   485    491   (defun sbbs-read-previous (arg)
   486    492     "Move point ARG posts backwards."
   487    493     (interactive "p")
   488    494     (dotimes (_ arg)
   489    495       (catch 'found
   490    496         (while (search-backward-regexp "^#" nil t)
   491    497           (when (and (eq 'highlight (get-text-property (point) 'face))
   492    498                      (not (get-text-property (point) 'invisible)))
   493    499             (throw 'found t)))))
   494         -  (beginning-of-line))
          500  +  (beginning-of-line)
          501  +  (when sbbs-recenter-to-top
          502  +    (set-window-start (selected-window) (point))))
   495    503   
   496    504   ;;;###autoload
   497    505   (defun sbbs-browse (board reload)
   498    506     "Open thread overview for BOARD."
   499    507     (interactive (list (sbbs-read-board) nil))
   500    508     (let* ((name (format "*browsing /%s/*" (sbbs--board-name board)))
   501    509            (url (sbbs--board-url "list" t board)))