Index: sbbs.el ================================================================== --- sbbs.el +++ sbbs.el @@ -28,11 +28,12 @@ (require 'button) (require 'url) (require 'hl-line) (require 'rx) - ;; CUSTOMIZABLE DATA + +;;; CUSTOMIZABLE DATA (defgroup sbbs nil "SchemeBBS client." :group 'applications :prefix "sbbs-") @@ -93,11 +94,12 @@ (defface sbbs--post-header-face '((nil :extend t :inherit highlight)) "Face for post headers in the thread view.") - ;; VARIABLES + +;;; VARIABLES (defvar-local sbbs--board nil "Buffer local reference to current board. See `sbbs-make-board'.") @@ -111,11 +113,12 @@ "Stack of last limit specs.") (defvar-local sbbs--last-spoiler nil "Point of last spoiler visited.") - ;; BOARD OBJECT AND FUNCTIONS + +;;; BOARD OBJECT AND FUNCTIONS (defun sbbs-make-board (domain name &optional tls) "Create board object, using DOMAIN, NAME and TLS flag." (vector domain name tls)) @@ -179,11 +182,12 @@ boards nil t "/" nil def))) (if (stringp choice) (cdr (assoc choice boards)) choice)))) - ;; UTILITY FUNCTIONS + +;;; UTILITY FUNCTIONS (defun sbbs--reload-thread (&optional _ignore-auto _noconfirm) "Function to reload an opened thread." (when sbbs--thread-id (sbbs-view-open sbbs--thread-id))) @@ -222,11 +226,12 @@ (looking-at-p "\\`#[[:digit:]]+")) ;; in case we are on the first character of a post, we shouldn't ;; jump back, since that would mean setting to point to NR-1. (sbbs-read-previous 1))) - ;; UI GENERATOR + +;;; UI GENERATOR (defconst sbbs--link-regexp (rx-to-string `(: bos (or (: "/" (group-n 2 (+ alnum)) @@ -405,11 +410,12 @@ (dolist (o (overlays-at sbbs--last-spoiler)) (when (overlay-get o 'sbbs-uncover-p) (delete-overlay o))) (setq sbbs--last-spoiler nil)))) - ;; URL.EL CALLBACKS + +;;; URL.EL CALLBACKS (defun sbbs--fix-encoding () "Convert the raw response after point to utf-8." (save-excursion ;; see http://textboard.org/prog/39/263 @@ -501,11 +507,12 @@ (sbbs--limit-to-range range)) (if sbbs-open-at-last-post (sbbs-goto-end) (goto-char (point-min)))))))) - ;; INTERACTIVE FUNCTIONS + +;;; INTERACTIVE FUNCTIONS (defun sbbs-show-all () "Show all hidden posts." (interactive) (sbbs-show-pop -1)) @@ -717,11 +724,12 @@ (switch-to-buffer (current-buffer)))))) ;;;###autoload (defalias 'sbbs #'sbbs-browse) - ;; MAJOR MODES + +;;; MAJOR MODES (defvar sbbs-view-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd "RET") #'sbbs-view-open) (define-key map (kbd "c") #'sbbs-view-compose)