sbbs.el

Check-in [d5347562aa]
Login
Overview
Comment:Fix sbbs-compose-format on when region is active See http://textboard.org/prog/81/49
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: d5347562aa00b38e86aed273255cf011e24e7c318cd8c37ff4c00eabe721141c
User & Date: zge on 2020-06-06 16:28:50
Other Links: branch diff | manifest | tags
Context
2020-06-06
17:17
Added sbbs-default-board option check-in: cc71172e18 user: zge tags: master, trunk
16:28
Fix sbbs-compose-format on when region is active See http://textboard.org/prog/81/49 check-in: d5347562aa user: zge tags: master, trunk
16:06
Only generate "other" board when link matches regexp Fixes [ed8a04be6b] check-in: ae851a4d20 user: zge tags: master, trunk
Changes

Modified sbbs.el from [676c904eb1] to [4c1b0d2eeb].

522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537










538
539
540
541
542
543
544
522
523
524
525
526
527
528









529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545







-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+







        (newline))
      (setq header-line-format (format "Responding to Thread %d" id)
            sbbs--thread-id id
            sbbs--board board)
      (switch-to-buffer (current-buffer)))))

(defun sbbs-compose-format (style)
  "Insert "
  (if (region-active-p)
      (save-excursion
        (goto-char (region-beginning))
        (insert "style")
        (goto-char (region-end))
        (insert "style"))
    (insert style style)
    (forward-char (- (length style)))))
  "Insert string STYLE around region or point."
  (save-mark-and-excursion
    (if (region-active-p)
        (progn
          (goto-char (region-beginning))
          (insert style)
          (goto-char (region-end))
          (insert style))
      (insert style style)))
  (forward-char (length style)))

(defun sbbs-compose-format-code ()
  "Insert code syntax markers."
  (interactive)
  (sbbs-compose-format "```\n"))

(defun sbbs-compose-format-bold ()