2012-12-15 22:07:25 +02:00
|
|
|
;;; prelude-lisp.el --- Emacs Prelude: Configuration common to all lisp modes.
|
|
|
|
;;
|
2014-12-07 11:37:46 +02:00
|
|
|
;; Copyright © 2011-2014 Bozhidar Batsov
|
2012-12-15 22:07:25 +02:00
|
|
|
;;
|
|
|
|
;; Author: Bozhidar Batsov <bozhidar@batsov.com>
|
2013-03-07 09:57:33 +02:00
|
|
|
;; URL: https://github.com/bbatsov/prelude
|
2012-12-15 22:07:25 +02:00
|
|
|
;; Version: 1.0.0
|
|
|
|
;; Keywords: convenience
|
|
|
|
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
;; Configuration shared between all modes related to lisp-like languages.
|
|
|
|
|
|
|
|
;;; License:
|
|
|
|
|
|
|
|
;; This program is free software; you can redistribute it and/or
|
|
|
|
;; modify it under the terms of the GNU General Public License
|
|
|
|
;; as published by the Free Software Foundation; either version 3
|
|
|
|
;; of the License, or (at your option) any later version.
|
|
|
|
;;
|
|
|
|
;; This program is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
;;
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
;; along with GNU Emacs; see the file COPYING. If not, write to the
|
|
|
|
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
;; Boston, MA 02110-1301, USA.
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(require 'prelude-programming)
|
2013-11-26 12:52:29 +02:00
|
|
|
(prelude-require-packages '(rainbow-delimiters))
|
2012-12-15 22:07:25 +02:00
|
|
|
|
|
|
|
;; Lisp configuration
|
2014-01-05 06:45:19 +02:00
|
|
|
(define-key read-expression-map (kbd "TAB") 'completion-at-point)
|
2012-12-15 22:07:25 +02:00
|
|
|
|
2013-10-17 19:20:28 +03:00
|
|
|
;; wrap keybindings
|
2013-12-07 09:14:44 +02:00
|
|
|
(define-key lisp-mode-shared-map (kbd "M-(") (prelude-wrap-with "("))
|
2013-12-07 08:45:05 +02:00
|
|
|
;; FIXME: Pick terminal-friendly binding.
|
2013-12-07 09:14:44 +02:00
|
|
|
;;(define-key lisp-mode-shared-map (kbd "M-[") (prelude-wrap-with "["))
|
|
|
|
(define-key lisp-mode-shared-map (kbd "M-\"") (prelude-wrap-with "\""))
|
2013-10-17 19:20:28 +03:00
|
|
|
|
2012-12-15 22:07:25 +02:00
|
|
|
;; a great lisp coding hook
|
|
|
|
(defun prelude-lisp-coding-defaults ()
|
2013-09-18 12:17:51 +03:00
|
|
|
(smartparens-strict-mode +1)
|
2012-12-15 22:07:25 +02:00
|
|
|
(rainbow-delimiters-mode +1))
|
|
|
|
|
|
|
|
(setq prelude-lisp-coding-hook 'prelude-lisp-coding-defaults)
|
|
|
|
|
|
|
|
;; interactive modes don't need whitespace checks
|
|
|
|
(defun prelude-interactive-lisp-coding-defaults ()
|
2013-09-18 12:17:51 +03:00
|
|
|
(smartparens-strict-mode +1)
|
2012-12-15 22:07:25 +02:00
|
|
|
(rainbow-delimiters-mode +1)
|
|
|
|
(whitespace-mode -1))
|
|
|
|
|
|
|
|
(setq prelude-interactive-lisp-coding-hook 'prelude-interactive-lisp-coding-defaults)
|
|
|
|
|
|
|
|
(provide 'prelude-lisp)
|
|
|
|
|
|
|
|
;;; prelude-lisp.el ends here
|