diff -c ~/b.el ~/a.el *** ~/b.el 2021-08-19 09:44:45.059901178 -0400 --- ~/a.el 2021-08-19 09:53:28.306495818 -0400 *************** *** 23,29 **** ;;; Code: - (require 'text-property-search) (require 'tabulated-list) (require 'button) (require 'url) --- 23,28 ---- *************** *** 151,157 **** (let (boards) (dolist (ent sbbs-boards) (dolist (board (cadr ent)) ! (push (sbbs-make-board (car ent) board (caddr ent)) boards))) boards)) --- 150,156 ---- (let (boards) (dolist (ent sbbs-boards) (dolist (board (cadr ent)) ! (push (sbbs-make-board (car ent) board (nth 2 ent)) boards))) boards)) *************** *** 338,345 **** (propertize (sbbs--process-sxml (cdr it)) 'face 'sbbs--spoiler-face)) ((eq (car it) 'a) ! (let* ((text (sbbs--process-sxml (caddr it))) ! (link (plist-get (cadadr it) 'href))) (sbbs--process-link text link))) (t (prin1-to-string it))) processed)) --- 337,344 ---- (propertize (sbbs--process-sxml (cdr it)) 'face 'sbbs--spoiler-face)) ((eq (car it) 'a) ! (let* ((text (sbbs--process-sxml (nth 2 it))) ! (link (plist-get (cadr (cadr it)) 'href))) (sbbs--process-link text link))) (t (prin1-to-string it))) processed)) *************** *** 347,367 **** (defun sbbs--insert-sxml-par (sxml) "Insert paragraph contents SXML at point." ! (save-restriction ! (narrow-to-region (point) (point)) ! (insert (sbbs--process-sxml sxml)) ! (let (match) ! (goto-char (point-min)) ! (while (setq match (text-property-search-forward 'action)) ! ;; Buttons use overlays that cannot be passed in ! ;; strings. Therefore whenever a `activity' property was ! ;; inserted into the buffer, `make-button' has to be called ! ;; once more to add the actual overlay. ! (make-button (prop-match-beginning match) ! (prop-match-end match) ! 'action (prop-match-value match))) ! (goto-char (point-max))) ! (newline))) (defun sbbs--insert-sxml (sxml) "Insert top level SXML into buffer at point." --- 346,364 ---- (defun sbbs--insert-sxml-par (sxml) "Insert paragraph contents SXML at point." ! (insert (sbbs--process-sxml sxml)) ! (goto-char (point-min)) ! (let (beg) ! (while (setq beg (next-single-property-change (point) 'action)) ! ;; Buttons use overlays that cannot be passed in ! ;; strings. Therefore whenever a `activity' property was inserted into ! ;; the buffer, `make-button' has to be called once more to add the ! ;; actual overlay. ! (let ((end (or (next-single-property-change beg 'action) (point-max)))) ! (make-button beg end 'action (get-text-property beg 'action)) ! (goto-char end)))) ! (goto-char (point-max)) ! (newline)) (defun sbbs--insert-sxml (sxml) "Insert top level SXML into buffer at point." *************** *** 371,383 **** ((eq (car par) 'blockquote) (let ((start (point)) (comment-start "> ")) ! (sbbs--insert-sxml-par (cdadr par)) (comment-region start (point)) (add-face-text-property start (point) 'font-lock-comment-face))) ((eq (car par) 'pre) (let ((start (point))) ! (insert (propertize (cadadr par) 'face 'fixed-pitch)) (newline) (add-face-text-property start (point) 'sbbs--code-face))) --- 368,380 ---- ((eq (car par) 'blockquote) (let ((start (point)) (comment-start "> ")) ! (sbbs--insert-sxml-par (cdr (cadr par))) (comment-region start (point)) (add-face-text-property start (point) 'font-lock-comment-face))) ((eq (car par) 'pre) (let ((start (point))) ! (insert (propertize (cadr (cadr par)) 'face 'fixed-pitch)) (newline) (add-face-text-property start (point) 'sbbs--code-face))) *************** *** 467,473 **** 'face 'sbbs--variable-pitch))) ent)) (setq-local tabulated-list-entries ent) ! (tabulated-list-print t t) (hl-line-highlight)))))) (defun sbbs--thread-loader (status id buf range) --- 464,472 ---- 'face 'sbbs--variable-pitch))) ent)) (setq-local tabulated-list-entries ent) ! (if (version< emacs-version "26") ! (tabulated-list-print t) ! (tabulated-list-print t t)) (hl-line-highlight)))))) (defun sbbs--thread-loader (status id buf range) *************** *** 485,496 **** (save-excursion (save-match-data (while (search-forward "#f" nil t) ! (unless (cadddr (syntax-ppss)) (replace-match "nil"))))) (save-excursion (save-match-data (while (search-forward "#f" nil t) ! (unless (cadddr (syntax-ppss)) (replace-match "t"))))) (let ((thread (read (current-buffer)))) (kill-buffer) --- 484,495 ---- (save-excursion (save-match-data (while (search-forward "#f" nil t) ! (unless (nth 3 (syntax-ppss)) (replace-match "nil"))))) (save-excursion (save-match-data (while (search-forward "#f" nil t) ! (unless (nth 3 (syntax-ppss)) (replace-match "t"))))) (let ((thread (read (current-buffer)))) (kill-buffer) Diff finished. Thu Aug 19 09:53:33 2021