extracted non-essential modules to a separate project
This commit is contained in:
parent
66bc6f0809
commit
23f3853a95
35 changed files with 30 additions and 1586 deletions
52
init.el
52
init.el
|
@ -3,7 +3,7 @@
|
|||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; URL: http://batsov.com/emacs-prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
|
@ -32,38 +32,21 @@
|
|||
;; Boston, MA 02110-1301, USA.
|
||||
|
||||
;;; Code:
|
||||
(require 'cl)
|
||||
|
||||
(message "Emacs Prelude is powering up... Be patient, Master %s!"
|
||||
(getenv "USER"))
|
||||
|
||||
;; On OS X Emacs doesn't use the shell PATH if it's not started from
|
||||
;; the shell. If you're using homebrew modifying the PATH is essential.
|
||||
(if (eq system-type 'darwin)
|
||||
(push "/usr/local/bin" exec-path))
|
||||
|
||||
(defvar prelude-dir (file-name-directory load-file-name)
|
||||
"The root dir of the Emacs Prelude distribution.")
|
||||
(defvar prelude-modules-dir (concat prelude-dir "modules/")
|
||||
(defvar prelude-modules-dir (concat prelude-dir "prelude/")
|
||||
"This directory houses all of the built-in Prelude module. You should
|
||||
avoid modifying the configuration there.")
|
||||
(defvar prelude-vendor-dir (concat prelude-dir "vendor/")
|
||||
"This directory house Emacs Lisp packages that are not yet available in
|
||||
ELPA (or Marmalade).")
|
||||
(defvar prelude-snippets-dir (concat prelude-dir "snippets/")
|
||||
"This folder houses addition yasnippet bundles distributed with Prelude.")
|
||||
(defvar prelude-personal-dir (concat prelude-dir "personal/")
|
||||
"Users of Emacs Prelude are encouraged to keep their personal configuration
|
||||
changes in this directory. All Emacs Lisp files there are loaded automatically
|
||||
by Prelude.")
|
||||
(defvar prelude-personal-snippets-dir (concat prelude-personal-dir "snippets/"))
|
||||
(defvar prelude-personal-vendor-dir (concat prelude-personal-dir "vendor/"))
|
||||
|
||||
;; add Prelude's directories to Emacs's `load-path'
|
||||
(add-to-list 'load-path prelude-modules-dir)
|
||||
(add-to-list 'load-path prelude-vendor-dir)
|
||||
(add-to-list 'load-path prelude-personal-dir)
|
||||
(add-to-list 'load-path prelude-personal-vendor-dir)
|
||||
|
||||
;; the core stuff
|
||||
(require 'prelude-packages)
|
||||
|
@ -73,35 +56,8 @@ by Prelude.")
|
|||
(require 'prelude-editor)
|
||||
(require 'prelude-global-keybindings)
|
||||
|
||||
;; programming & markup languages support
|
||||
(require 'prelude-programming)
|
||||
(require 'prelude-c)
|
||||
(require 'prelude-css)
|
||||
(require 'prelude-clojure)
|
||||
(require 'prelude-coffee)
|
||||
(require 'prelude-common-lisp)
|
||||
(require 'prelude-cucumber)
|
||||
(require 'prelude-emacs-lisp)
|
||||
(require 'prelude-groovy)
|
||||
(require 'prelude-haml)
|
||||
(require 'prelude-haskell)
|
||||
(require 'prelude-erlang)
|
||||
(require 'prelude-js)
|
||||
(require 'prelude-latex)
|
||||
(require 'prelude-markdown)
|
||||
(require 'prelude-org)
|
||||
(require 'prelude-perl)
|
||||
(require 'prelude-python)
|
||||
(require 'prelude-ruby)
|
||||
(require 'prelude-scheme)
|
||||
(require 'prelude-scss)
|
||||
(require 'prelude-xml)
|
||||
(require 'prelude-yaml)
|
||||
|
||||
;; tools & utilities support
|
||||
(require 'prelude-ack)
|
||||
(require 'prelude-erc)
|
||||
(require 'prelude-mediawiki)
|
||||
(when (eq system-type 'darwin)
|
||||
(require 'prelude-osx))
|
||||
|
||||
;; config changes made through the customize UI will be store here
|
||||
(setq custom-file (concat prelude-personal-dir "custom.el"))
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
;;; prelude-ack.el --- Emacs Prelude: ack support
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Some basic configuration for ack-and-a-half.el.
|
||||
|
||||
;;; 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:
|
||||
|
||||
;; create shorter aliases
|
||||
(defalias 'ack 'ack-and-a-half)
|
||||
(defalias 'ack-same 'ack-and-a-half-same)
|
||||
(defalias 'ack-find-file 'ack-and-a-half-find-file)
|
||||
(defalias 'ack-find-file-same 'ack-and-a-half-find-file-same)
|
||||
|
||||
(provide 'prelude-ack)
|
||||
;;; prelude-ack.el ends here
|
|
@ -1,54 +0,0 @@
|
|||
;;; prelude-c.el --- Emacs Prelude: cc-mode configuration.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Some basic configuration for cc-mode and the modes derived from it.
|
||||
|
||||
;;; 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:
|
||||
|
||||
(defun prelude-c-mode-common-defaults ()
|
||||
(setq indent-tabs-mode t)
|
||||
(setq c-basic-offset 4))
|
||||
|
||||
(setq prelude-c-mode-common-hook 'prelude-c-mode-common-defaults)
|
||||
|
||||
;; this will affect all modes derived from cc-mode, like
|
||||
;; java-mode, php-mode, etc
|
||||
(add-hook 'c-mode-common-hook (lambda () (run-hooks 'prelude-c-mode-common-hook)))
|
||||
|
||||
(defun prelude-makefile-mode-defaults ()
|
||||
(setq indent-tabs-mode t))
|
||||
|
||||
(setq prelude-makefile-mode-hook 'prelude-makefile-mode-defaults)
|
||||
|
||||
(add-hook 'makefile-mode-hook (lambda () (run-hooks 'prelude-makefile-mode-hook)))
|
||||
|
||||
(provide 'prelude-c)
|
||||
|
||||
;;; prelude-c.el ends here
|
|
@ -1,53 +0,0 @@
|
|||
;;; prelude-clojure.el --- Emacs Prelude: Clojure programming configuration.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Some basic configuration for clojure-mode.
|
||||
|
||||
;;; 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-lisp)
|
||||
|
||||
;; To start SLIME in your Clojure project:
|
||||
;; 1. lein plugin install swank-clojure 1.3.1 (or newer)
|
||||
;; 2. Invoke M-x clojure-jack-in from a project
|
||||
|
||||
(eval-after-load 'clojure-mode
|
||||
'(progn
|
||||
(defun prelude-clojure-mode-defaults ()
|
||||
(run-hooks 'prelude-lisp-coding-hook))
|
||||
|
||||
(setq prelude-clojure-mode-hook 'prelude-clojure-mode-defaults)
|
||||
|
||||
(add-hook 'clojure-mode-hook (lambda ()
|
||||
(run-hooks 'prelude-clojure-mode-hook)))))
|
||||
|
||||
(provide 'prelude-clojure)
|
||||
|
||||
;;; prelude-clojure.el ends here
|
|
@ -1,74 +0,0 @@
|
|||
;;; prelude-coffee.el --- Emacs Prelude: CoffeeScript programming support.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; CoffeeScript is a nice little language that comples to JavaScript.
|
||||
|
||||
;;; 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:
|
||||
|
||||
(eval-after-load 'coffee-mode
|
||||
'(progn
|
||||
(defun prelude-coffee-mode-defaults ()
|
||||
"coffee-mode-defaults"
|
||||
|
||||
;; CoffeeScript uses two spaces.
|
||||
(set (make-local-variable 'tab-width) 2)
|
||||
|
||||
;; If you don't have js2-mode
|
||||
(setq coffee-js-mode 'javascript-mode)
|
||||
|
||||
;; If you don't want your compiled files to be wrapped
|
||||
(setq coffee-args-compile '("-c" "--bare"))
|
||||
|
||||
;; *Messages* spam
|
||||
(setq coffee-debug-mode t)
|
||||
|
||||
;; electric-indent doesn't play nice with coffee-mode's "smart"
|
||||
;; indent
|
||||
(electric-indent-mode -1)
|
||||
|
||||
;; Emacs key binding
|
||||
(define-key coffee-mode-map [(meta r)] 'coffee-compile-buffer)
|
||||
|
||||
;; Riding edge.
|
||||
(setq coffee-command "~/dev/coffee")
|
||||
|
||||
;; Compile '.coffee' files on every save
|
||||
(and (file-exists-p (buffer-file-name))
|
||||
(file-exists-p (coffee-compiled-file-name))
|
||||
(coffee-cos-mode t)))
|
||||
|
||||
(setq prelude-coffee-mode-hook 'prelude-coffee-mode-defaults)
|
||||
|
||||
(add-hook 'coffee-mode-hook (lambda ()
|
||||
(run-hooks 'prelude-coffee-mode-hook)))))
|
||||
|
||||
(provide 'prelude-coffee)
|
||||
|
||||
;;; prelude-coffee.el ends here
|
|
@ -1,97 +0,0 @@
|
|||
;;; prelude-common-lisp.el --- Emacs Prelude: lisp-mode and SLIME config.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Configuration for lisp-mode and SLIME.
|
||||
|
||||
;;; 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-lisp)
|
||||
|
||||
;; the SBCL configuration file is in Common Lisp
|
||||
(add-to-list 'auto-mode-alist '("\\.sbclrc$" . lisp-mode))
|
||||
|
||||
;; Use SLIME from Quicklisp
|
||||
(defun prelude-load-common-lisp-slime ()
|
||||
(interactive)
|
||||
;; Common Lisp support depends on SLIME being installed with Quicklisp
|
||||
(if (file-exists-p (expand-file-name "~/quicklisp/slime-helper.el"))
|
||||
(load (expand-file-name "~/quicklisp/slime-helper.el"))
|
||||
(message "%s" "SLIME is not installed. Use Quicklisp to install it.")))
|
||||
|
||||
;; a list of alternative Common Lisp implementations that can be
|
||||
;; used with SLIME. Note that their presence render
|
||||
;; inferior-lisp-program useless. This variable holds a list of
|
||||
;; programs and if you invoke SLIME with a negative prefix
|
||||
;; argument, M-- M-x slime, you can select a program from that list.
|
||||
(setq slime-lisp-implementations
|
||||
'((ccl ("ccl"))
|
||||
(clisp ("clisp" "-q"))
|
||||
(cmucl ("cmucl" "-quiet"))
|
||||
(sbcl ("sbcl" "--noinform") :coding-system utf-8-unix)))
|
||||
|
||||
;; select the default value from slime-lisp-implementations
|
||||
(if (eq system-type 'darwin)
|
||||
;; default to Clozure CL on OS X
|
||||
(setq slime-default-lisp 'ccl)
|
||||
;; default to SBCL on Linux and Windows
|
||||
(setq slime-default-lisp 'sbcl))
|
||||
|
||||
(add-hook 'lisp-mode-hook (lambda () (run-hooks 'prelude-lisp-coding-hook)))
|
||||
(add-hook 'slime-repl-mode-hook (lambda () (run-hooks 'prelude-interactive-lisp-coding-hook)))
|
||||
|
||||
;; start slime automatically when we open a lisp file
|
||||
(defun prelude-start-slime ()
|
||||
(unless (slime-connected-p)
|
||||
(save-excursion (slime))))
|
||||
|
||||
(add-hook 'slime-mode-hook 'prelude-start-slime)
|
||||
|
||||
;; Stop SLIME's REPL from grabbing DEL,
|
||||
;; which is annoying when backspacing over a '('
|
||||
(defun prelude-override-slime-repl-bindings-with-paredit ()
|
||||
(define-key slime-repl-mode-map
|
||||
(read-kbd-macro paredit-backward-delete-key) nil))
|
||||
|
||||
(add-hook 'slime-repl-mode-hook 'prelude-override-slime-repl-bindings-with-paredit)
|
||||
|
||||
(eval-after-load "slime"
|
||||
'(progn
|
||||
(setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol
|
||||
slime-fuzzy-completion-in-place t
|
||||
slime-enable-evaluate-in-emacs t
|
||||
slime-autodoc-use-multiline-p t)
|
||||
|
||||
(define-key slime-mode-map (kbd "TAB") 'slime-indent-and-complete-symbol)
|
||||
(define-key slime-mode-map (kbd "C-c i") 'slime-inspect)
|
||||
(define-key slime-mode-map (kbd "C-c C-s") 'slime-selector)))
|
||||
|
||||
(provide 'prelude-common-lisp)
|
||||
|
||||
;;; prelude-common-lisp.el ends here
|
|
@ -1,11 +0,0 @@
|
|||
(eval-after-load 'css-mode
|
||||
'(progn
|
||||
(defun prelude-css-mode-defaults ()
|
||||
(setq css-indent-offset 2)
|
||||
(rainbow-mode +1))
|
||||
|
||||
(setq prelude-css-mode-hook 'prelude-css-mode-defaults)
|
||||
|
||||
(add-hook 'css-mode-hook (lambda () (run-hooks 'prelude-css-mode-hook)))))
|
||||
|
||||
(provide 'prelude-css)
|
|
@ -1,4 +0,0 @@
|
|||
(autoload 'feature-mode "feature-mode" "Feature mode." t)
|
||||
(add-to-list 'auto-mode-alist '("\\.feature$" . feature-mode))
|
||||
|
||||
(provide 'prelude-cucumber)
|
|
@ -1,68 +0,0 @@
|
|||
;;; prelude-emacs-lisp.el --- Emacs Prelude: Nice config for Elisp programming.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Nice config for Elisp Programming.
|
||||
|
||||
;;; 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-lisp)
|
||||
|
||||
(defun prelude-remove-elc-on-save ()
|
||||
"If you're saving an elisp file, likely the .elc is no longer valid."
|
||||
(make-local-variable 'after-save-hook)
|
||||
(add-hook 'after-save-hook
|
||||
(lambda ()
|
||||
(if (file-exists-p (concat buffer-file-name "c"))
|
||||
(delete-file (concat buffer-file-name "c"))))))
|
||||
|
||||
(defun prelude-emacs-lisp-mode-defaults ()
|
||||
(run-hooks 'prelude-lisp-coding-hook)
|
||||
(turn-on-eldoc-mode)
|
||||
(prelude-remove-elc-on-save)
|
||||
(rainbow-mode +1))
|
||||
|
||||
(setq prelude-emacs-lisp-mode-hook 'prelude-emacs-lisp-mode-defaults)
|
||||
|
||||
(add-hook 'emacs-lisp-mode-hook (lambda () (run-hooks 'prelude-emacs-lisp-mode-hook)))
|
||||
|
||||
;; ielm is an interactive Emacs Lisp shell
|
||||
(defun prelude-ielm-mode-defaults ()
|
||||
(run-hooks 'prelude-interactive-lisp-coding-hook)
|
||||
(turn-on-eldoc-mode))
|
||||
|
||||
(setq prelude-ielm-mode-hook 'prelude-ielm-mode-defaults)
|
||||
|
||||
(add-hook 'ielm-mode-hook (lambda () (run-hooks 'prelude-ielm-mode-hook)))
|
||||
|
||||
(define-key emacs-lisp-mode-map (kbd "M-.") 'find-function-at-point)
|
||||
|
||||
(provide 'prelude-emacs-lisp)
|
||||
|
||||
;;; prelude-emacs-lisp.el ends here
|
|
@ -1,162 +0,0 @@
|
|||
;;; prelude-erc.el --- Emacs Prelude: ERC mode configuration.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Some basic configuration for ERC mode, which should make your
|
||||
;; IRC experience a bit more pleasant.
|
||||
|
||||
;;; 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 'erc)
|
||||
(require 'erc-log)
|
||||
(require 'erc-notify)
|
||||
(require 'erc-spelling)
|
||||
(require 'erc-autoaway)
|
||||
|
||||
;; Interpret mIRC-style color commands in IRC chats
|
||||
(setq erc-interpret-mirc-color t)
|
||||
|
||||
;; The following are commented out by default, but users of other
|
||||
;; non-Emacs IRC clients might find them useful.
|
||||
;; Kill buffers for channels after /part
|
||||
(setq erc-kill-buffer-on-part t)
|
||||
;; Kill buffers for private queries after quitting the server
|
||||
(setq erc-kill-queries-on-quit t)
|
||||
;; Kill buffers for server messages after quitting the server
|
||||
(setq erc-kill-server-buffer-on-quit t)
|
||||
|
||||
;; open query buffers in the current window
|
||||
(setq erc-query-display 'buffer)
|
||||
|
||||
;; exclude boring stuff from tracking
|
||||
(erc-track-mode t)
|
||||
(setq erc-track-exclude-types '("JOIN" "NICK" "PART" "QUIT" "MODE"
|
||||
"324" "329" "332" "333" "353" "477"))
|
||||
|
||||
;; logging
|
||||
(setq erc-log-channels-directory "~/.erc/logs/")
|
||||
|
||||
(if (not (file-exists-p erc-log-channels-directory))
|
||||
(mkdir erc-log-channels-directory t))
|
||||
|
||||
(setq erc-save-buffer-on-part t)
|
||||
;; FIXME - this advice is wrong and is causing problems on Emacs exit
|
||||
;; (defadvice save-buffers-kill-emacs (before save-logs (arg) activate)
|
||||
;; (save-some-buffers t (lambda () (when (eq major-mode 'erc-mode) t))))
|
||||
|
||||
;; truncate long irc buffers
|
||||
(erc-truncate-mode +1)
|
||||
|
||||
;; enable spell checking
|
||||
(erc-spelling-mode 1)
|
||||
;; set different dictionaries by different servers/channels
|
||||
;;(setq erc-spelling-dictionaries '(("#emacs" "american")))
|
||||
|
||||
;; TODO - replace this with use of notify.el
|
||||
;; Notify my when someone mentions my nick.
|
||||
(defun call-libnotify (matched-type nick msg)
|
||||
(let* ((cmsg (split-string (clean-message msg)))
|
||||
(nick (first (split-string nick "!")))
|
||||
(msg (mapconcat 'identity (rest cmsg) " ")))
|
||||
(shell-command-to-string
|
||||
(format "notify-send -u critical '%s says:' '%s'" nick msg))))
|
||||
|
||||
(when (eq system-type 'linux)
|
||||
(add-hook 'erc-text-matched-hook 'call-libnotify))
|
||||
|
||||
(defvar erc-notify-nick-alist nil
|
||||
"Alist of nicks and the last time they tried to trigger a
|
||||
notification")
|
||||
|
||||
(defvar erc-notify-timeout 10
|
||||
"Number of seconds that must elapse between notifications from
|
||||
the same person.")
|
||||
|
||||
(defun erc-notify-allowed-p (nick &optional delay)
|
||||
"Return non-nil if a notification should be made for NICK.
|
||||
If DELAY is specified, it will be the minimum time in seconds
|
||||
that can occur between two notifications. The default is
|
||||
`erc-notify-timeout'."
|
||||
(unless delay (setq delay erc-notify-timeout))
|
||||
(let ((cur-time (time-to-seconds (current-time)))
|
||||
(cur-assoc (assoc nick erc-notify-nick-alist))
|
||||
(last-time nil))
|
||||
(if cur-assoc
|
||||
(progn
|
||||
(setq last-time (cdr cur-assoc))
|
||||
(setcdr cur-assoc cur-time)
|
||||
(> (abs (- cur-time last-time)) delay))
|
||||
(push (cons nick cur-time) erc-notify-nick-alist)
|
||||
t)))
|
||||
|
||||
;; private message notification
|
||||
(defun erc-notify-on-private-msg (proc parsed)
|
||||
(let ((nick (car (erc-parse-user (erc-response.sender parsed))))
|
||||
(target (car (erc-response.command-args parsed)))
|
||||
(msg (erc-response.contents parsed)))
|
||||
(when (and (erc-current-nick-p target)
|
||||
(not (erc-is-message-ctcp-and-not-action-p msg))
|
||||
(erc-notify-allowed-p nick))
|
||||
(shell-command-to-string
|
||||
(format "notify-send -u critical '%s says:' '%s'" nick msg))
|
||||
nil)))
|
||||
|
||||
(add-hook 'erc-server-PRIVMSG-functions 'erc-notify-on-private-msg)
|
||||
|
||||
;; autoaway setup
|
||||
(setq erc-auto-discard-away t)
|
||||
(setq erc-autoaway-idle-seconds 600)
|
||||
(setq erc-autoaway-use-emacs-idle t)
|
||||
|
||||
;; utf-8 always and forever
|
||||
(setq erc-server-coding-system '(utf-8 . utf-8))
|
||||
|
||||
(defun start-irc ()
|
||||
"Connect to IRC."
|
||||
(interactive)
|
||||
(when (y-or-n-p "Do you want to start IRC? ")
|
||||
(erc :server "irc.freenode.net" :port 6667 :nick erc-nick)))
|
||||
|
||||
(defun filter-server-buffers ()
|
||||
(delq nil
|
||||
(mapcar
|
||||
(lambda (x) (and (erc-server-buffer-p x) x))
|
||||
(buffer-list))))
|
||||
|
||||
(defun stop-irc ()
|
||||
"Disconnects from all irc servers"
|
||||
(interactive)
|
||||
(dolist (buffer (filter-server-buffers))
|
||||
(message "Server buffer: %s" (buffer-name buffer))
|
||||
(with-current-buffer buffer
|
||||
(erc-quit-server "Asta la vista"))))
|
||||
|
||||
(provide 'prelude-erc)
|
||||
|
||||
;;; prelude-erc.el ends here
|
|
@ -1,71 +0,0 @@
|
|||
;;; prelude-erlang.el --- Emacs Prelude: Erlang programming support.
|
||||
;;
|
||||
;; Copyright (c) 2011 Gleb Peregud
|
||||
;;
|
||||
;; Author: Gleb Peregud <gleber.p@gmail.com>
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience erlang
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Erlang is a concurrent functional language.
|
||||
|
||||
;;; 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:
|
||||
|
||||
(defcustom wrangler-path nil
|
||||
"*The location of wrangler elisp directory"
|
||||
:group 'prelude-erlang
|
||||
:type 'string
|
||||
:safe 'stringp)
|
||||
|
||||
(when (require 'erlang-start nil t)
|
||||
|
||||
(eval-after-load 'erlang-mode
|
||||
'(progn
|
||||
(flymake-mode)))
|
||||
|
||||
(when (not (null wrangler-path))
|
||||
(add-to-list 'load-path wrangler-path)
|
||||
(require 'wrangler)))
|
||||
|
||||
(defun erlang-rebar-compile ()
|
||||
(interactive)
|
||||
(let* ((dir (or (projectile-get-project-root)
|
||||
(file-name-directory (buffer-file-name))))
|
||||
(pref (concat "cd " dir " && "))
|
||||
(cmd (cond ((file-exists-p (expand-file-name "rebar" dir)) "./rebar compile")
|
||||
((executable-find "rebar") "rebar compile")
|
||||
((file-exists-p (expand-file-name "Makefile" dir)) "Makefile")
|
||||
(t nil))))
|
||||
(if cmd
|
||||
(compilation-start (concat pref cmd))
|
||||
(call-interactively 'inferior-erlang-compile))
|
||||
))
|
||||
|
||||
(add-hook 'erlang-mode-hook (lambda ()
|
||||
(make-variable-buffer-local 'projectile-project-root-files)
|
||||
(setq projectile-project-root-files '("rebar.config" ".git" ".hg" ".bzr" ".projectile"))
|
||||
(setq erlang-compile-function 'erlang-rebar-compile)))
|
||||
|
||||
(provide 'prelude-erlang)
|
||||
|
||||
;;; prelude-erlang.el ends here
|
|
@ -1,105 +0,0 @@
|
|||
;;; prelude-global-keybindings.el --- Emacs Prelude: some useful keybindings.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Lots of useful keybindings.
|
||||
|
||||
;;; 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:
|
||||
|
||||
;; You know, like Readline.
|
||||
(global-set-key (kbd "C-M-h") 'backward-kill-word)
|
||||
|
||||
;; Align your code in a pretty way.
|
||||
(global-set-key (kbd "C-x \\") 'align-regexp)
|
||||
|
||||
;; Font size
|
||||
(define-key global-map (kbd "C-+") 'text-scale-increase)
|
||||
(define-key global-map (kbd "C--") 'text-scale-decrease)
|
||||
|
||||
;; Window switching. (C-x o goes to the next window)
|
||||
(global-set-key (kbd "C-x O") (lambda ()
|
||||
(interactive)
|
||||
(other-window -1))) ;; back one
|
||||
|
||||
;; Indentation help
|
||||
(global-set-key (kbd "C-x ^") 'join-line)
|
||||
|
||||
;; Start proced in a similar manner to dired
|
||||
(global-set-key (kbd "C-x p") 'proced)
|
||||
|
||||
;; Start eshell or switch to it if it's active.
|
||||
(global-set-key (kbd "C-x m") 'eshell)
|
||||
|
||||
;; Start a new eshell even if one is active.
|
||||
(global-set-key (kbd "C-x M") (lambda () (interactive) (eshell t)))
|
||||
|
||||
;; Start a regular shell if you prefer that.
|
||||
(global-set-key (kbd "C-x M-m") 'shell)
|
||||
|
||||
;; If you want to be able to M-x without meta
|
||||
(global-set-key (kbd "C-x C-m") 'execute-extended-command)
|
||||
|
||||
;; A complementary binding to the apropos-command(C-h a)
|
||||
(global-set-key (kbd "C-h A") 'apropos)
|
||||
|
||||
;; Activate occur easily inside isearch
|
||||
(define-key isearch-mode-map (kbd "C-o")
|
||||
(lambda () (interactive)
|
||||
(let ((case-fold-search isearch-case-fold-search))
|
||||
(occur (if isearch-regexp
|
||||
isearch-string
|
||||
(regexp-quote isearch-string))))))
|
||||
|
||||
;; use hippie-expand instead of dabbrev
|
||||
(global-set-key (kbd "M-/") 'hippie-expand)
|
||||
|
||||
;; replace buffer-menu with ibuffer
|
||||
(global-set-key (kbd "C-x C-b") 'ibuffer)
|
||||
|
||||
;; toggle menu-bar visibility
|
||||
(global-set-key (kbd "<f12>") 'menu-bar-mode)
|
||||
|
||||
;; real Emacs hackers don't use the arrow keys
|
||||
(global-unset-key [up])
|
||||
(global-unset-key [down])
|
||||
(global-unset-key [left])
|
||||
(global-unset-key [right])
|
||||
|
||||
;; use M-f and M-b instead
|
||||
(global-unset-key [M-left])
|
||||
(global-unset-key [M-right])
|
||||
|
||||
(global-set-key (kbd "C-x g") 'magit-status)
|
||||
|
||||
(global-set-key (kbd "C-=") 'er/expand-region)
|
||||
(global-set-key (kbd "C-c w") (make-repeatable-command 'er/expand-region))
|
||||
|
||||
(provide 'prelude-global-keybindings)
|
||||
|
||||
;;; prelude-global-keybindings.el ends here
|
|
@ -1,6 +0,0 @@
|
|||
;;; use groovy-mode when file ends in .groovy or has #!/bin/groovy at start
|
||||
(autoload 'groovy-mode "groovy-mode" "Major mode for editing Groovy code." t)
|
||||
(add-to-list 'auto-mode-alist '("\.groovy$" . groovy-mode))
|
||||
(add-to-list 'interpreter-mode-alist '("groovy" . groovy-mode))
|
||||
|
||||
(provide 'prelude-groovy)
|
|
@ -1,3 +0,0 @@
|
|||
(add-to-list 'auto-mode-alist '("\\.haml$" . haml-mode))
|
||||
|
||||
(provide 'prelude-haml)
|
|
@ -1,51 +0,0 @@
|
|||
;;; prelude-haskell.el --- Emacs Prelude: Nice config for Haskell programming.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Nice config for Haskell programming.
|
||||
|
||||
;;; 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:
|
||||
|
||||
(eval-after-load 'haskell-mode
|
||||
'(progn
|
||||
(defun prelude-haskell-mode-defaults ()
|
||||
;; run manually since haskell-mode is not derived from prog-mode
|
||||
(run-hooks 'prelude-prog-mode-hook)
|
||||
(subword-mode +1)
|
||||
(turn-on-haskell-doc-mode)
|
||||
(turn-on-haskell-indentation))
|
||||
|
||||
(setq prelude-haskell-mode-hook 'prelude-haskell-mode-defaults)
|
||||
|
||||
(add-hook 'haskell-mode-hook (lambda ()
|
||||
(run-hooks 'prelude-haskell-mode-hook)))))
|
||||
|
||||
(provide 'prelude-haskell)
|
||||
|
||||
;;; prelude-haskell.el ends here
|
|
@ -1,47 +0,0 @@
|
|||
;;; prelude-js.el --- Emacs Prelude: js-mode configuration.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Some basic configuration for js-mode.
|
||||
|
||||
;;; 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:
|
||||
|
||||
(eval-after-load 'js-mode
|
||||
'(progn
|
||||
(defun prelude-js-mode-defaults ()
|
||||
;; electric-layout-mode doesn't play nice with js-mode
|
||||
(electric-layout-mode -1))
|
||||
|
||||
(setq prelude-js-mode-hook 'prelude-js-mode-defaults)
|
||||
|
||||
(add-hook 'js-mode-hook (lambda () (run-hooks 'prelude-js-mode-hook)))))
|
||||
|
||||
(provide 'prelude-js)
|
||||
|
||||
;;; prelude-js.el ends here
|
|
@ -1,65 +0,0 @@
|
|||
;;; prelude-latex.el --- Emacs Prelude: Sane setup for LaTeX writers.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Nice defaults for the premium LaTeX editing mode auctex.
|
||||
|
||||
;;; 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:
|
||||
|
||||
;; AUCTeX configuration
|
||||
(setq TeX-auto-save t)
|
||||
(setq TeX-parse-self t)
|
||||
|
||||
(setq-default TeX-master nil)
|
||||
|
||||
;; use pdflatex
|
||||
(setq TeX-PDF-mode t)
|
||||
|
||||
(setq TeX-view-program-selection
|
||||
'((output-dvi "DVI Viewer")
|
||||
(output-pdf "PDF Viewer")
|
||||
(output-html "HTML Viewer")))
|
||||
;; this section is good for OS X only
|
||||
;; TODO add sensible defaults for Linux/Windows
|
||||
(setq TeX-view-program-list
|
||||
'(("DVI Viewer" "open %o")
|
||||
("PDF Viewer" "open %o")
|
||||
("HTML Viewer" "open %o")))
|
||||
|
||||
(defun prelude-latex-mode-defaults ()
|
||||
(turn-on-auto-fill)
|
||||
(abbrev-mode +1))
|
||||
|
||||
(setq prelude-latex-mode-hook 'prelude-latex-mode-defaults)
|
||||
|
||||
(add-hook 'LaTeX-mode-hook (lambda () (run-hooks 'prelude-latex-mode-hook)))
|
||||
|
||||
(provide 'prelude-latex)
|
||||
|
||||
;;; prelude-latex.el ends here
|
|
@ -1,53 +0,0 @@
|
|||
;;; prelude-lisp.el --- Emacs Prelude: Configuration common to all lisp modes.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; 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:
|
||||
|
||||
;; Lisp configuration
|
||||
(define-key read-expression-map (kbd "TAB") 'lisp-complete-symbol)
|
||||
|
||||
;; a great lisp coding hook
|
||||
(defun prelude-lisp-coding-defaults ()
|
||||
(paredit-mode +1))
|
||||
|
||||
(setq prelude-lisp-coding-hook 'prelude-lisp-coding-defaults)
|
||||
|
||||
;; interactive modes don't need whitespace checks
|
||||
(defun prelude-interactive-lisp-coding-defaults ()
|
||||
(paredit-mode +1)
|
||||
(prelude-turn-off-whitespace))
|
||||
|
||||
(setq prelude-interactive-lisp-coding-hook 'prelude-interactive-lisp-coding-defaults)
|
||||
|
||||
(provide 'prelude-lisp)
|
||||
|
||||
;;; prelude-lisp.el ends here
|
|
@ -1,40 +0,0 @@
|
|||
;;; prelude-markdown.el --- Emacs Prelude: markdown-mode configuration.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; A simple configuration for markdown-mode.
|
||||
|
||||
;;; 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:
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.md$" . markdown-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.markdown$" . markdown-mode))
|
||||
|
||||
(provide 'prelude-markdown)
|
||||
|
||||
;;; prelude-markdown.el ends here
|
|
@ -1,45 +0,0 @@
|
|||
;;; prelude-mediawiki.el --- Emacs Prelude: mediawiki editing config
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configs for access to WikEmacs and Wikipedia.
|
||||
|
||||
;;; 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:
|
||||
|
||||
(eval-after-load 'mediawiki
|
||||
'(progn
|
||||
(setq mediawiki-site-alist '(("Wikipedia" "http://en.wikipedia.org/w" "" "" "Main Page")
|
||||
("WikEmacs" "http://wikemacs.org/w/" "" "" "Main Page")))
|
||||
|
||||
;; Emacs users care more for WikEmacs than Wikipedia :-)
|
||||
(setq mediawiki-site-default "WikEmacs")))
|
||||
|
||||
(provide 'prelude-mediawiki)
|
||||
|
||||
;;; prelude-mediawiki.el ends here
|
|
@ -1,50 +0,0 @@
|
|||
;;; prelude-org.el --- Emacs Prelude: org-mode configuration.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Some basic configuration for org-mode.
|
||||
|
||||
;;; 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:
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.org\\’" . org-mode))
|
||||
(global-set-key "\C-cl" 'org-store-link)
|
||||
(global-set-key "\C-ca" 'org-agenda)
|
||||
(global-set-key "\C-cb" 'org-iswitchb)
|
||||
(setq org-log-done t)
|
||||
|
||||
(defun prelude-org-mode-defaults ()
|
||||
(electric-indent-mode -1))
|
||||
|
||||
(setq prelude-org-mode-hook 'prelude-org-mode-defaults)
|
||||
|
||||
(add-hook 'org-mode-hook (lambda () (run-hooks 'prelude-org-mode-hook)))
|
||||
|
||||
(provide 'prelude-org)
|
||||
|
||||
;;; prelude-org.el ends here
|
|
@ -1,65 +0,0 @@
|
|||
;;; prelude-perl.el --- Emacs Prelude: decent Perl coding settings.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; cperl-mode is the best Perl mode for Emacs out there.
|
||||
|
||||
;;; 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:
|
||||
|
||||
;; use cperl-mode instead of perl-mode
|
||||
(defalias 'perl-mode 'cperl-mode)
|
||||
|
||||
(defun prelude-cperl-mode-defaults ()
|
||||
(setq cperl-indent-level 4)
|
||||
(setq cperl-continued-statement-offset 8)
|
||||
;; cperl-hairy affects all those variables, but I prefer
|
||||
;; a more fine-grained approach as far as they are concerned
|
||||
(setq cperl-font-lock t)
|
||||
(setq cperl-electric-lbrace-space t)
|
||||
(setq cperl-electric-parens nil)
|
||||
(setq cperl-electric-linefeed nil)
|
||||
(setq cperl-electric-keywords nil)
|
||||
(setq cperl-info-on-command-no-prompt t)
|
||||
(setq cperl-clobber-lisp-bindings t)
|
||||
(setq cperl-lazy-help-time 3)
|
||||
|
||||
;; if you want all the bells and whistles
|
||||
;; (setq cperl-hairy)
|
||||
|
||||
(set-face-background 'cperl-array-face nil)
|
||||
(set-face-background 'cperl-hash-face nil)
|
||||
(setq cperl-invalid-face nil))
|
||||
|
||||
(setq prelude-cperl-mode-hook 'prelude-cperl-mode-defaults)
|
||||
|
||||
(add-hook 'cperl-mode-hook (lambda () (run-hooks 'prelude-cperl-mode-hook)) t)
|
||||
|
||||
(provide 'prelude-perl)
|
||||
|
||||
;;; prelude-perl.el ends here
|
|
@ -1,123 +0,0 @@
|
|||
;;; prelude-programming.el --- Emacs Prelude: prog-mode configuration
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Some basic prog-mode configuration and programming related utilities.
|
||||
|
||||
;;; 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 'imenu)
|
||||
|
||||
(defun prelude-ido-goto-symbol (&optional symbol-list)
|
||||
"Refresh imenu and jump to a place in the buffer using Ido."
|
||||
(interactive)
|
||||
(unless (featurep 'imenu)
|
||||
(require 'imenu nil t))
|
||||
(cond
|
||||
((not symbol-list)
|
||||
(let ((ido-mode ido-mode)
|
||||
(ido-enable-flex-matching
|
||||
(if (boundp 'ido-enable-flex-matching)
|
||||
ido-enable-flex-matching t))
|
||||
name-and-pos symbol-names position)
|
||||
(unless ido-mode
|
||||
(ido-mode 1)
|
||||
(setq ido-enable-flex-matching t))
|
||||
(while (progn
|
||||
(imenu--cleanup)
|
||||
(setq imenu--index-alist nil)
|
||||
(prelude-ido-goto-symbol (imenu--make-index-alist))
|
||||
(setq selected-symbol
|
||||
(ido-completing-read "Symbol? " symbol-names))
|
||||
(string= (car imenu--rescan-item) selected-symbol)))
|
||||
(unless (and (boundp 'mark-active) mark-active)
|
||||
(push-mark nil t nil))
|
||||
(setq position (cdr (assoc selected-symbol name-and-pos)))
|
||||
(cond
|
||||
((overlayp position)
|
||||
(goto-char (overlay-start position)))
|
||||
(t
|
||||
(goto-char position)))))
|
||||
((listp symbol-list)
|
||||
(dolist (symbol symbol-list)
|
||||
(let (name position)
|
||||
(cond
|
||||
((and (listp symbol) (imenu--subalist-p symbol))
|
||||
(prelude-ido-goto-symbol symbol))
|
||||
((listp symbol)
|
||||
(setq name (car symbol))
|
||||
(setq position (cdr symbol)))
|
||||
((stringp symbol)
|
||||
(setq name symbol)
|
||||
(setq position
|
||||
(get-text-property 1 'org-imenu-marker symbol))))
|
||||
(unless (or (null position) (null name)
|
||||
(string= (car imenu--rescan-item) name))
|
||||
(add-to-list 'symbol-names name)
|
||||
(add-to-list 'name-and-pos (cons name position))))))))
|
||||
|
||||
(defun prelude-local-comment-auto-fill ()
|
||||
(set (make-local-variable 'comment-auto-fill-only-comments) t)
|
||||
(auto-fill-mode t))
|
||||
|
||||
(defun prelude-add-watchwords ()
|
||||
(font-lock-add-keywords
|
||||
nil '(("\\<\\(FIX\\|TODO\\|FIXME\\|HACK\\|REFACTOR\\):"
|
||||
1 font-lock-warning-face t))))
|
||||
|
||||
;; show the name of the current function definition in the modeline
|
||||
(require 'which-func)
|
||||
(which-func-mode 1)
|
||||
|
||||
;; in Emacs 24 programming major modes generally derive from a common
|
||||
;; mode named prog-mode; for others, we'll arrange for our mode
|
||||
;; defaults function to run prelude-prog-mode-hook directly. To
|
||||
;; augment and/or counteract these defaults your own function
|
||||
;; to prelude-prog-mode-hook, using:
|
||||
;;
|
||||
;; (add-hook 'prelude-prog-mode-hook 'my-prog-mode-defaults t)
|
||||
;;
|
||||
;; (the final optional t sets the *append* argument)
|
||||
|
||||
(defun prelude-prog-mode-defaults ()
|
||||
"Default coding hook, useful with any programming language."
|
||||
(flyspell-prog-mode)
|
||||
(prelude-local-comment-auto-fill)
|
||||
(prelude-turn-on-whitespace)
|
||||
(prelude-turn-on-abbrev)
|
||||
(prelude-add-watchwords)
|
||||
;; keep the whitespace decent all the time (in this buffer)
|
||||
(add-hook 'before-save-hook 'whitespace-cleanup nil t))
|
||||
|
||||
(setq prelude-prog-mode-hook 'prelude-prog-mode-defaults)
|
||||
|
||||
(add-hook 'prog-mode-hook (lambda () (run-hooks 'prelude-prog-mode-hook)))
|
||||
|
||||
(provide 'prelude-programming)
|
||||
;;; prelude-programming.el ends here
|
|
@ -1,48 +0,0 @@
|
|||
;;; prelude-python.el --- Emacs Prelude: python.el configuration.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Some basic configuration for python.el (the latest and greatest
|
||||
;; Python mode Emacs has to offer).
|
||||
|
||||
;;; 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 'python)
|
||||
|
||||
(defun prelude-python-mode-defaults ()
|
||||
(run-hooks 'prelude-prog-mode-hook) ;; run manually; not derived from prog-mode
|
||||
(electric-indent-mode -1))
|
||||
|
||||
(setq prelude-python-mode-hook 'prelude-python-mode-defaults)
|
||||
|
||||
(add-hook 'python-mode-hook (lambda () (run-hooks 'prelude-python-mode-hook)))
|
||||
|
||||
(provide 'prelude-python)
|
||||
|
||||
;;; prelude-python.el ends here
|
|
@ -1,69 +0,0 @@
|
|||
;;; prelude-ruby.el --- Emacs Prelude: A nice setup for Ruby (and Rails) devs.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Some basic configuration for Ruby and Rails development.
|
||||
|
||||
;;; 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:
|
||||
|
||||
;; Rake files are ruby, too, as are gemspecs, rackup files, and gemfiles.
|
||||
(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
|
||||
(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.gemspec$" . ruby-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.ru$" . ruby-mode))
|
||||
(add-to-list 'auto-mode-alist '("Gemfile$" . ruby-mode))
|
||||
(add-to-list 'auto-mode-alist '("Guardfile$" . ruby-mode))
|
||||
|
||||
;; We never want to edit Rubinius bytecode
|
||||
(add-to-list 'completion-ignored-extensions ".rbc")
|
||||
|
||||
(autoload 'run-ruby "inf-ruby"
|
||||
"Run an inferior Ruby process")
|
||||
(autoload 'inf-ruby-keys "inf-ruby"
|
||||
"Set local key defs for inf-ruby in ruby-mode")
|
||||
(autoload 'ruby-block-mode "ruby-block")
|
||||
(require 'ruby-end)
|
||||
|
||||
(eval-after-load 'ruby-mode
|
||||
'(progn
|
||||
(defun prelude-ruby-mode-defaults ()
|
||||
(inf-ruby-setup-keybindings)
|
||||
;; turn off the annoying input echo in irb
|
||||
(setq comint-process-echoes t)
|
||||
(ruby-block-mode t)
|
||||
;; bind yari in the local keymap
|
||||
(local-set-key (kbd "C-h r") 'yari))
|
||||
|
||||
(setq prelude-ruby-mode-hook 'prelude-ruby-mode-defaults)
|
||||
|
||||
(add-hook 'ruby-mode-hook (lambda ()
|
||||
(run-hooks 'prelude-ruby-mode-hook)))))
|
||||
(provide 'prelude-ruby)
|
||||
|
||||
;;; prelude-ruby.el ends here
|
|
@ -1,39 +0,0 @@
|
|||
;;; prelude-scheme.el --- Emacs Prelude: Some defaults for Scheme.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Some basic configuration for Scheme programming.
|
||||
|
||||
;;; 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:
|
||||
|
||||
(add-hook 'scheme-mode-hook (lambda () (run-hooks 'prelude-lisp-coding-hook)))
|
||||
|
||||
(provide 'prelude-scheme)
|
||||
|
||||
;;; prelude-scheme.el ends here
|
|
@ -1,12 +0,0 @@
|
|||
(require 'prelude-css)
|
||||
|
||||
(defun prelude-scss-mode-defaults ()
|
||||
(prelude-css-mode-hook)
|
||||
;; turn off annoying auto-compile on save
|
||||
(setq scss-compile-at-save nil))
|
||||
|
||||
(setq prelude-scss-mode-hook 'prelude-scss-mode-defaults)
|
||||
|
||||
(add-hook 'scss-mode-hook (lambda () (run-hooks 'prelude-scss-mode-hook)))
|
||||
|
||||
(provide 'prelude-scss)
|
|
@ -1,48 +0,0 @@
|
|||
;;; prelude-xml.el --- Emacs Prelude: XML editing configuration.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Some basic nxml-mode configuration.
|
||||
|
||||
;;; 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:
|
||||
|
||||
(push '("<\\?xml" . nxml-mode) magic-mode-alist)
|
||||
|
||||
;; pom files should be treated as xml files
|
||||
(add-to-list 'auto-mode-alist '("\\.pom$" . nxml-mode))
|
||||
|
||||
(setq nxml-child-indent 4)
|
||||
(setq nxml-attribute-indent 4)
|
||||
(setq nxml-auto-insert-xml-declaration-flag nil)
|
||||
(setq nxml-bind-meta-tab-to-complete-flag t)
|
||||
(setq nxml-slash-auto-complete-flag t)
|
||||
|
||||
(provide 'prelude-xml)
|
||||
|
||||
;;; prelude-xml.el ends here
|
|
@ -1,4 +0,0 @@
|
|||
;; yaml-mode
|
||||
(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
|
||||
|
||||
(provide 'prelude-yaml)
|
|
@ -1,9 +1,9 @@
|
|||
;;; prelude-core.el --- Emacs Prelude: core Prelude defuns.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;; Copyright (c) 2011-2012 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Author: Bozhidar Batsov <bozhidar@batsov.com>
|
||||
;; URL: http://batsov.com/emacs-prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
;;; prelude-editor.el --- Emacs Prelude: enhanced core editing experience.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;; Copyright (c) 2011-2012 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Author: Bozhidar Batsov <bozhidar@batsov.com>
|
||||
;; URL: http://batsov.com/emacs-prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
|
@ -37,12 +37,6 @@
|
|||
"Emacs Prelude Editor enhancements"
|
||||
:group 'prelude)
|
||||
|
||||
;; Emacs users obviously have little need for Command and Option keys,
|
||||
;; but they do need Meta and Super
|
||||
(when (eq system-type 'darwin)
|
||||
(setq mac-command-modifier 'super)
|
||||
(setq mac-option-modifier 'meta))
|
||||
|
||||
;; Death to the tabs! However, tabs historically indent to the next
|
||||
;; 8-character offset; specifying anything else will cause *mass*
|
||||
;; confusion, as it will change the appearance of every existing file.
|
|
@ -1,9 +1,9 @@
|
|||
;;; prelude-mode.el --- Emacs Prelude: minor mode
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;; Copyright (c) 2011-2012 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Author: Bozhidar Batsov <bozhidar@batsov.com>
|
||||
;; URL: http://batsov.com/emacs-prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
9
prelude/prelude-osx.el
Normal file
9
prelude/prelude-osx.el
Normal file
|
@ -0,0 +1,9 @@
|
|||
;; On OS X Emacs doesn't use the shell PATH if it's not started from
|
||||
;; the shell. If you're using homebrew modifying the PATH is essential.
|
||||
(push "/usr/local/bin" exec-path)
|
||||
|
||||
;; Emacs users obviously have little need for Command and Option keys,
|
||||
;; but they do need Meta and Super
|
||||
(setq mac-command-modifier 'super)
|
||||
(setq mac-option-modifier 'meta)
|
||||
(provide 'prelude-osx)
|
|
@ -1,9 +1,9 @@
|
|||
;;; prelude-packages.el --- Emacs Prelude: default package selection.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;; Copyright (c) 2011-2012 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Author: Bozhidar Batsov <bozhidar@batsov.com>
|
||||
;; URL: http://batsov.com/emacs-prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
|
@ -42,11 +42,8 @@
|
|||
(setq url-http-attempt-keepalives nil)
|
||||
|
||||
(defvar prelude-packages
|
||||
'(ack-and-a-half auctex clojure-mode coffee-mode deft expand-region
|
||||
gist groovy-mode haml-mode haskell-mode helm helm-projectile inf-ruby
|
||||
magit magithub markdown-mode mediawiki paredit projectile
|
||||
python sass-mode rainbow-mode scss-mode solarized-theme
|
||||
volatile-highlights yaml-mode yari yasnippet zenburn-theme)
|
||||
'(expand-region gist helm helm-projectile magit magithub
|
||||
rainbow-mode volatile-highlights yasnippet zenburn-theme)
|
||||
"A list of packages to ensure are installed at launch.")
|
||||
|
||||
(defun prelude-packages-installed-p ()
|
|
@ -1,9 +1,9 @@
|
|||
;;; prelude-ui.el --- Emacs Prelude: UI optimizations and tweaks.
|
||||
;;
|
||||
;; Copyright (c) 2011 Bozhidar Batsov
|
||||
;; Copyright (c) 2011-2012 Bozhidar Batsov
|
||||
;;
|
||||
;; Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
|
||||
;; URL: http://www.emacswiki.org/cgi-bin/wiki/Prelude
|
||||
;; Author: Bozhidar Batsov <bozhidar@batsov.com>
|
||||
;; URL: http://batsov.com/emacs-prelude
|
||||
;; Version: 1.0.0
|
||||
;; Keywords: convenience
|
||||
|
||||
|
@ -85,9 +85,6 @@
|
|||
(abbreviate-file-name (buffer-file-name))
|
||||
"%b"))))
|
||||
|
||||
;; custom Emacs 24 color themes support
|
||||
(add-to-list 'custom-theme-load-path (concat prelude-dir "themes/"))
|
||||
|
||||
;; use zenburn as the default theme
|
||||
(load-theme 'zenburn t)
|
||||
|
Loading…
Reference in a new issue