Clean up Emacs Lisp config

This commit is contained in:
Bozhidar Batsov 2013-04-29 08:00:04 +03:00
parent 0a56b3ffb5
commit 9fbef947b5

View file

@ -44,17 +44,15 @@
(delete-file (concat buffer-file-name "c")))))) (delete-file (concat buffer-file-name "c"))))))
(defun prelude-visit-ielm () (defun prelude-visit-ielm ()
"Switch to default `ielm' buffer.
Start `ielm' if it's not already running."
(interactive) (interactive)
(if (not (get-buffer "*ielm*")) (prelude-start-or-switch-to 'ielm "*ielm*"))
(progn
(split-window-sensibly (selected-window))
(other-window 1)
(ielm))
(switch-to-buffer-other-window "*ielm*")))
(define-key emacs-lisp-mode-map (kbd "C-c C-z") 'prelude-visit-ielm) (define-key emacs-lisp-mode-map (kbd "C-c C-z") 'prelude-visit-ielm)
(defun prelude-emacs-lisp-mode-defaults () (defun prelude-emacs-lisp-mode-defaults ()
"Sensible defaults for `emacs-lisp-mode'."
(run-hooks 'prelude-lisp-coding-hook) (run-hooks 'prelude-lisp-coding-hook)
(turn-on-eldoc-mode) (turn-on-eldoc-mode)
(prelude-remove-elc-on-save) (prelude-remove-elc-on-save)
@ -68,14 +66,14 @@
;; ielm is an interactive Emacs Lisp shell ;; ielm is an interactive Emacs Lisp shell
(defun prelude-ielm-mode-defaults () (defun prelude-ielm-mode-defaults ()
"Sensible defaults for `ielm'."
(run-hooks 'prelude-interactive-lisp-coding-hook) (run-hooks 'prelude-interactive-lisp-coding-hook)
(turn-on-eldoc-mode)) (turn-on-eldoc-mode))
(setq prelude-ielm-mode-hook 'prelude-ielm-mode-defaults) (setq prelude-ielm-mode-hook 'prelude-ielm-mode-defaults)
(add-hook 'ielm-mode-hook (lambda () (run-hooks 'prelude-ielm-mode-hook))) (add-hook 'ielm-mode-hook (lambda ()
(run-hooks 'prelude-ielm-mode-hook)))
(define-key emacs-lisp-mode-map (kbd "M-.") 'find-function-at-point)
(eval-after-load "elisp-slime-nav" (eval-after-load "elisp-slime-nav"
'(diminish 'elisp-slime-nav-mode)) '(diminish 'elisp-slime-nav-mode))