Skip to content

Commit

Permalink
Avoid No comment syntax is defined prompts (#668)
Browse files Browse the repository at this point in the history
  • Loading branch information
vemv authored Oct 18, 2023
1 parent 661c80e commit ac664c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## master (unreleased)

### Changes

* [cider#2903](https://github.com/clojure-emacs/cider/issues/2903): Avoid `No comment syntax is defined` prompts.

## 5.17.1 (2023-09-12)

### Changes
Expand Down
4 changes: 2 additions & 2 deletions clojure-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -2084,7 +2084,7 @@ content) are considered part of the preceding sexp."
(defun clojure-sort-ns ()
"Internally sort each sexp inside the ns form."
(interactive)
(comment-normalize-vars)
(comment-normalize-vars t) ;; `t`: avoid prompts
(if (clojure-find-ns)
(save-excursion
(goto-char (match-beginning 0))
Expand Down Expand Up @@ -2230,7 +2230,7 @@ Returns a list pair, e.g. (\"defn\" \"abc\") or (\"deftest\" \"some-test\")."
(defun clojure--looking-at-non-logical-sexp ()
"Return non-nil if text after point is \"non-logical\" sexp.
\"Non-logical\" sexp are ^metadata and #reader.macros."
(comment-normalize-vars)
(comment-normalize-vars t) ;; `t`: avoid prompts
(comment-forward (point-max))
(looking-at-p "\\(?:#?\\^\\)\\|#:?:?[[:alpha:]]"))

Expand Down

0 comments on commit ac664c4

Please sign in to comment.