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

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

[elpa] externals/objed e0dde43 097/166: Improve block expansion, avoidin


From: Clemens Radermacher
Subject: [elpa] externals/objed e0dde43 097/166: Improve block expansion, avoiding text block/comment duplicates
Date: Sun, 29 Dec 2019 08:21:08 -0500 (EST)

branch: externals/objed
commit e0dde4348243d886cf69c371c4254f233a4e45a3
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>

    Improve block expansion, avoiding text block/comment duplicates
---
 objed-objects.el                             |  5 +++--
 test/tests/emacs-lisp-mode/expansion/block_3 |  4 +++-
 test/tests/emacs-lisp-mode/expansion/block_4 |  6 ++++--
 test/tests/emacs-lisp-mode/expansion/block_5 | 12 ++++++++++--
 test/tests/emacs-lisp-mode/expansion/block_6 |  7 +++++--
 5 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/objed-objects.el b/objed-objects.el
index c53341d..a6f1fc1 100644
--- a/objed-objects.el
+++ b/objed-objects.el
@@ -1540,8 +1540,9 @@ comments."
   (let* ((bounds nil)
          (ibounds (cond ((setq bounds (objed--bounds-of-string-at-point))
                          (objed--inner-string bounds))
-                       ((setq bounds (objed--bounds-of-comment-at-point))
-                        (objed--inner-comment-block)))))
+                        ((setq bounds (objed--bounds-of-comment-at-point))
+                         ;; include trailing ws
+                         (objed--comment-block)))))
     (when ibounds
       (narrow-to-region (car ibounds) (cdr ibounds)))))
 
diff --git a/test/tests/emacs-lisp-mode/expansion/block_3 
b/test/tests/emacs-lisp-mode/expansion/block_3
index 41e68c4..96bc597 100644
--- a/test/tests/emacs-lisp-mode/expansion/block_3
+++ b/test/tests/emacs-lisp-mode/expansion/block_3
@@ -17,5 +17,7 @@ hh
 ;; More on same level
 
 |<;; Some text
-;; and more text>
+;; and more text
+>
+
 
diff --git a/test/tests/emacs-lisp-mode/expansion/block_4 
b/test/tests/emacs-lisp-mode/expansion/block_4
index 1c8c1fa..4bd3e1a 100644
--- a/test/tests/emacs-lisp-mode/expansion/block_4
+++ b/test/tests/emacs-lisp-mode/expansion/block_4
@@ -15,7 +15,9 @@ hhh
   (ignore))
 
 ;; More on same level
-
-|<;; Some text
+|<
+;; Some text
 ;; and more text
 >
+
+
diff --git a/test/tests/emacs-lisp-mode/expansion/block_5 
b/test/tests/emacs-lisp-mode/expansion/block_5
index 0c969b6..f06dd82 100644
--- a/test/tests/emacs-lisp-mode/expansion/block_5
+++ b/test/tests/emacs-lisp-mode/expansion/block_5
@@ -14,8 +14,16 @@ hhhh
 (defun check ()
   (ignore))
 
-;; More on same level
-|<
+|<;; More on same level
+
 ;; Some text
 ;; and more text
 >
+
+
+
+
+
+
+
+
diff --git a/test/tests/emacs-lisp-mode/expansion/block_6 
b/test/tests/emacs-lisp-mode/expansion/block_6
index c955607..dcb6fd7 100644
--- a/test/tests/emacs-lisp-mode/expansion/block_6
+++ b/test/tests/emacs-lisp-mode/expansion/block_6
@@ -10,12 +10,15 @@ hhhhh
 ;; and |more text
 
 ;;;;
-
+|<
 (defun check ()
   (ignore))
 
-|<;; More on same level
+;; More on same level
 
 ;; Some text
 ;; and more text
+
 >
+
+



reply via email to

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