Commits

Adam Gomaa committed 4dc7d77

kill prep: update emacs configs

Comments (0)

Files changed (7)

 
 (add-to-list 'load-path "~/.emacs.d")
 (add-to-list 'load-path "~/.emacs.d/modes")
-(require 'ag-commands)
-(require 'ag-faces)
-(require 'ag-functions)
-(require 'ag-keybinds)
-(require 'ag-modes)
-;(require 'ag-pymacs)
-(require 'ag-settings)
-(require 'ag-org)
-(require 'ag-ui)
-
-;; Any startup things (server-start), etc.
-(require 'ag-startup)
+; single entry point
+(require 'ag-init)
 
 
 

.emacs.d/ag-custom.el

 (custom-set-variables
-  ;; custom-set-variables was added by Custom.
-  ;; If you edit it by hand, you could mess it up, so be careful.
-  ;; Your init file should contain only one such instance.
-  ;; If there is more than one, they won't work right.
+ ;; custom-set-variables was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(align-rules-list (quote ((lisp-second-arg (regexp . "\\(^\\s-+[^( 	
+]\\|(\\(\\S-+\\)\\s-+\\)\\S-+\\(\\s-+\\)") (group . 3) (modes . align-lisp-modes) (run-if lambda nil current-prefix-arg)) (lisp-alist-dot (regexp . "\\(\\s-*\\)\\.\\(\\s-*\\)") (group 1 2) (modes . align-lisp-modes)) (open-comment (regexp lambda (end reverse) (funcall (if reverse (quote re-search-backward) (quote re-search-forward)) (concat "[^ 	
+\\\\]" (regexp-quote comment-start) "\\(.+\\)$") end t)) (modes . align-open-comment-modes)) (c-macro-definition (regexp . "^\\s-*#\\s-*define\\s-+\\S-+\\(\\s-+\\)") (modes . align-c++-modes)) (c-variable-declaration (regexp . "[*&0-9A-Za-z_]>?[&*]*\\(\\s-+[*&]*\\)[A-Za-z_][0-9A-Za-z:_]*\\s-*\\(\\()\\|=[^=
+].*\\|(.*)\\|\\(\\[.*\\]\\)*\\)?\\s-*[;,]\\|)\\s-*$\\)") (group . 1) (modes . align-c++-modes) (justify . t) (valid lambda nil (not (or (save-excursion (goto-char (match-beginning 1)) (backward-word 1) (looking-at "\\(goto\\|return\\|new\\|delete\\|throw\\)")) (if (and (boundp (quote font-lock-mode)) font-lock-mode) (eq (get-text-property (point) (quote face)) (quote font-lock-comment-face)) (eq (caar (c-guess-basic-syntax)) (quote c))))))) (c-assignment (regexp . "[^-=!^&*+<>/| 	
+]\\(\\s-*[-=!^&*+<>/|]*\\)=\\(\\s-*\\)\\([^= 	
+]\\|$\\)") (group 1 2) (modes . align-c++-modes) (justify . t) (tab-stop)) (perl-assignment (regexp . "[^=!^&*-+<>/| 	
+]\\(\\s-*\\)=[~>]?\\(\\s-*\\)\\([^>= 	
+]\\|$\\)") (group 1 2) (modes . align-perl-modes) (tab-stop)) (python-assignment (regexp . "[^=!<> 	
+]\\(\\s-*\\)=\\(\\s-*\\)\\([^>= 	
+]\\|$\\)") (group 1 2) (modes quote (python-mode)) (tab-stop)) (make-assignment (regexp . "^\\s-*\\w+\\(\\s-*\\):?=\\(\\s-*\\)\\([^	
+ \\\\]\\|$\\)") (group 1 2) (modes quote (makefile-mode)) (tab-stop)) (c-comma-delimiter (regexp . ",\\(\\s-*\\)[^/ 	
+]") (repeat . t) (modes . align-c++-modes) (run-if lambda nil current-prefix-arg)) (basic-comma-delimiter (regexp . ",\\(\\s-*\\)[^# 	
+]") (repeat . t) (modes append align-perl-modes (quote (python-mode))) (run-if lambda nil current-prefix-arg)) (c++-comment (regexp . "\\(\\s-*\\)\\(//.*\\|/\\*.*\\*/\\s-*\\)$") (modes . align-c++-modes) (column . comment-column) (valid lambda nil (save-excursion (goto-char (match-beginning 1)) (not (bolp))))) (c-chain-logic (regexp . "\\(\\s-*\\)\\(&&\\|||\\|\\<and\\>\\|\\<or\\>\\)") (modes . align-c++-modes) (valid lambda nil (save-excursion (goto-char (match-end 2)) (looking-at "\\s-*\\(/[*/]\\|$\\)")))) (perl-chain-logic (regexp . "\\(\\s-*\\)\\(&&\\|||\\|\\<and\\>\\|\\<or\\>\\)") (modes . align-perl-modes) (valid lambda nil (save-excursion (goto-char (match-end 2)) (looking-at "\\s-*\\(#\\|$\\)")))) (python-chain-logic (regexp . "\\(\\s-*\\)\\(\\<and\\>\\|\\<or\\>\\)") (modes quote (python-mode)) (valid lambda nil (save-excursion (goto-char (match-end 2)) (looking-at "\\s-*\\(#\\|$\\|\\\\\\)")))) (c-macro-line-continuation (regexp . "\\(\\s-*\\)\\\\$") (modes . align-c++-modes) (column . c-backslash-column)) (basic-line-continuation (regexp . "\\(\\s-*\\)\\\\$") (modes quote (python-mode makefile-mode))) (tex-record-separator (regexp lambda (end reverse) (align-match-tex-pattern "&" end reverse)) (group 1 2) (modes . align-tex-modes) (repeat . t)) (tex-tabbing-separator (regexp lambda (end reverse) (align-match-tex-pattern "\\\\[=>]" end reverse)) (group 1 2) (modes . align-tex-modes) (repeat . t) (run-if lambda nil (eq major-mode (quote latex-mode)))) (tex-record-break (regexp . "\\(\\s-*\\)\\\\\\\\") (modes . align-tex-modes)) (text-column (regexp . "\\(^\\|\\S-\\)\\([ 	]+\\)\\(\\S-\\|$\\)") (group . 2) (modes . align-text-modes) (repeat . t) (run-if lambda nil (and current-prefix-arg (not (eq (quote -) current-prefix-arg))))) (text-dollar-figure (regexp . "\\$?\\(\\s-+[0-9]+\\)\\.") (modes . align-text-modes) (justify . t) (run-if lambda nil (eq (quote -) current-prefix-arg))) (css-declaration (regexp . "^\\s-*\\w+:\\(\\s-*\\).*;") (group 1) (modes quote (css-mode html-mode))) (python-import-from (regexp . "from") (modes quote (python-mode))) (python-import (regexp . "import") (modes quote (python-mode))))) nil nil "Added python import alignment")
+ '(auto-revert-interval 2)
  '(auto-save-default nil)
  '(auto-save-list-file-prefix "~/var/tmp/emacs/auto-save-list/saves-")
  '(backup-directory-alist (quote (("." . "~/var/tmp/emacs/backups/"))))
  '(blink-cursor-mode nil)
+ '(bs-max-window-height 128)
+ '(css-indent-offset 2)
  '(desktop-base-file-name "emacs.desktop")
  '(desktop-base-lock-name "emacs.desktop.lock")
  '(desktop-load-locked-desktop t)
  '(desktop-save t)
  '(desktop-save-mode t)
  '(enable-local-variables :safe)
- '(espresso-indent-level 2)
+ '(find-directory-functions (quote (dired-noselect)))
+ '(find-file-visit-truename t)
  '(flyspell-auto-correct-binding nil)
  '(frame-background-mode nil)
  '(global-auto-revert-mode nil)
+ '(js-enabled-frameworks (quote (javascript prototype)))
+ '(js-expr-indent-offset 2)
+ '(js-indent-level 4)
  '(js2-highlight-level 3)
  '(js2-indent-on-enter-key t)
+ '(large-file-warning-threshold 1000000)
  '(make-backup-files nil)
  '(mode-line-inverse-video t)
+ '(revert-without-query nil)
  '(temporary-file-directory "~/var/tmp/emacs/")
+ '(vc-handled-backends (quote (Git Hg)))
  '(which-function-mode t)
  '(x-stretch-cursor t))
 (custom-set-faces
-  ;; custom-set-faces was added by Custom.
-  ;; If you edit it by hand, you could mess it up, so be careful.
-  ;; Your init file should contain only one such instance.
-  ;; If there is more than one, they won't work right.
+ ;; custom-set-faces was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
  '(default ((t (:inherit nil :stipple nil :background "black" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 110 :width normal :foundry "unknown" :family "DejaVu Sans Mono"))))
  '(highlight-80+ ((t (:background "dark blue"))))
  '(ido-first-match ((t (:underline t))))

.emacs.d/ag-functions.el

-
+;; TODO: unused?
 (defun kill-whole-line ()
   (interactive)
   (move-beginning-of-line 1)
   )
 
 
+;; TODO: annoying, get rid of it.
 (defun diff-buffer-with-associated-file ()
   "View the differences between BUFFER and its associated file.
 This requires the external program \"diff\" to be in your `exec-path'. 

.emacs.d/ag-init.el

+;; should probably be inlined. Actually, true for a lot of these.
+(require 'ag-commands)
+;; not sure how this interacts with .Xresources
+(require 'ag-faces)
+(require 'ag-functions)
+(require 'ag-keybinds)
+(require 'ag-modes)
+;(require 'ag-pymacs)
+(require 'ag-settings)
+;; later...
+;(require 'ag-org)
+(require 'ag-ui)
+
+;; Any startup things (server-start), etc.
+(require 'ag-startup)
+
+(provide 'ag-init)

.emacs.d/ag-keybinds.el

 (global-set-key (kbd "M-k") 'kill-whole-line)
 (global-set-key (kbd "M-j") 'join-line)
 (global-set-key (kbd "C-x k") 'de-context-kill)
-(global-set-key (kbd "C-x C-b") 'my-list-buffers)
-(global-set-key (kbd "M-s") 'search-forward-regexp)
-(global-set-key (kbd "M-r") 'search-backward-regexp)
+(global-set-key (kbd "C-x C-b") 'ibuffer)
+(global-set-key (kbd "M-s") 'isearch-forward-regexp)
+(global-set-key (kbd "M-r") 'isearch-backward-regexp)
 (global-set-key (kbd "M-n") 'scroll-up)
 (global-set-key (kbd "M-p") 'scroll-down)
 (global-set-key (kbd "M-h") 'zap-to-char)

.emacs.d/ag-modes.el

-(autoload 'espresso-mode "espresso" "Start espresso-mode" t)
+;(autoload 'espresso-mode "espresso" "Start espresso-mode" t)
 (autoload 'markdown-mode "markdown-mode" nil t)
 (autoload 'lua-mode "lua-mode" "Lua editing mode." t)
+(autoload 'less-css-mode "less-css-mode" "LESS css mode" t)
 (autoload 'apache-mode "apache-mode" nil t)
 
 
 (add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
 (add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
 (add-to-list 'auto-mode-alist '("\\.wsgi\\'" . python-mode))
-(add-to-list 'auto-mode-alist '("\\.js$" . espresso-mode))
-(add-to-list 'auto-mode-alist '("\\.json$" . espresso-mode))
+;(add-to-list 'auto-mode-alist '("\\.js$" . espresso-mode))
+;(add-to-list 'auto-mode-alist '("\\.json$" . espresso-mode))
 (add-to-list 'auto-mode-alist '("\\.mdml\\'" . markdown-mode))
 (add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode))
 (add-to-list 'auto-mode-alist '("\\.cs\\'" . java-mode))

.emacs.d/ag-settings.el

+;; TODO: do most (all?) of these through custom.
 (setq auto-save-timeout 5)
 (setq autosave-dir )
 (setq find-function-C-source-directory "~/var/srv/bzr.savannah.gnu.org/emacs/src")
 (setq-default show-trailing-whitespace t)
 
 
+;; TODO: do this in custom.
+
 ;; http://metapundit.net/sections/blog/239
 ;; http://curiousprogrammer.wordpress.com/2009/04/28/emacs-hacks/
 ;; http://trey-jackson.blogspot.com/2008/01/emacs-tip-11-uniquify.html
 ;; Disable vc-mode entirely, greatly speeds up startup. I dont use
 ;; vc-mode, and AFAICT it spawns a VCS tool once per file, which is
 ;; kind of a drag with 1500 buffers in my desktop file.
-(setq vc-handled-backends nil)
+;(setq vc-handled-backends nil)
 
 
 ;; enable upcase/downcase-region