sbbs.el

Check-in [a9ee28fa6d]
Login
Overview
Comment:Fix sbbs-compose-format when mark is before point
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: a9ee28fa6de5755f83aa11ddcc260a5db6dfcae5afc954cbf381df34077726cb
User & Date: zge on 2020-06-08 10:26:26
Other Links: branch diff | manifest | tags
Context
2020-06-18
13:11
Fixed URL handeling with ","-ranges check-in: df55ff6293 user: zge tags: master, trunk
2020-06-08
10:26
Fix sbbs-compose-format when mark is before point check-in: a9ee28fa6d user: zge tags: master, trunk
2020-06-06
17:17
Added sbbs-default-board option check-in: cc71172e18 user: zge tags: master, trunk
Changes

Modified sbbs.el from [fbf9317204] to [75ce247893].

544
545
546
547
548
549
550
551

552
553
554



555
556

557
558

559

560
561
562
563
564
565
566
544
545
546
547
548
549
550

551
552


553
554
555
556

557
558
559
560

561
562
563
564
565
566
567
568







-
+

-
-
+
+
+

-
+


+
-
+







      (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 string STYLE around region or point."
  (save-mark-and-excursion
  (save-excursion
    (if (region-active-p)
        (progn
          (goto-char (region-beginning))
        (let ((beg (region-beginning))
              (end (region-end)))
          (goto-char end)
          (insert style)
          (goto-char (region-end))
          (goto-char beg)
          (insert style))
      (insert style style)))
  (when (< (point) (mark))
  (forward-char (length style)))
    (forward-char (length style))))

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

(defun sbbs-compose-format-bold ()