Differences From
Artifact [7a0569766c]:
186 186 (let* ((text (caddr it))
187 187 (link (plist-get (cadadr it) 'href)))
188 188 (sbbs--insert-link text link)))
189 189 (t (insert (prin1-to-string it)))))
190 190 (insert ?\n))
191 191
192 192 (defun sbbs--insert-sxml (sxml)
193 - "Insert top-level SXML into buffer at point."
193 + "Insert top level SXML into buffer at point."
194 194 (dolist (par sxml)
195 195 (cond ((eq (car par) 'p)
196 196 (sbbs--insert-sxml-par (cdr par)))
197 197 ((eq (car par) 'blockquote)
198 198 (let ((start (point))
199 199 (comment-start "> "))
200 200 (sbbs--insert-sxml-par (cdadr par))
................................................................................
224 224 (add-text-properties start (point) (list 'sbbs-thread-nr (car post)))))
225 225
226 226 ;; URL.EL CALLBACKS
227 227
228 228 (defun sbbs--board-loader (status buf)
229 229 "Callback function for `url-retrieve' when loading board.
230 230
231 -Load results into buffer BUF."
231 +Load results into buffer BUF. STATUS is used to check for
232 +errors."
232 233 (when (plist-get status :error)
233 234 (message "Error while loading: %s"
234 235 (cdr (plist-get status :error))))
235 236 (forward-paragraph)
236 237 (let ((list (read (current-buffer))))
237 238 (kill-buffer)
238 239 (with-current-buffer buf
................................................................................
252 253 (switch-to-buffer buf)
253 254 (hl-line-highlight)))
254 255
255 256 (defun sbbs--thread-loader (status board id)
256 257 "Callback function for `url-retrieve' when loading thread.
257 258
258 259 The attribute ID determines what thread from board BOARD to
259 -load."
260 +load. STATUS is used to check for errors."
260 261 (when (plist-get status :error)
261 262 (message "Error while loading: %s"
262 263 (cdr (plist-get status :error))))
263 264 (prog-mode)
264 265 (forward-paragraph)
265 266 (save-excursion
266 267 (save-match-data
................................................................................
310 311 (sbbs-compose-mode)
311 312 (setq sbbs--board board)
312 313 (switch-to-buffer (current-buffer)))))
313 314
314 315 (defun sbbs-read-reply (arg)
315 316 "Create buffer to start a reply in current thread.
316 317
317 -With \\[universal-argument] add a reply reference to thread at
318 -point."
318 +With \\[universal-argument] interactivly, or a non-nil ARG, add a
319 +reply reference to thread at point."
319 320 (interactive "P")
320 321 (let ((id sbbs--thread-id)
321 322 (nr (get-text-property (point) 'sbbs-thread-nr))
322 323 (board sbbs--board))
323 324 (with-current-buffer (generate-new-buffer "*new response*")
324 325 (sbbs-compose-mode)
325 326 (when (and arg (= (car arg) 4))
................................................................................
353 354 (cdr (plist-get status :error)))
354 355 (kill-buffer buf)
355 356 (let ((sbbs--board board))
356 357 (sbbs--reload-thread))))
357 358 (list (current-buffer)))))
358 359
359 360 (defun sbbs-read-next (arg)
360 - "Move point to next thread header."
361 + "Move point ARG posts forward."
361 362 (interactive "p")
362 363 (dotimes (_ arg)
363 364 (end-of-line)
364 365 (catch 'found
365 366 (while (search-forward-regexp "^#" nil t)
366 367 (when (eq 'highlight (get-text-property (point) 'face))
367 368 (throw 'found t)))))
368 369 (beginning-of-line))
369 370
370 371 (defun sbbs-read-previous (arg)
371 - "Move point to previous thread header."
372 + "Move point ARG posts backwards."
372 373 (interactive "p")
373 374 (dotimes (_ arg)
374 375 (catch 'found
375 376 (while (search-backward-regexp "^#" nil t)
376 377 (when (eq 'highlight (get-text-property (point) 'face))
377 378 (throw 'found t)))))
378 379 (beginning-of-line))