branch: elpa/evil-matchit
commit 4f993303e13afd6df80716d8474759d447340f93
Author: Chen Bin <[email protected]>
Commit: Chen Bin <[email protected]>
delete leading spaces AND matched tags v1.2.9
---
README.org | 2 +-
evil-matchit-pkg.el | 2 +-
evil-matchit.el | 17 ++++++++++++-----
pkg.sh | 2 +-
4 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/README.org b/README.org
index 15c3022d83..13cfce78b5 100644
--- a/README.org
+++ b/README.org
@@ -1,4 +1,4 @@
-* evil-matchit (version 1.2.8)
+* evil-matchit (version 1.2.9)
Vim [[http://www.vim.org/scripts/script.php?script_id=39][matchit.vim]] by
Benji Fisher ported into Emacs.
diff --git a/evil-matchit-pkg.el b/evil-matchit-pkg.el
index 144e6893f1..2649d25761 100644
--- a/evil-matchit-pkg.el
+++ b/evil-matchit-pkg.el
@@ -1,2 +1,2 @@
-(define-package "evil-matchit" "1.2.8"
+(define-package "evil-matchit" "1.2.9"
"Vim matchit ported into Emacs (requires EVIL)")
diff --git a/evil-matchit.el b/evil-matchit.el
index dac9320d29..176ff5f8f9 100644
--- a/evil-matchit.el
+++ b/evil-matchit.el
@@ -4,7 +4,7 @@
;; Author: Chen Bin <[email protected]>
;; URL: http://github.com/redguardtoo/evil-matchit
-;; Version: 1.2.8
+;; Version: 1.2.9
;; Keywords: matchit vim evil
;; Package-Requires: ((evil "1.0.7"))
;;
@@ -170,10 +170,17 @@
(let (where-to-jump-in-theory )
(setq where-to-jump-in-theory (evilmi--operate-on-item NUM
'evilmi--push-mark))
(if where-to-jump-in-theory (goto-char where-to-jump-in-theory))
- (kill-region (region-beginning) (1+ (region-end)))
- )
- ;; need some hook here
- )
+ (save-excursion
+ (let ((b (region-beginning))
+ (e (region-end)))
+ (goto-char b)
+ (when (string-match "[ \t]*" (buffer-substring-no-properties
(line-beginning-position) b))
+ (setq b (line-beginning-position))
+ ;; 1+ because the line feed
+ (kill-region b (1+ e))
+ )))
+ ;; need some hook here
+ ))
;;;###autoload
(define-minor-mode evil-matchit-mode
diff --git a/pkg.sh b/pkg.sh
index 21c7430c7e..5cfe89d688 100755
--- a/pkg.sh
+++ b/pkg.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-pkg=evil-matchit-1.2.8
+pkg=evil-matchit-1.2.9
mkdir $pkg
cp README.org $pkg
cp *.el $pkg