emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/xah-fly-keys 7118846cda: xah-delete-current-text-block now


From: ELPA Syncer
Subject: [nongnu] elpa/xah-fly-keys 7118846cda: xah-delete-current-text-block now when in blank lines, delete those and next text block (instead of deleting just 2 blank lines). This was the original behavior. this is better because this command can be relied on to always delete current or next text block.
Date: Mon, 9 Oct 2023 16:02:15 -0400 (EDT)

branch: elpa/xah-fly-keys
commit 7118846cda6026acd12a3fc6ab52a70091e6ec1a
Author: Xah Lee <xah@xahlee.org>
Commit: Xah Lee <xah@xahlee.org>

    xah-delete-current-text-block now when in blank lines, delete those and 
next text block (instead of deleting just 2 blank lines). This was the original 
behavior. this is better because this command can be relied on to always delete 
current or next text block.
---
 xah-fly-keys.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/xah-fly-keys.el b/xah-fly-keys.el
index efab2d6379..efc90ae015 100644
--- a/xah-fly-keys.el
+++ b/xah-fly-keys.el
@@ -4,7 +4,7 @@
 
 ;; Author: Xah Lee ( http://xahlee.info/ )
 ;; Maintainer: Xah Lee <xah@xahlee.org>
-;; Version: 24.13.20231005090319
+;; Version: 24.13.20231009115302
 ;; Created: 2013-09-10
 ;; Package-Requires: ((emacs "29"))
 ;; Keywords: convenience, emulations, vim, ergoemacs
@@ -1666,16 +1666,17 @@ Version: 2018-06-18 2021-09-30"
   "Delete the current text block plus blank lines, or selection, and copy to 
`kill-ring'.
 
 URL `http://xahlee.info/emacs/emacs/emacs_delete_block.html'
-Version: 2017-07-09 2021-08-14 2022-07-31 2023-06-07"
+Version: 2017-07-09 2023-06-07 2023-10-09"
   (interactive)
   (let (xp1 xp2)
     (if (region-active-p)
         (setq xp1 (region-beginning) xp2 (region-end))
       (progn
         (if (re-search-backward "\n[ \t]*\n+" nil :move)
-            (setq xp1 (goto-char (match-end 0)))
+            (setq xp1 (match-beginning 0))
           (setq xp1 (point)))
-        (if (re-search-forward "\n[ \t]*\n" nil :move)
+        (skip-chars-forward " \n\t")
+        (if (re-search-forward "\n[ \t]*\n+" nil :move)
             (setq xp2 (match-end 0))
           (setq xp2 (point-max)))))
     (kill-region xp1 xp2)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]