@@ -263,6 +263,16 @@ ENDP and DELIMITER."
263
263
t )
264
264
(= orig-point (match-end 0 )))))))))
265
265
266
+ (defun clojure-paredit-setup ()
267
+ " A bit code to make `paredit-mode' play nice with `clojure-mode' ."
268
+ (when (>= paredit-version 21 )
269
+ (define-key clojure-mode-map " {" 'paredit-open-curly )
270
+ (define-key clojure-mode-map " }" 'paredit-close-curly )
271
+ (add-to-list 'paredit-space-for-delimiter-predicates
272
+ 'clojure-space-for-delimiter-p )
273
+ (add-to-list 'paredit-space-for-delimiter-predicates
274
+ 'clojure-no-space-after-tag )))
275
+
266
276
;;;### autoload
267
277
(define-derived-mode clojure-mode clojure-parent-mode " Clojure"
268
278
" Major mode for editing Clojure code.
@@ -287,15 +297,7 @@ ENDP and DELIMITER."
287
297
(setq-local parse-sexp-ignore-comments t )
288
298
(clojure-mode-font-lock-setup)
289
299
(setq-local open-paren-in-column-0-is-defun-start nil )
290
- (add-hook 'paredit-mode-hook
291
- (lambda ()
292
- (when (>= paredit-version 21 )
293
- (define-key clojure-mode-map " {" 'paredit-open-curly )
294
- (define-key clojure-mode-map " }" 'paredit-close-curly )
295
- (add-to-list 'paredit-space-for-delimiter-predicates
296
- 'clojure-space-for-delimiter-p )
297
- (add-to-list 'paredit-space-for-delimiter-predicates
298
- 'clojure-no-space-after-tag )))))
300
+ (add-hook 'paredit-mode-hook 'clojure-paredit-setup ))
299
301
300
302
(defsubst clojure-in-docstring-p ()
301
303
" Check whether point is in a docstring."
0 commit comments