a few fixes

This commit is contained in:
Bozhidar Batsov 2012-04-17 17:47:05 +03:00
parent d2364f00c9
commit 78c21a9b6f
6 changed files with 108 additions and 31 deletions

6
.gitmodules vendored
View file

@ -1,6 +0,0 @@
[submodule "personal"]
path = personal
url = https://github.com/bbatsov/emacs-prelude-personal.git
[submodule "vendor/feature-mode"]
path = vendor/feature-mode
url = https://github.com/michaelklishin/cucumber.el

@ -1 +0,0 @@
Subproject commit 4cd18b27f5bf165b14564f87c4a19633bae1e8c5

View file

@ -45,9 +45,6 @@ Emacs load path."
(not (equal f ".")))
(add-to-list 'load-path name)))))
;; add the first level subfolders of vendor automatically
(prelude-add-subfolders-to-load-path prelude-vendor-dir)
(defun prelude-open-with ()
"Simple function that allows us to open the underlying
file of a buffer in an external program."
@ -275,22 +272,7 @@ there's a region, all lines that region covers will be duplicated."
(defun prelude-recompile-init ()
"Byte-compile all your dotfiles again."
(interactive)
(byte-recompile-directory prelude-dir 0)
(byte-recompile-directory prelude-vendor-dir 0))
(defun prelude-regen-autoloads (&optional force-regen)
"Regenerate the autoload definitions file if necessary and load it."
(interactive "P")
(let ((autoload-dir prelude-vendor-dir)
(generated-autoload-file autoload-file))
(when (or force-regen
(not (file-exists-p autoload-file))
(some (lambda (f) (file-newer-than-file-p f autoload-file))
(directory-files autoload-dir t "\\.el$")))
(message "Updating autoloads...")
(let (emacs-lisp-mode-hook)
(update-directory-autoloads autoload-dir))))
(load autoload-file))
(byte-recompile-directory prelude-dir 0))
(defun prelude-sudo-edit (&optional arg)
(interactive "p")

View file

@ -197,8 +197,6 @@
;; load yasnippet
(require 'yasnippet)
(add-to-list 'yas/snippet-dirs prelude-snippets-dir)
(add-to-list 'yas/snippet-dirs prelude-personal-snippets-dir)
(yas/global-mode 1)
;; projectile is a project management mode

View file

@ -0,0 +1,105 @@
;;; prelude-global-keybindings.el --- Emacs Prelude: some useful keybindings.
;;
;; Copyright (c) 2011-2012 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <bozhidar@batsov.com>
;; URL: http://batsov.com/emacs-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

View file

@ -32,9 +32,8 @@
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'cl)
(require 'package)
(require 'melpa)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
@ -42,7 +41,7 @@
(setq url-http-attempt-keepalives nil)
(defvar prelude-packages
'(expand-region gist helm helm-projectile magit magithub
'(melpa 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.")