Skip to content

Commit e3507bc

Browse files
committed
lispy.el (lispy--read): reworked unnecessary (bounds) + (string)
1 parent 4203638 commit e3507bc

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lispy.el

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7534,12 +7534,13 @@ have no special reader syntax.")
75347534
(goto-char (point-min))
75357535
(while (re-search-forward "\\_<\\(?:\\sw\\|\\s_\\)+\\_>" nil t)
75367536
(unless (lispy--in-string-p)
7537-
(unless (string-match
7538-
lispy--symbol-safe-chars-regexp
7539-
(match-string 0))
7540-
(let* ((bnd (lispy--bounds-dwim))
7541-
(str (lispy--string-dwim bnd)))
7542-
(delete-region (car bnd) (cdr bnd))
7537+
(let ((str (match-string 0))
7538+
(begin (match-beginning 0))
7539+
(end (match-end 0)))
7540+
(unless (string-match
7541+
lispy--symbol-safe-chars-regexp
7542+
str)
7543+
(delete-region begin end)
75437544
(insert (format "(ly-raw symbol %S)" str))))))
75447545
;; Clojure (. object method)
75457546
(goto-char (point-min))

0 commit comments

Comments
 (0)