Skip to content

Commit adddf96

Browse files
yuhan0bbatsov
authored andcommitted
Prevent paredit from inserting spaces after ' quote
1 parent 035b9a5 commit adddf96

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

clojure-mode.el

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -456,11 +456,12 @@ The command will prompt you to select one of the available sections."
456456
"Prevent paredit from inserting useless spaces.
457457
See `paredit-space-for-delimiter-predicates' for the meaning of
458458
ENDP and DELIM."
459-
(or endp
460-
(not (memq delim '(?\" ?\{ ?\())) ;; always insert for [
461-
(not (or (derived-mode-p 'clojure-mode) ;; FIXME why does this check exist
462-
(derived-mode-p 'cider-repl-mode)))
463-
(not (looking-back "\\_<#\\??")))) ;; auto-gensym syntax foo#
459+
(and (not (eq (char-before) ?'))
460+
(or endp
461+
(not (memq delim '(?\" ?\{ ?\())) ;; always insert for [
462+
(not (or (derived-mode-p 'clojure-mode) ;; FIXME why does this check exist
463+
(derived-mode-p 'cider-repl-mode)))
464+
(not (looking-back "\\_<#\\??"))))) ;; auto-gensym syntax foo#
464465

465466

466467
(defconst clojure--collection-tag-regexp "#\\(::[a-zA-Z0-9._-]*\\|:?\\([a-zA-Z0-9._-]+/\\)?[a-zA-Z0-9._-]+\\)"

0 commit comments

Comments
 (0)