0

I have the following function to auto start raindow-delimters and paredit

(defun my-lisp-hook ()
  (enable-paredit-mode 1)
  (rainbow-delimiters-mode 1))

(add-hook 'clojure-mode-hook 'my-lisp-hook)

It worked at first but subsequently it stopped and I am not sure why

If I manually run them they start but then stop working again all of a sudden.

Here is my entire .emacs with a different config and still rainbowdelimeters does not work, and haven't tried paredit-mode in this config

(require 'package)
;; (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired.  See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(package-selected-packages '(rainbow-delimiters ace-window paredit cider clojure-mode))
 '(tab-width 4))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

(global-set-key (kbd "C-x o") 'ace-window)

(add-hook 'clojure-mode-hook 'rainbow-delimiters-mode)
1
  • Please don't just post your entire init file and ask others to debug it. Bisect it, to find the culprit part, and post only that. Show a step-by-step recipe with minimal code to repro the problem, starting from emacs -Q (no init file).
    – Drew
    Dec 25, 2021 at 21:31

1 Answer 1

0

Reinstalled Emacs used this config instead is working now

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired.  See `package-archive-priorities`                                                                                                               
;; and `package-pinned-packages`. Most users will not need or want to do this.                                                                                                                                    
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)                                                                                                                      
(package-initialize)
(custom-set-variables
 ;; custom-set-variables was added by Custom.                                                                                                                                                                     
 ;; If you edit it by hand, you could mess it up, so be careful.                                                                                                                                                  
 ;; Your init file should contain only one such instance.                                                                                                                                                         
 ;; If there is more than one, they won't work right.                                                                                                                                                             
 '(package-selected-packages
   '(paredit rainbow-delimiters clojure-mode-extra-font-locking cider)))
(custom-set-faces
 ;; custom-set-faces was added by Custom.                                                                                                                                                                         
 ;; If you edit it by hand, you could mess it up, so be careful.                                                                                                                                                  
 ;; Your init file should contain only one such instance.                                                                                                                                                         
 ;; If there is more than one, they won't work right.                                                                                                                                                             
 )

(add-hook 'clojure-mode-hook 'rainbow-delimiters-mode)

(add-hook 'cider-repl-mode-hook #'enable-paredit-mode)
(add-hook 'cider-mode-hook #'enable-paredit-mode)
(add-hook 'clojure-mode-hook #'enable-paredit-mode)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.