branch: elpa/xah-fly-keys
commit efbba7bfecd9bc7f135cc896366c5f18c33edd0c
Author: Xah Lee <[email protected]>
Commit: Xah Lee <[email protected]>

    refactor
---
 xah-fly-keys.el | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/xah-fly-keys.el b/xah-fly-keys.el
index bafa3b2b21d..60d771b363e 100644
--- a/xah-fly-keys.el
+++ b/xah-fly-keys.el
@@ -4,7 +4,7 @@
 
 ;; Author: Xah Lee ( http://xahlee.info/ )
 ;; Maintainer: Xah Lee <[email protected]>
-;; Version: 28.11.20251123201632
+;; Version: 28.11.20251125073911
 ;; Created: 2013-09-10
 ;; Package-Requires: ((emacs "28.3"))
 ;; Keywords: convenience, vi, vim, ergoemacs, keybinding
@@ -467,7 +467,7 @@ Created: 2022-01-22
 Version: 2025-03-25"
   (interactive)
   (let (xbeg xend)
-    (seq-setq (xbeg xend) (if (region-active-p) (list (region-beginning) 
(region-end)) (list (save-excursion (if (re-search-backward "\n[ \t]*\n" nil 1) 
(match-end 0) (point))) (save-excursion (if (re-search-forward "\n[ \t]*\n" nil 
1) (match-beginning 0) (point))))))
+    (setq xbeg (if (region-active-p) (region-beginning) (save-excursion (if 
(re-search-backward "\n[ \t]*\n" nil 1) (match-end 0) (point)))) xend (if 
(region-active-p) (region-end) (save-excursion (if (re-search-forward "\n[ 
\t]*\n" nil 1) (match-beginning 0) (point)))))
     (sort-lines current-prefix-arg xbeg xend)))
 
 (defun xah-narrow-to-region ()
@@ -476,7 +476,7 @@ Created: 2022-01-22
 Version: 2025-03-25"
   (interactive)
   (let (xbeg xend)
-    (seq-setq (xbeg xend) (if (region-active-p) (list (region-beginning) 
(region-end)) (list (save-excursion (if (re-search-backward "\n[ \t]*\n" nil 1) 
(match-end 0) (point))) (save-excursion (if (re-search-forward "\n[ \t]*\n" nil 
1) (match-beginning 0) (point))))))
+    (setq xbeg (if (region-active-p) (region-beginning) (save-excursion (if 
(re-search-backward "\n[ \t]*\n" nil 1) (match-end 0) (point)))) xend (if 
(region-active-p) (region-end) (save-excursion (if (re-search-forward "\n[ 
\t]*\n" nil 1) (match-beginning 0) (point)))))
     (narrow-to-region xbeg xend)))
 
 ;; s------------------------------
@@ -950,7 +950,7 @@ Version: 2025-10-13"
         (completing-read "Replace this:" xbrackets nil t nil nil (car 
xbrackets))
         (completing-read "To:" xbrackets nil t nil nil (car (last 
xbrackets)))))))
   (let (xbeg xend xleft xright xtoL xtoR)
-    (seq-setq (xbeg xend) (if (region-active-p) (list (region-beginning) 
(region-end)) (list (save-excursion (if (re-search-backward "\n[ \t]*\n" nil 1) 
(match-end 0) (point))) (save-excursion (if (re-search-forward "\n[ \t]*\n" nil 
1) (match-beginning 0) (point))))))
+    (setq xbeg (if (region-active-p) (region-beginning) (save-excursion (if 
(re-search-backward "\n[ \t]*\n" nil 1) (match-end 0) (point)))) xend (if 
(region-active-p) (region-end) (save-excursion (if (re-search-forward "\n[ 
\t]*\n" nil 1) (match-beginning 0) (point)))))
     (let ((xsFrom (last (split-string FromChars " ") 2))
           (xsTo (last (split-string ToChars " ") 2)))
 
@@ -1045,7 +1045,7 @@ Created: 2020-12-08
 Version: 2025-03-25"
   (interactive)
   (let (xbeg xend)
-    (seq-setq (xbeg xend) (if (region-active-p) (list (region-beginning) 
(region-end)) (list (save-excursion (if (re-search-backward "\n[ \t]*\n" nil 1) 
(match-end 0) (point))) (save-excursion (if (re-search-forward "\n[ \t]*\n" nil 
1) (match-beginning 0) (point))))))
+    (setq xbeg (if (region-active-p) (region-beginning) (save-excursion (if 
(re-search-backward "\n[ \t]*\n" nil 1) (match-end 0) (point)))) xend (if 
(region-active-p) (region-end) (save-excursion (if (re-search-forward "\n[ 
\t]*\n" nil 1) (match-beginning 0) (point)))))
     (save-restriction
       (narrow-to-region xbeg xend)
       (let ((case-fold-search nil))
@@ -1146,7 +1146,7 @@ Created: 2022-01-20
 Version: 2025-03-25"
   (interactive)
   (let (xbeg xend)
-    (seq-setq (xbeg xend) (if (region-active-p) (list (region-beginning) 
(region-end)) (list (save-excursion (if (re-search-backward "\n[ \t]*\n" nil 1) 
(match-end 0) (point))) (save-excursion (if (re-search-forward "\n[ \t]*\n" nil 
1) (match-beginning 0) (point))))))
+    (setq xbeg (if (region-active-p) (region-beginning) (save-excursion (if 
(re-search-backward "\n[ \t]*\n" nil 1) (match-end 0) (point)))) xend (if 
(region-active-p) (region-end) (save-excursion (if (re-search-forward "\n[ 
\t]*\n" nil 1) (match-beginning 0) (point)))))
     (save-restriction
       (narrow-to-region xbeg xend)
       (goto-char (point-min))
@@ -1171,7 +1171,7 @@ Version: 2025-08-29"
   (let ((xisLongline (if (eq last-command this-command) (get this-command 
'longline-p) t))
         (deactivate-mark nil)
         xbeg xend)
-    (seq-setq (xbeg xend) (if (region-active-p) (list (region-beginning) 
(region-end)) (list (save-excursion (if (re-search-backward "\n[ \t]*\n" nil 1) 
(match-end 0) (point))) (save-excursion (if (re-search-forward "\n[ \t]*\n" nil 
1) (match-beginning 0) (point))))))
+    (setq xbeg (if (region-active-p) (region-beginning) (save-excursion (if 
(re-search-backward "\n[ \t]*\n" nil 1) (match-end 0) (point)))) xend (if 
(region-active-p) (region-end) (save-excursion (if (re-search-forward "\n[ 
\t]*\n" nil 1) (match-beginning 0) (point)))))
     (if xisLongline
         (fill-region xbeg xend)
       (let ((fill-column 99999))
@@ -1200,7 +1200,7 @@ Version: 2025-09-07"
   (let ((xisLong (if (eq last-command this-command) (get this-command 
'is-long-p) nil))
         (xwidth (if Width Width 70))
         xbeg xend)
-    (seq-setq (xbeg xend) (if (region-active-p) (list (region-beginning) 
(region-end)) (list (save-excursion (if (re-search-backward "\n[ \t]*\n" nil 1) 
(match-end 0) (point))) (save-excursion (if (re-search-forward "\n[ \t]*\n" nil 
1) (match-beginning 0) (point))))))
+    (setq xbeg (if (region-active-p) (region-beginning) (save-excursion (if 
(re-search-backward "\n[ \t]*\n" nil 1) (match-end 0) (point)))) xend (if 
(region-active-p) (region-end) (save-excursion (if (re-search-forward "\n[ 
\t]*\n" nil 1) (match-beginning 0) (point)))))
     (if xisLong
         (save-excursion
           (save-restriction
@@ -1226,7 +1226,7 @@ Created: 2020-12-02
 Version: 2025-05-21"
   (interactive)
   (let (xbeg xend)
-    (seq-setq (xbeg xend) (if (region-active-p) (list (region-beginning) 
(region-end)) (list (save-excursion (if (re-search-backward "\n[ \t]*\n" nil 1) 
(match-end 0) (point))) (save-excursion (if (re-search-forward "\n[ \t]*\n" nil 
1) (match-beginning 0) (point))))))
+    (setq xbeg (if (region-active-p) (region-beginning) (save-excursion (if 
(re-search-backward "\n[ \t]*\n" nil 1) (match-end 0) (point)))) xend (if 
(region-active-p) (region-end) (save-excursion (if (re-search-forward "\n[ 
\t]*\n" nil 1) (match-beginning 0) (point)))))
     (save-restriction
       (narrow-to-region xbeg xend)
       (goto-char (point-min)) (while (search-forward "。" nil t) (replace-match 
"。\n"))
@@ -1261,7 +1261,7 @@ Created: 2017-08-19
 Version: 2025-03-25"
   (interactive)
   (let (xbeg xend)
-    (seq-setq (xbeg xend) (if (region-active-p) (list (region-beginning) 
(region-end)) (list (save-excursion (if (re-search-backward "\n[ \t]*\n" nil 1) 
(match-end 0) (point))) (save-excursion (if (re-search-forward "\n[ \t]*\n" nil 
1) (match-beginning 0) (point))))))
+    (setq xbeg (if (region-active-p) (region-beginning) (save-excursion (if 
(re-search-backward "\n[ \t]*\n" nil 1) (match-end 0) (point)))) xend (if 
(region-active-p) (region-end) (save-excursion (if (re-search-forward "\n[ 
\t]*\n" nil 1) (match-beginning 0) (point)))))
     (save-restriction
       (narrow-to-region xbeg xend)
       (goto-char (point-min))
@@ -1466,7 +1466,7 @@ Version: 2025-03-25"
             (t xsepChoice)))
      (list xquoteL xquoteR xsep)))
   (let (xbeg xend (xquoteL QuoteL) (xquoteR QuoteR) (xsep Sep))
-    (seq-setq (xbeg xend) (if (region-active-p) (list (region-beginning) 
(region-end)) (list (save-excursion (if (re-search-backward "\n[ \t]*\n" nil 1) 
(match-end 0) (point))) (save-excursion (if (re-search-forward "\n[ \t]*\n" nil 
1) (match-beginning 0) (point))))))
+    (setq xbeg (if (region-active-p) (region-beginning) (save-excursion (if 
(re-search-backward "\n[ \t]*\n" nil 1) (match-end 0) (point)))) xend (if 
(region-active-p) (region-end) (save-excursion (if (re-search-forward "\n[ 
\t]*\n" nil 1) (match-beginning 0) (point)))))
     (save-excursion
       (save-restriction
         (narrow-to-region xbeg xend)
@@ -1629,7 +1629,7 @@ Created: 2012-07-17
 Version: 2025-11-05"
   (interactive)
   (let (xbeg xend)
-    (seq-setq (xbeg xend) (if (region-active-p) (list (region-beginning) 
(region-end)) (list (save-excursion (if (re-search-backward "\n[ \t]*\n" nil 1) 
(match-end 0) (point))) (save-excursion (if (re-search-forward "\n[ \t]*\n" nil 
1) (match-beginning 0) (point))))))
+    (setq xbeg (if (region-active-p) (region-beginning) (save-excursion (if 
(re-search-backward "\n[ \t]*\n" nil 1) (match-end 0) (point)))) xend (if 
(region-active-p) (region-end) (save-excursion (if (re-search-forward "\n[ 
\t]*\n" nil 1) (match-beginning 0) (point)))))
     (copy-to-register ?1 xbeg xend)
     (message "Copied to register 1: %s." (buffer-substring xbeg xend))))
 
@@ -1641,7 +1641,7 @@ Created: 2015-12-08
 Version: 2025-11-07"
   (interactive)
   (let (xbeg xend)
-    (seq-setq (xbeg xend) (if (region-active-p) (list (region-beginning) 
(region-end)) (list (save-excursion (if (re-search-backward "\n[ \t]*\n" nil 1) 
(match-end 0) (point))) (save-excursion (if (re-search-forward "\n[ \t]*\n" nil 
1) (match-beginning 0) (point))))))
+    (setq xbeg (if (region-active-p) (region-beginning) (save-excursion (if 
(re-search-backward "\n[ \t]*\n" nil 1) (match-end 0) (point)))) xend (if 
(region-active-p) (region-end) (save-excursion (if (re-search-forward "\n[ 
\t]*\n" nil 1) (match-beginning 0) (point)))))
     (let ((register-separator "\n"))
       (append-to-register ?1 xbeg xend)
       (message "Done. Append to register 1."))))
@@ -1743,7 +1743,7 @@ Version: 2025-03-25"
         (goto-char (+ xend (length LBracket))))
        ((eq WrapMethod 'block)
         (save-excursion
-          (seq-setq (xbeg xend) (if (region-active-p) (list (region-beginning) 
(region-end)) (list (save-excursion (if (re-search-backward "\n[ \t]*\n" nil 1) 
(match-end 0) (point))) (save-excursion (if (re-search-forward "\n[ \t]*\n" nil 
1) (match-beginning 0) (point))))))
+          (setq xbeg (if (region-active-p) (region-beginning) (save-excursion 
(if (re-search-backward "\n[ \t]*\n" nil 1) (match-end 0) (point)))) xend (if 
(region-active-p) (region-end) (save-excursion (if (re-search-forward "\n[ 
\t]*\n" nil 1) (match-beginning 0) (point)))))
           (goto-char xend)
           (insert RBracket)
           (goto-char xbeg)

Reply via email to