From d9cae60fa5048abd3528f96a285109329639fda6 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 23 Jan 2015 23:23:05 -0500 Subject: Improve organization and consistency of files - Add pages and more headings for large files. - Try to use consistent order for file (or page) structure. * Loading * Settings * Hooks * Any mode activation or function calls * My functions * Key bindings --- lisp/init-general.el | 58 ++++++++++++++++++++++++---------------------------- 1 file changed, 27 insertions(+), 31 deletions(-) (limited to 'lisp/init-general.el') diff --git a/lisp/init-general.el b/lisp/init-general.el index adc9df3..f6606a6 100644 --- a/lisp/init-general.el +++ b/lisp/init-general.el @@ -1,27 +1,18 @@ + (setq echo-keystrokes 0.1 use-dialog-box nil visible-bell t - tramp-default-method "ssh" enable-recursive-minibuffers t) +(setq tramp-default-method "ssh") + (setq-default indicate-empty-lines t indent-tabs-mode nil) -(show-paren-mode t) - -(defalias 'yes-or-no-p 'y-or-n-p) - -;; Set location of custom.el. (setq custom-file "~/.emacs.d/custom.el") (load custom-file) -(global-auto-revert-mode t) - -;; Make scripts executable at save. -(add-hook 'after-save-hook - 'executable-make-buffer-file-executable-if-script-p) - -(transient-mark-mode -1) +(defalias 'yes-or-no-p 'y-or-n-p) (put 'narrow-to-region 'disabled nil) (put 'narrow-to-page 'disabled nil) @@ -29,23 +20,13 @@ (put 'downcase-region 'disabled nil) (put 'upcase-region 'disabled nil) -(key-chord-mode 1) - -(global-set-key (kbd "C-h :") 'find-function) - -;; This is also bound to 'm', but I always want to press 'j' because -;; binding for `imenu' and `org-goto'. -(define-key Info-mode-map "j" 'Info-menu) - -;; Disable `suspend-frame' binding. -(global-unset-key (kbd "C-x C-z")) - -;; Avoid shift key for `backward-paragraph' and `forward-paragraph'. -(global-unset-key (kbd "M-}")) -(global-set-key (kbd "M-]") 'forward-paragraph) -(global-unset-key (kbd "M-{")) -(global-set-key (kbd "M-[") 'backward-paragraph) +(add-hook 'after-save-hook + 'executable-make-buffer-file-executable-if-script-p) +(show-paren-mode) +(global-auto-revert-mode) +(transient-mark-mode -1) +(key-chord-mode 1) (defun km/imenu (rescan) "Call `imenu', rescanning if RESCAN is non-nil." @@ -58,8 +39,6 @@ (setq imenu--index-alist nil)) (call-interactively #'imenu)) -(global-set-key (kbd "C-c j") 'km/imenu) - ;; Taken from ;; http://milkbox.net/note/single-file-master-emacs-configuration/. (defmacro after (mode &rest body) @@ -68,6 +47,23 @@ `(eval-after-load ,mode '(progn ,@body))) +(global-set-key (kbd "C-h :") 'find-function) + +(global-set-key (kbd "C-c j") 'km/imenu) + +;; Disable `suspend-frame' binding. +(global-unset-key (kbd "C-x C-z")) + +;; Avoid shift key for `backward-paragraph' and `forward-paragraph'. +(global-unset-key (kbd "M-}")) +(global-set-key (kbd "M-]") 'forward-paragraph) +(global-unset-key (kbd "M-{")) +(global-set-key (kbd "M-[") 'backward-paragraph) + +;; This is also bound to 'm', but I always want to press 'j' because +;; binding for `imenu' and `org-goto'. +(define-key Info-mode-map "j" 'Info-menu) + (define-key occur-mode-map "n" 'next-line) (define-key occur-mode-map "p" 'previous-line) -- cgit v1.2.3