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

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

[elpa] externals/objed 5237b4a 022/216: Fix string detection


From: Stefan Monnier
Subject: [elpa] externals/objed 5237b4a 022/216: Fix string detection
Date: Tue, 8 Jan 2019 12:29:01 -0500 (EST)

branch: externals/objed
commit 5237b4a65fc3a113a462128a487b91424261d1d7
Author: Clemera <address@hidden>
Commit: Clemera <address@hidden>

    Fix string detection
---
 objed-objects.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/objed-objects.el b/objed-objects.el
index abef039..95772d8 100644
--- a/objed-objects.el
+++ b/objed-objects.el
@@ -1097,8 +1097,12 @@ If SYN is given use it instead of syntax at point."
 
 (defun objed--bounds-of-string-at-point ()
   "Return bounds of string at point."
-  (let ((beg (objed--in-string-p)))
-    (when beg
+  (let* ((beg (objed--in-string-p))
+        (end (and beg (save-excursion
+                        (goto-char beg)
+                       (when (ignore-errors (forward-sexp 1) t)
+                         (point))))))
+    (when (and beg end)
       (cons beg
             (save-excursion (goto-char beg)
                             (forward-sexp 1)



reply via email to

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