File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 37
37
(goto-char (cl-decf beg))))
38
38
(cons beg end)))))
39
39
40
- (defun meow--bounds-of-string ()
40
+ (defun meow--bounds-of-string-1 ()
41
41
" Return the bounds of the string under the cursor.
42
42
43
43
The thing `string' is not available in Emacs 27.'"
@@ -58,20 +58,23 @@ The thing `string' is not available in Emacs 27.'"
58
58
(defun meow--inner-of-symbol ()
59
59
(bounds-of-thing-at-point 'symbol ))
60
60
61
- (defun meow--inner -of-string ()
62
- (when-let (bounds (meow--bounds-of-string))
61
+ (defun meow--bounds -of-string (&optional inner )
62
+ (when-let (bounds (meow--bounds-of-string-1 ))
63
63
(let ((beg (car bounds))
64
64
(end (cdr bounds)))
65
65
(cons
66
66
(save-mark-and-excursion
67
67
(goto-char beg)
68
- (skip-syntax-forward " \" " )
68
+ (funcall ( if inner # ' skip-syntax-forward # 'skip-syntax-backward ) " \" | " )
69
69
(point ))
70
70
(save-mark-and-excursion
71
71
(goto-char end)
72
- (skip-syntax-backward " \" " )
72
+ (funcall ( if inner # ' skip-syntax-backward # 'skip-syntax-forward ) " \" | " )
73
73
(point ))))))
74
74
75
+ (defun meow--inner-of-string ()
76
+ (meow--bounds-of-string t ))
77
+
75
78
(defun meow--inner-of-window ()
76
79
(cons (window-start ) (window-end )))
77
80
You can’t perform that action at this time.
0 commit comments