Differences From
Artifact [e334160be5]:
76 76 (defface sbbs--variable-pitch
77 77 (if (x-list-fonts "Mona-")
78 78 '((nil :font "Mona"
79 79 :inherit variable-pitch))
80 80 '((nil :inherit variable-pitch)))
81 81 "Face for code blocks in threads.")
82 82
83 +(defface sbbs--post-header-face
84 + '((nil :extend t
85 + :inherit highlight))
86 + "Face for post headers in the thread view.")
87 +
83 88 ;; VARIABLES
84 89
85 90 (defvar-local sbbs--board nil
86 91 "Buffer local reference to current board.
87 92
88 93 See `sbbs-make-board'.")
89 94
................................................................................
344 349 "Prepare and Insert header and contents of POST at point."
345 350 (let ((start (point)))
346 351 (insert (format "#%d\t%s" (car post)
347 352 (cdr (assq 'date (cdr post)))))
348 353 (when (cdr (assq 'vip (cdr post)))
349 354 (insert " (VIP)"))
350 355 (newline 2)
351 - (add-text-properties start (1- (point)) '(face highlight))
356 + (add-text-properties start (1- (point)) '(face sbbs--post-header-face))
352 357 (set-text-properties (1- (point)) (point) nil)
353 358 (sbbs--insert-sxml (cdr (assq 'content (cdr post))))
354 359 (add-text-properties start (point) (list 'sbbs-thread-nr (car post)))))
355 360
356 361 (defun sbbs--uncover-spoiler ()
357 362 ""
358 363 (cond ((eq (get-text-property (point) 'face) 'sbbs--spoiler-face)
................................................................................
624 629 (defun sbbs-read-next (arg)
625 630 "Move point ARG posts forward."
626 631 (interactive "p")
627 632 (dotimes (_ arg)
628 633 (end-of-line)
629 634 (catch 'found
630 635 (while (search-forward-regexp "^#" nil t)
631 - (when (and (eq 'highlight (get-text-property (point) 'face))
636 + (when (and (eq 'sbbs--post-header-face (get-text-property (point) 'face))
632 637 (not (get-text-property (point) 'invisible)))
633 638 (throw 'found t)))))
634 639 (beginning-of-line)
635 640 (when sbbs-recenter-to-top
636 641 (set-window-start (selected-window) (point))))
637 642
638 643 (defun sbbs-read-previous (arg)
639 644 "Move point ARG posts backwards."
640 645 (interactive "p")
641 646 (dotimes (_ arg)
642 647 (catch 'found
643 648 (while (search-backward-regexp "^#" nil t)
644 - (when (and (eq 'highlight (get-text-property (point) 'face))
649 + (when (and (eq 'sbbs--post-header-face (get-text-property (point) 'face))
645 650 (not (get-text-property (point) 'invisible)))
646 651 (throw 'found t)))))
647 652 (beginning-of-line)
648 653 (when sbbs-recenter-to-top
649 654 (set-window-start (selected-window) (point))))
650 655
651 656 ;;;###autoload