Skip to content

Commit

Permalink
Remove misleading lists of lispy-modes
Browse files Browse the repository at this point in the history
These couldn't meaningfully be altered anywhere else, it seems, so
better not to expose them.
  • Loading branch information
purcell committed Aug 13, 2023
1 parent 86befb5 commit 8d3ccb2
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions lisp/init-lisp.el
Original file line number Diff line number Diff line change
Expand Up @@ -179,26 +179,10 @@ there is no current file, eval the current buffer."
"Enable features useful in any Lisp mode."
(run-hooks 'sanityinc/lispy-modes-hook))

(defun sanityinc/emacs-lisp-setup ()
"Enable features useful when working with elisp."
(set-up-hippie-expand-for-elisp))

(defconst sanityinc/elispy-modes
'(emacs-lisp-mode ielm-mode)
"Major modes relating to elisp.")

(defconst sanityinc/lispy-modes
(append sanityinc/elispy-modes
'(lisp-mode inferior-lisp-mode lisp-interaction-mode))
"All lispy major modes.")

(require 'derived)

(dolist (hook (mapcar #'derived-mode-hook-name sanityinc/lispy-modes))
(add-hook hook 'sanityinc/lisp-setup))

(dolist (hook (mapcar #'derived-mode-hook-name sanityinc/elispy-modes))
(add-hook hook 'sanityinc/emacs-lisp-setup))
(dolist (mode '(emacs-lisp-mode ielm-mode lisp-mode inferior-lisp-mode lisp-interaction-mode))
(add-hook (derived-mode-hook-name mode) 'sanityinc/lisp-setup))

(when (boundp 'eval-expression-minibuffer-setup-hook)
(add-hook 'eval-expression-minibuffer-setup-hook #'eldoc-mode))
Expand Down

0 comments on commit 8d3ccb2

Please sign in to comment.