Skip to content

Commit 31ea7ce

Browse files
committed
Remove clojure-mark-string
Other packages offer better ways to mark strings (e.g. expand-region).
1 parent e9014a4 commit 31ea7ce

File tree

2 files changed

+2
-30
lines changed

2 files changed

+2
-30
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
* Add `.cljc` to `auto-mode-alist`.
88
* [#281](https://github.com/clojure-emacs/clojure-mode/pull/281): Add support for namespace-prefixed definition forms.
9+
* Remove `clojure-mark-string`.
910

1011
### Bugs fixed
1112

clojure-mode.el

+1-30
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ For example, \[ is allowed in :db/id[:db.part/user]."
149149
(easy-menu-define clojure-mode-menu map "Clojure Mode Menu"
150150
'("Clojure"
151151
["Toggle between string & keyword" clojure-toggle-keyword-string]
152-
["Mark string" clojure-mark-string]
152+
"--"
153153
["Insert ns form at point" clojure-insert-ns-form-at-point]
154154
["Insert ns form at beginning" clojure-insert-ns-form]
155155
["Update ns form" clojure-update-ns]
@@ -904,35 +904,6 @@ nil."
904904
(when (not (= (point) (point-min)))
905905
(buffer-substring-no-properties (point) (1- (point)))))
906906

907-
;; TODO: Deal with the fact that when point is exactly at the
908-
;; beginning of a string, it thinks that is the end.
909-
(defun clojure-string-end ()
910-
"Return the position of the \" that ends the string at point.
911-
912-
Note that point must be inside the string - if point is
913-
positioned at the opening quote, incorrect results will be
914-
returned."
915-
(save-excursion
916-
(save-match-data
917-
;; If we're at the end of the string, just return point.
918-
(if (and (string= (clojure-char-at-point) "\"")
919-
(not (string= (clojure-char-before-point) "\\")))
920-
(point)
921-
;; We don't want to get screwed by starting out at the
922-
;; backslash in an escaped quote.
923-
(when (string= (clojure-char-at-point) "\\")
924-
(backward-char))
925-
;; Look for a quote not preceeded by a backslash
926-
(re-search-forward "[^\\]\\\(\\\"\\)")
927-
(match-beginning 1)))))
928-
929-
(defun clojure-mark-string ()
930-
"Mark the string at point."
931-
(interactive)
932-
(goto-char (clojure-string-start))
933-
(forward-char)
934-
(set-mark (clojure-string-end)))
935-
936907
(defun clojure-toggle-keyword-string ()
937908
"Convert the string or keyword at point to keyword or string."
938909
(interactive)

0 commit comments

Comments
 (0)