Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Lots of reorganization

  • Loading branch information...
commit cff9e2ee25daad6aa1116b2c66959c05c3d71fa3 1 parent 1eb8b49
@jwiegley authored
Showing with 2,815 additions and 4,384 deletions.
  1. +26 −25 .gitignore
  2. +10 −16 Makefile
  3. +569 −493 emacs.el
  4. +36 −10 init.el
  5. 0  {site-lisp → lib}/xml-rpc.el
  6. +45 −0 lisp/misc.el
  7. +12 −5 load-path.el
  8. +27 −15 settings.el
  9. +0 −228 site-lisp/all.el
  10. +0 −1  site-lisp/auto-complete-clang
  11. +1 −1  site-lisp/backup-each-save.el
  12. 0  site-lisp/{lisp → }/cldoc.el
  13. 0  site-lisp/{drewadams → }/col-highlight.el
  14. +0 −245 site-lisp/column-marker.el
  15. 0  site-lisp/{drewadams → }/crosshairs.el
  16. 0  site-lisp/{drewadams → }/cursor-chg.el
  17. 0  site-lisp/{drewadams → }/diff-mode-.el
  18. +0 −485 site-lisp/diredful.el
  19. +0 −613 site-lisp/drewadams/compile+.el
  20. +0 −140 site-lisp/drewadams/compile-.el
  21. +0 −466 site-lisp/drewadams/grep+.el
  22. +0 −399 site-lisp/drewadams/imenu+.el
  23. 0  site-lisp/{lisp → }/eval-expr.el
  24. 0  site-lisp/{lisp → }/fdb.el
  25. 0  site-lisp/{lisp → }/find-library.el
  26. +0 −802 site-lisp/fit-frame.el
  27. +0 −1  site-lisp/flymake-ruby
  28. +0 −426 site-lisp/git-blame.el
  29. 0  site-lisp/{lisp → }/highlight-parentheses.el
  30. 0  site-lisp/{drewadams → }/hl-line+.el
  31. +11 −11 site-lisp/indirect.el
  32. 0  site-lisp/{drewadams → }/info+.el
  33. +12 −0 site-lisp/lusty-explorer.el
  34. +0 −1  site-lisp/org-mac-protocol
  35. 0  site-lisp/{lisp → }/paredit.el
  36. 0  site-lisp/{lisp → }/parenface.el
  37. 0  site-lisp/{lisp → }/redshank.el
  38. +0 −1  site-lisp/ruby-tools
  39. 0  site-lisp/{drewadams → }/vline.el
  40. 0  site-lisp/{lisp → }/xray.el
  41. 0  {site-lisp → unused}/csv-mode.el
  42. +493 −0 unused/dircmp.el
  43. 0  {site-lisp → unused}/grep-ed.el
  44. 0  {site-lisp → unused}/hide-region.el
  45. 0  {site-lisp → unused}/hide-search.el
  46. 0  {site-lisp → unused}/hs-lint.el
  47. 0  {site-lisp → unused}/modeline-posn.el
  48. 0  {site-lisp → unused}/po-mode.el
  49. 0  {site-lisp → unused}/rs-info.el
  50. 0  {site-lisp → unused}/vkill.el
  51. 0  {site-lisp → unused}/w3m-type-ahead.el
  52. 0  {site-lisp → unused}/wcount.el
  53. +1,573 −0 unused/weblogger.el
  54. 0  {site-lisp → unused}/wtf.el
  55. 0  {site-lisp → unused}/yaoddmuse.el
View
51 .gitignore
@@ -1,27 +1,28 @@
*.elc
*~
-/.ercpass
-/.passwd
-/archive/
-/autoloads.el
-/backups/
-/cus-dirs.el
-/data/
-/devel
-/devel/
-/doc/
-/eshell/
-/index/
-/info/
-/mirror
-/mirror/
-/nnmaildir.el
-/override/cc-mode/
-/reference/
-/site-lisp/cedet/
-/site-lisp/ecb/
-/src
-/src/
-/upstream/
-/url/
-/yaoddmuse/
+.ercpass
+.passwd
+archive/
+autoloads.el
+backups/
+cus-dirs.el
+data/
+devel
+devel/
+doc/
+eshell/
+index/
+info/
+mirror
+mirror/
+nnmaildir.el
+override/cc-mode/
+reference/
+site-lisp/cedet/
+site-lisp/ecb/
+src
+src/
+upstream/
+url/
+var/
+yaoddmuse/
View
26 Makefile
@@ -1,16 +1,17 @@
### -*- mode: makefile-gmake -*-
-DIRS = lisp site-lisp override
+DIRS = lisp lib site-lisp unused override
SPECIAL = autoloads.el cus-dirs.el
-ORGSRC = $(patsubst %.org,%.el,$(wildcard *.org))
-SOURCE = $(filter-out $(SPECIAL),$(wildcard *.el) $(wildcard site-lisp/*.el))
+SOURCE = $(filter-out $(SPECIAL),$(wildcard *.el) \
+ $(wildcard lib/*.el) $(wildcard site-lisp/*.el) \
+ $(wildcard unused/*.el))
TARGET = $(patsubst %.el,%.elc,autoloads.el $(SOURCE))
EMACS = emacs
EMACS_BATCH = $(EMACS) --no-init-file --no-site-file -batch
MY_LOADPATH = -L . $(patsubst %,-L %,$(DIRS))
BATCH_LOAD = $(EMACS_BATCH) $(MY_LOADPATH)
-all: load-path.elc autoloads.el autoloads.elc cus-dirs.el $(ORGSRC) $(TARGET)
+all: load-path.elc autoloads.el autoloads.elc cus-dirs.el $(TARGET)
for dir in $(DIRS); do \
$(BATCH_LOAD) -f batch-byte-recompile-directory $$dir; \
done
@@ -26,29 +27,22 @@ autoloads.el: Makefile autoloads.in $(SOURCE)
-f generate-autoloads $(shell pwd)/autoloads.el $(DIRS) \
$(shell find $(DIRS) -maxdepth 1 -type d -print)
-%.el: %.org
- $(BATCH_LOAD) -l load-path -l override/org-mode/lisp/ob-tangle \
- --eval '(org-babel-load-file "$<")'
-
-load-path.elc: load-path.el
- $(BATCH_LOAD) -f batch-byte-compile $<
-
-emacs.elc: emacs.el
- $(BATCH_LOAD) -l load-path -f batch-byte-compile $<
-
cus-dirs.elc: cus-dirs.el
@echo Not compiling cus-dirs.el
settings.elc: settings.el
@echo Not compiling settings.el
+load-path.elc: load-path.el
+ $(BATCH_LOAD) -f batch-byte-compile $<
+
%.elc: %.el
$(BATCH_LOAD) -l load-path -f batch-byte-compile $<
clean:
- rm -f autoloads.el* cus-dirs.el $(ORGSRC) *.elc
+ rm -f autoloads.el* cus-dirs.el *.elc
fullclean: clean
- rm -f *.elc site-lisp/*.elc
+ find . -name '*.elc' -type f -delete
### Makefile ends here
View
1,062 emacs.el
@@ -1,21 +1,23 @@
-;;; emacs.el
+;;;_. Initialization -*- allout-layout: (-1 :) -*-
(defvar using-textexpander nil)
-;;;_. Initialization
-
;;;_ , Create my own global minor-mode, to hold key remappings
+(require 'easy-mmode)
+
(defvar override-global-map (make-keymap)
"override-global-mode keymap")
-(require 'easy-mmode)
-
(define-minor-mode override-global-mode
"A minor mode so my key settings override all other modes."
t "" override-global-map)
-;;;_ , Increase *Message* log max
+(add-hook 'after-init-hook
+ (lambda ()
+ (override-global-mode 1)))
+
+;;;_ , Increase *Messages* max length
(setq message-log-max 16384)
@@ -39,7 +41,7 @@
;;;_ , Load customizations
-(setq gnus-home-directory "~/Messages/Gnus/") ; necessary override
+(setq gnus-home-directory "~/Messages/Gnus/") ; a necessary override
(load "~/.emacs.d/settings")
@@ -62,15 +64,12 @@
'(browse-kill-ring+
bookmark
diminish
- edit-server
ido
info-look
- modeline-posn
page-ext
per-window-point
pp-c-l
recentf
- session
tex-site
workgroups
yasnippet))
@@ -79,28 +78,51 @@
;;;_ , Drew Adams
+;;;_ . bookmark+
+
(eval-after-load "bookmark"
'(require 'bookmark+))
+;;;_ . diff-mode-
+
(require 'diff-mode-)
+;;;_ . hl-line+
+
(eval-after-load "hl-line"
'(require 'hl-line+))
+;;;_ . info+
+
(eval-after-load "info"
'(progn
(require 'info+)))
-;;;_ , abbrev/expand
+;;;_ , abbrev
(if (file-exists-p abbrev-file-name)
(quietly-read-abbrev-file))
+(ignore-errors (diminish 'abbrev-mode))
+
+;;;_ . expand
+
(add-hook 'expand-load-hook
(lambda ()
(add-hook 'expand-expand-hook 'indent-according-to-mode)
(add-hook 'expand-jump-hook 'indent-according-to-mode)))
+;;;_ , ace-jump-mode
+
+(use-package ace-jump-mode
+ :commands ace-jump-mode
+ :init
+ (progn
+ (define-key global-map [(control ?.)] 'ace-jump-mode)
+ (define-key override-global-map [(control ?.)] 'ace-jump-mode)
+ (eval-after-load "flyspell"
+ '(define-key flyspell-mode-map [(control ?.)] 'ace-jump-mode))))
+
;;;_ , allout
(defvar allout-unprefixed-keybindings nil)
@@ -160,10 +182,25 @@
(require 'anything-match-plugin)
(define-key anything-map "." 'anything-select-with-prefix-shortcut)
-
(if using-textexpander
(define-key anything-map [(alt ?v)] 'anything-previous-page))))
+(defun my-anything-apropos ()
+ (interactive)
+ (require 'anything-config)
+ (anything
+ :prompt "Info about: "
+ :candidate-number-limit 5
+ :sources '(anything-c-source-emacs-commands
+ anything-c-source-emacs-functions
+ anything-c-source-emacs-variables
+ anything-c-source-info-emacs
+ anything-c-source-info-elisp
+ anything-c-source-info-gnus
+ anything-c-source-info-org
+ anything-c-source-info-cl
+ anything-c-source-emacs-source-defun)))
+
;;;_ , auctex
(eval-when-compile
@@ -238,23 +275,47 @@
(add-hook 'after-save-hook 'backup-each-save)
(defun backup-each-save-filter (filename)
- (let ((ignored-filenames
- '("^/tmp" "semantic.cache$" "\\.emacs-places$"
- "\\.recentf$" ".newsrc\\(\\.eld\\)?"))
- (matched-ignored-filename nil))
- (mapc
- (lambda (x)
- (when (string-match x filename)
- (setq matched-ignored-filename t)))
- ignored-filenames)
- (not matched-ignored-filename)))
+ (message "Checking '%s'" filename)
+ (not (string-match "\\(^/tmp\\|\\.emacs\\.d/data/\\|\\.newsrc\\(\\.eld\\)?\\)" filename)))
(setq backup-each-save-filter-function 'backup-each-save-filter)
+;;;_ , breadcrumb
+
+(use-package breadcrumb
+ :commands bc-set
+ :init
+ (progn
+ (define-key global-map [(alt ?b)] 'bc-set)
+ (define-key global-map [(alt ?d)] 'bc-local-next)
+ (define-key global-map [(alt ?g)] 'bc-goto-current)
+ (define-key global-map [(alt ?l)] 'bc-list)
+ (define-key global-map [(alt ?m)] 'bc-set)
+ (define-key global-map [(alt ?n)] 'bc-next)
+ (define-key global-map [(alt ?p)] 'bc-previous)
+ (define-key global-map [(alt ?u)] 'bc-local-previous)))
+
;;;_ , css-mode
(add-to-list 'auto-mode-alist '("\\.css$" . css-mode))
+;;;_ , diminish
+
+(ignore-errors (diminish 'auto-fill-function))
+
+(defadvice dired-omit-startup (after diminish-dired-omit activate)
+ "Make sure to remove \"Omit\" from the modeline."
+ (diminish 'dired-omit-mode))
+
+(eval-after-load "dot-mode"
+ '(ignore-errors (diminish 'dot-mode)))
+
+(eval-after-load "whitespace"
+ '(ignore-errors
+ (diminish 'global-whitespace-mode)
+ (diminish 'whitespace-mode)
+ (diminish 'whitespace-newline-mode)))
+
;;;_ , dired-x
(defvar dired-omit-regexp-orig (symbol-function 'dired-omit-regexp))
@@ -306,17 +367,10 @@
(setq dired-use-ls-dired t)
(define-key dired-mode-map [?l] 'dired-up-directory)
- (define-key dired-mode-map [tab] 'other-window)
+ ;; (define-key dired-mode-map [tab] 'other-window)
(define-key dired-mode-map [(meta shift ?g)] 'switch-to-gnus)
(define-key dired-mode-map [(meta ?s) ?f] 'find-grep)))
-;;;_ , deft
-
-(eval-after-load "deft"
- '(progn
- (define-key deft-mode-map [? ] 'deft-complete)
- (define-key deft-mode-map [(control return)] 'other-window)))
-
;;;_ , ediff
(defun ediff-keep-both ()
@@ -349,6 +403,13 @@
(lambda ()
(define-key ediff-mode-map [?c] 'ediff-keep-both))))
+;;;_ , edit-server
+
+(use-package edit-server
+ :config
+ (if window-system
+ (add-hook 'after-init-hook 'edit-server-start t)))
+
;;;_ , erc
(require 'erc-alert)
@@ -432,7 +493,6 @@
(add-hook 'magit-log-edit-mode-hook
#'(lambda ()
(set-fill-column 72)
- ;;(column-marker-1 72)
(flyspell-mode)
(orgstruct++-mode)))
@@ -451,6 +511,28 @@
(defun git-commit-changes ()
(start-process "*git commit*" nil "git" "commit" "-a" "-m" "changes"))
+(defvar anything-c-source-git-files
+ '((name . "Files under Git version control")
+ (init . anything-c-source-git-files-init)
+ (candidates-in-buffer)
+ (type . file))
+ "Search for files in the current Git project.")
+
+(defun anything-c-source-git-files-init ()
+ "Build `anything-candidate-buffer' of Git files."
+ (with-current-buffer (anything-candidate-buffer 'local)
+ (mapcar
+ (lambda (item)
+ (insert (expand-file-name item) ?\n))
+ (split-string (shell-command-to-string "git ls-files") "\n"))))
+
+(defun anything-find-git-file ()
+ (interactive)
+ (anything :sources 'anything-c-source-git-files
+ :input ""
+ :prompt "Find file: "
+ :buffer "*Anything git file*"))
+
;;;_ , gtags
(eval-after-load "gtags"
@@ -500,12 +582,28 @@
(define-key ido-file-completion-map "\C-m"
'ido-smart-select-text)))
+;;;_ , isearch
+
+(use-package "isearch"
+ :defer t
+ :config
+ (progn
+ (define-key isearch-mode-map [(control ?c)] 'isearch-toggle-case-fold)
+ (define-key isearch-mode-map [(control ?t)] 'isearch-toggle-regexp)
+ (define-key isearch-mode-map [(control ?^)] 'isearch-edit-string)
+ (define-key isearch-mode-map [(control ?i)] 'isearch-complete)))
+
;;;_ , lusty-explorer
-(add-hook 'lusty-setup-hook
- (lambda ()
- (define-key lusty-mode-map [space] 'lusty-select-match)
- (define-key lusty-mode-map [? ] 'lusty-select-match)))
+(use-package lusty-explorer
+ :commands lusty-file-explorer
+ :init
+ (define-key ctl-x-map [(control ?f)] 'lusty-file-explorer)
+ :config
+ (add-hook 'lusty-setup-hook
+ (lambda ()
+ (define-key lusty-mode-map [space] 'lusty-select-match)
+ (define-key lusty-mode-map [? ] 'lusty-select-match))))
;;;_ , merlin
@@ -602,10 +700,6 @@ tell application \"Merlin\"
end tell" account account start duration commodity (if cleared "true" "false")
end end))))))
-;;;_ , modeline-posn
-
-(size-indication-mode)
-
;;;_ , mule
(prefer-coding-system 'utf-8)
@@ -614,16 +708,19 @@ end tell" account account start duration commodity (if cleared "true" "false")
(defun normalize-file ()
(interactive)
- (goto-char (point-min))
- (whitespace-cleanup)
- (set-buffer-file-coding-system 'unix)
(save-excursion
- (goto-char (point-min))
- (while (re-search-forward "\r$" nil t)
- (replace-match "")))
- (set-buffer-file-coding-system 'utf-8)
- (let ((require-final-newline t))
- (save-buffer)))
+ (goto-char (point-min))
+ (whitespace-cleanup)
+ (delete-trailing-whitespace)
+ (goto-char (point-max))
+ (delete-blank-lines)
+ (set-buffer-file-coding-system 'unix)
+ (goto-char (point-min))
+ (while (re-search-forward "\r$" nil t)
+ (replace-match ""))
+ (set-buffer-file-coding-system 'utf-8)
+ (let ((require-final-newline t))
+ (save-buffer))))
;;;_ , nroff-mode
@@ -655,45 +752,74 @@ end tell" account account start duration commodity (if cleared "true" "false")
(add-to-list 'auto-mode-alist '("\\.pp$" . puppet-mode))
-;;;_ , ruby
+;;;_ , session
-(require 'inf-ruby)
-(require 'yari)
-(require 'ruby-tools nil t)
+(use-package session
+ :config
+ (progn
+ (defun save-information ()
+ (dolist (func kill-emacs-hook)
+ (unless (memq func '(exit-gnus-on-exit server-force-stop))
+ (funcall func)))
+ (unless (eq 'listen (process-status server-process))
+ (server-start)))
-(defun my-ruby-smart-return ()
- (interactive)
- (when (memq (char-after) '(?\| ?\" ?\'))
- (forward-char))
- (call-interactively 'newline-and-indent))
+ (run-with-idle-timer 300 t 'save-information)
-(defun my-ruby-mode-hook ()
- (inf-ruby-keys)
+ (if window-system
+ (add-hook 'after-init-hook 'session-initialize t))))
- (define-key ruby-mode-map [return] 'my-ruby-smart-return)
- (define-key ruby-mode-map [(control ?h) (control ?i)] 'yari-anything)
+;;;_ , stopwatch
- (set (make-local-variable 'yas/fallback-behavior)
- '(apply ruby-indent-command . nil))
- (define-key ruby-mode-map [tab] 'yas/expand-from-trigger-key))
+(use-package stopwatch
+ :commands stopwatch
+ :init
+ (define-key global-map [f8] 'stopwatch))
-(add-hook 'ruby-mode-hook 'my-ruby-mode-hook)
+;;;_ , sunrise-commander
-;;;_ , session
+(eval-after-load "sunrise-commander"
+ '(progn
+ (require 'sunrise-x-modeline)
+ (require 'sunrise-x-tree)
+ (require 'sunrise-x-tabs)
+ (require 'sunrise-x-loop)
+
+ (define-key sr-mode-map "/" 'sr-sticky-isearch-forward)
+ (define-key sr-mode-map "\C-e" 'end-of-line)
+ (define-key sr-mode-map "l" 'sr-dired-prev-subdir)
-(defun save-information ()
- (dolist (func kill-emacs-hook)
- (unless (memq func '(exit-gnus-on-exit server-force-stop))
- (funcall func)))
- (unless (eq 'listen (process-status server-process))
- (server-start)))
+ (define-key sr-tabs-mode-map [(control ?p)] 'previous-line)
+ (define-key sr-tabs-mode-map [(control ?n)] 'next-line)
-(run-with-idle-timer 300 t 'save-information)
+ (define-key sr-tabs-mode-map [(meta ?\[)] 'sr-tabs-prev)
+ (define-key sr-tabs-mode-map [(meta ?\])] 'sr-tabs-next)
+
+ (defun sr-browse-file (&optional file)
+ "Display the selected file with the default appication."
+ (interactive)
+ (setq file (or file (dired-get-filename)))
+ (save-selected-window
+ (sr-select-viewer-window)
+ (let ((buff (current-buffer))
+ (fname (if (file-directory-p file)
+ file
+ (file-name-nondirectory file)))
+ (app (cond
+ ((eq system-type 'darwin) "open %s")
+ ((eq system-type 'windows-nt) "open %s")
+ (t "xdg-open %s"))))
+ (start-process-shell-command "open" nil (format app file))
+ (unless (eq buff (current-buffer))
+ (sr-scrollable-viewer (current-buffer)))
+ (message "Opening \"%s\" ..." fname))))))
;;;_ , vkill
-(eval-after-load "vkill"
- '(setq vkill-show-all-processes t))
+(use-package vkill
+ :commands vkill
+ :config
+ (setq vkill-show-all-processes t))
;;;_ , w3m
@@ -734,47 +860,79 @@ end tell" account account start duration commodity (if cleared "true" "false")
(add-hook 'find-file-hooks 'maybe-turn-on-whitespace t)
-;;;_ , workgroups
-
-(eval-when-compile
- (defvar wg-map))
+;;;_ , winner
-(workgroups-mode 1)
+(use-package winner
+ :diminish winner-mode
+ :init
+ (progn
+ (define-key global-map [(meta shift ?n)] 'winner-redo)
+ (define-key global-map [(meta shift ?p)] 'winner-undo)))
-(define-key wg-map [(control ?\\)] 'wg-switch-to-previous-workgroup)
-(define-key wg-map [?\\] 'toggle-input-method)
+;;;_ , workgroups
-(if (file-readable-p "~/.emacs.d/data/workgroups")
- (wg-load "~/.emacs.d/data/workgroups"))
+(use-package workgroups
+ :diminish workgroups-mode
+ :config
+ (progn
+ (workgroups-mode 1)
-(diminish 'workgroups-mode)
+ (define-key wg-map [(control ?\\)] 'wg-switch-to-previous-workgroup)
+ (define-key wg-map [?\\] 'toggle-input-method)
-;;(defadvice ido-visit-buffer (before switch-to-buffers-workgroup
-;; (buffer method &optional record)
-;; activate)
-;; "If a workgroup is showing BUFFER, switch to it first"
-;; (wg-aif (wg-find-buffer (if (bufferp buffer)
-;; (buffer-name buffer)
-;; buffer))
-;; (ignore-errors
-;; (wg-switch-to-workgroup it))))
+ (if (file-readable-p "~/.emacs.d/data/workgroups")
+ (wg-load "~/.emacs.d/data/workgroups"))))
;;;_ , wrap-region
-(require 'wrap-region)
+(use-package wrap-region
+ :commands wrap-region-mode
+ :diminish wrap-region-mode
+ :config
+ (wrap-region-add-wrappers
+ '(("$" "$")
+ ("/" "/" nil ruby-mode)
+ ("/* " " */" "#" (java-mode javascript-mode css-mode
+ c-mode c++-mode))
+ ("`" "`" nil (markdown-mode ruby-mode shell-script-mode)))))
-(wrap-region-add-wrappers
- '(("$" "$")
- ("{-" "-}" "#")
- ("/" "/" nil 'ruby-mode)
- ("/* " " */" "#" '(java-mode javascript-mode css-mode))
- ("`" "`" nil '(markdown-mode ruby-mode))))
+;;;_ , write-room
+
+(defun write-room ()
+ "Make a frame without any bling."
+ (interactive)
+ ;; to restore:
+ ;; (setq mode-line-format (default-value 'mode-line-format))
+ (let ((frame (make-frame
+ '((minibuffer . nil)
+ (vertical-scroll-bars . nil)
+ (left-fringe . 0); no fringe
+ (right-fringe . 0)
+ (background-mode . dark)
+ (background-color . "cornsilk")
+ (foreground-color . "black")
+ (cursor-color . "green")
+ (border-width . 0)
+ (border-color . "black"); should be unnecessary
+ (internal-border-width . 64); whitespace!
+ (cursor-type . box)
+ (menu-bar-lines . 0)
+ (tool-bar-lines . 0)
+ (fullscreen . fullboth) ; this should work
+ (unsplittable . t)))))
+ (select-frame frame)
+ (find-file "~/Documents/Notes.txt")
+ (setq mode-line-format nil
+ fill-column 65)
+ (set-window-margins (selected-window) 50 50)))
;;;_ , yasnippet
(yas/initialize)
(yas/load-directory (expand-file-name "snippets/" user-emacs-directory))
+(ignore-errors (diminish 'yas/minor-mode))
+
(define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand)
(defun yas/new-snippet (&optional choose-instead-of-guess)
@@ -796,21 +954,11 @@ end tell" account account start duration commodity (if cleared "true" "false")
# --
$0"))))
-;;;_ , diminish (this must come last)
-
-(diminish 'abbrev-mode)
-(diminish 'auto-fill-function)
-(ignore-errors
- (diminish 'yas/minor-mode))
-
-(defadvice dired-omit-startup (after diminish-dired-omit activate)
- "Make sure to remove \"Omit\" from the modeline."
- (diminish 'dired-omit-mode))
-
-(eval-after-load "dot-mode"
- '(diminish 'dot-mode))
-(eval-after-load "winner"
- '(ignore-errors (diminish 'winner-mode)))
+(define-key mode-specific-map [?y ?n] 'yas/new-snippet)
+(define-key mode-specific-map [?y tab] 'yas/expand)
+(define-key mode-specific-map [?y ?f] 'yas/find-snippets)
+(define-key mode-specific-map [?y ?r] 'yas/reload-all)
+(define-key mode-specific-map [?y ?v] 'yas/visit-snippet-file)
;;;_ , Programming modes
@@ -870,7 +1018,6 @@ $0"))))
(set (make-local-variable 'parens-require-spaces) nil)
(setq indicate-empty-lines t)
(setq fill-column 72)
- ;;(column-marker-3 80)
(define-key c-mode-base-map [(meta ?q)] 'c-fill-paragraph)
@@ -1124,6 +1271,17 @@ $0"))))
(c-special-indent-hook . c-gnu-impose-minimum)
(c-block-comment-prefix . "")))))
+;;;_ , ulp
+
+(defun ulp ()
+ (interactive)
+ (find-file "~/src/ansi/ulp.c")
+ (find-file-noselect "~/Contracts/TI/test/ulp_suite/invoke.sh")
+ (find-file-noselect "~/Contracts/TI/test/ulp_suite")
+ ;;(visit-tags-table "~/src/ansi/TAGS")
+ (magit-status "~/src/ansi")
+ (gdb "gdb --annotate=3 ~/Contracts/TI/bin/msp/acpia430"))
+
;;;_ . gdb
(eval-after-load "gdb-ui"
@@ -1143,17 +1301,6 @@ $0"))))
(set-window-buffer window buf)
window))))))
-;;;_ . ulp
-
-(defun ulp ()
- (interactive)
- (find-file "~/src/ansi/ulp.c")
- (find-file-noselect "~/Contracts/TI/test/ulp_suite/invoke.sh")
- (find-file-noselect "~/Contracts/TI/test/ulp_suite")
- ;;(visit-tags-table "~/src/ansi/TAGS")
- (magit-status "~/src/ansi")
- (gdb "gdb --annotate=3 ~/Contracts/TI/bin/msp/acpia430"))
-
;;;_ . haskell-mode
(add-to-list 'auto-mode-alist '("\\.l?hs$" . haskell-mode))
@@ -1182,7 +1329,35 @@ $0"))))
(require 'inf-haskell)
(require 'hs-lint)))
-;;;_ . ansicl
+;;;_ . lisp
+
+(defface esk-paren-face
+ '((((class color) (background dark))
+ (:foreground "grey50"))
+ (((class color) (background light))
+ (:foreground "grey55")))
+ "Face used to dim parentheses."
+ :group 'starter-kit-faces)
+
+(mapc (lambda (major-mode)
+ (font-lock-add-keywords
+ major-mode
+ `(("(\\(lambda\\)\\>"
+ (0 (ignore
+ (compose-region (match-beginning 1)
+ (match-end 1) ?λ))))
+ ("(\\|)" . 'esk-paren-face))))
+ '(emacs-lisp-mode
+ inferior-emacs-lisp-mode
+ lisp-mode
+ inferior-lisp-mode
+ slime-repl-mode))
+
+(defun my-byte-recompile-file ()
+ (save-excursion
+ (byte-recompile-file buffer-file-name)))
+
+;;;_ , ansicl
(info-lookmore-elisp-cl)
(info-lookmore-elisp-userlast)
@@ -1202,12 +1377,12 @@ $0"))))
(if (> (length (window-list)) 1)
(delete-window)))
-;;;_ . eldoc
+;;;_ , eldoc
(eval-after-load "eldoc"
'(diminish 'eldoc-mode))
-;;;_ . elint
+;;;_ , elint
(defun elint-current-buffer ()
(interactive)
@@ -1222,45 +1397,7 @@ $0"))))
(add-to-list 'elint-standard-variables 'emacs-major-version)
(add-to-list 'elint-standard-variables 'window-system)))
-;;;_ . paredit
-
-(eval-after-load "paredit"
- '(diminish 'paredit-mode))
-
-;;;_ . redhank
-
-(eval-after-load "redshank"
- '(diminish 'redshank-mode))
-
-;;;_ . lisp
-
-(defface esk-paren-face
- '((((class color) (background dark))
- (:foreground "grey50"))
- (((class color) (background light))
- (:foreground "grey55")))
- "Face used to dim parentheses."
- :group 'starter-kit-faces)
-
-(mapc (lambda (major-mode)
- (font-lock-add-keywords
- major-mode
- `(("(\\(lambda\\)\\>"
- (0 (ignore
- (compose-region (match-beginning 1)
- (match-end 1) ?λ))))
- ("(\\|)" . 'esk-paren-face))))
- '(emacs-lisp-mode
- inferior-emacs-lisp-mode
- lisp-mode
- inferior-lisp-mode
- slime-repl-mode))
-
-(defun byte-recompile-file ()
- (save-excursion
- (byte-compile-file buffer-file-name)))
-
-;;;_ . lisp-mode-hook
+;;;_ , lisp-mode-hook
(defun my-elisp-indent-or-complete (&optional arg)
(interactive "p")
@@ -1283,7 +1420,6 @@ $0"))))
(paredit-mode 1)
(redshank-mode 1)
- ;;(column-marker-1 79)
(let (mode-map)
(if emacs-lisp-p
(progn
@@ -1309,6 +1445,16 @@ $0"))))
(add-hook 'emacs-lisp-mode-hook (function (lambda () (my-lisp-mode-hook t))))
+;;;_ , paredit
+
+(eval-after-load "paredit"
+ '(diminish 'paredit-mode))
+
+;;;_ , redhank
+
+(eval-after-load "redshank"
+ '(diminish 'redshank-mode))
+
;;;_ . python-mode
(add-to-list 'auto-mode-alist '("\\.py$" . python-mode))
@@ -1338,6 +1484,30 @@ $0"))))
(add-hook 'python-mode-hook 'my-python-mode-hook)
+;;;_ . ruby-mode
+
+(require 'inf-ruby)
+(require 'yari)
+(require 'ruby-tools nil t)
+
+(defun my-ruby-smart-return ()
+ (interactive)
+ (when (memq (char-after) '(?\| ?\" ?\'))
+ (forward-char))
+ (call-interactively 'newline-and-indent))
+
+(defun my-ruby-mode-hook ()
+ (inf-ruby-keys)
+
+ (define-key ruby-mode-map [return] 'my-ruby-smart-return)
+ (define-key ruby-mode-map [(control ?h) (control ?i)] 'yari-anything)
+
+ (set (make-local-variable 'yas/fallback-behavior)
+ '(apply ruby-indent-command . nil))
+ (define-key ruby-mode-map [tab] 'yas/expand-from-trigger-key))
+
+(add-hook 'ruby-mode-hook 'my-ruby-mode-hook)
+
;;;_ . nxml-mode
(defalias 'xml-mode 'nxml-mode)
@@ -1358,36 +1528,6 @@ $0"))))
:doc-spec
'(("(bash)Index")))
-;;;_ . write-room
-
-(defun write-room ()
- "Make a frame without any bling."
- (interactive)
- ;; to restore:
- ;; (setq mode-line-format (default-value 'mode-line-format))
- (let ((frame (make-frame '((minibuffer . nil)
- (vertical-scroll-bars . nil)
- (left-fringe . 0); no fringe
- (right-fringe . 0)
- (background-mode . dark)
- (background-color . "cornsilk")
- (foreground-color . "black")
- (cursor-color . "green")
- (border-width . 0)
- (border-color . "black"); should be unnecessary
- (internal-border-width . 64); whitespace!
- (cursor-type . box)
- (menu-bar-lines . 0)
- (tool-bar-lines . 0)
- (mode-line-format . nil) ; dream on... has no effect
- (fullscreen . fullboth) ; this should work
- (unsplittable . t)))))
- (select-frame frame)
- (find-file "~/Documents/Notes.txt")
- (setq mode-line-format nil
- fill-column 65)
- (set-window-margins (selected-window) 50 50)))
-
;;;_ . zencoding
(eval-when-compile
@@ -2059,8 +2199,7 @@ Summary: %s" product component version priority severity heading) ?\n ?\n)
;;;_ . keybindings
(defvar org-mode-completion-keys
- '(
- (?d . "DONE")
+ '((?d . "DONE")
(?g . "DELEGATED")
(?n . "NOTE")
(?r . "DEFERRED")
@@ -2072,7 +2211,6 @@ Summary: %s" product component version priority severity heading) ?\n ?\n)
))
(defvar org-todo-state-map nil)
-
(define-prefix-command 'org-todo-state-map)
(dolist (ckey org-mode-completion-keys)
@@ -2126,8 +2264,6 @@ Summary: %s" product component version priority severity heading) ?\n ?\n)
(define-key mode-specific-map [?x ?f] 'org-insert-file-link)
(define-key mode-specific-map [?x ?F] 'org-set-file-link)
-(define-key mode-specific-map [?x ?b] 'ignore)
-
(autoload 'ledger-test-create "ldg-test" nil t)
(autoload 'ledger-test-run "ldg-test" nil t)
@@ -2155,7 +2291,6 @@ Summary: %s" product component version priority severity heading) ?\n ?\n)
(add-hook 'org-mode-hook
(lambda ()
- ;; yasnippet (using the new org-cycle hooks)
(set (make-local-variable 'yas/trigger-key) [tab])
(add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
(define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand)))
@@ -2199,11 +2334,12 @@ Summary: %s" product component version priority severity heading) ?\n ?\n)
;;;_ , Gnus
+(setq imap-shell-program "/usr/local/libexec/dovecot/imap")
+
(require 'gnus)
(require 'gnus-harvest)
(require 'starttls)
(require 'message)
-(require 'pgg)
(require 'offlineimap-ctl)
(require 'nnmairix)
@@ -2216,15 +2352,10 @@ Summary: %s" product component version priority severity heading) ?\n ?\n)
(add-hook 'mail-citation-hook 'sc-cite-original)
-(defun my-setup-hl-line ()
- ;;(set (make-local-variable 'hl-line-face) 'underline)
- (hl-line-mode 1)
- ;;(setq cursor-type nil)
- )
-
-(add-hook 'gnus-group-mode-hook 'my-setup-hl-line)
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
-(add-hook 'gnus-summary-mode-hook 'my-setup-hl-line)
+
+(add-hook 'gnus-group-mode-hook 'hl-line-mode)
+(add-hook 'gnus-summary-mode-hook 'hl-line-mode)
(add-hook 'dired-mode-hook 'gnus-dired-mode)
@@ -2299,7 +2430,7 @@ This moves them into the Spam folder."
gnus-level-subscribed)))
(let* ((group (gnus-info-group info))
(unread (gnus-group-unread group)))
- (when (and (string-match "^\\(list\\.\\|nntp\\+LocalNews:\\)" group)
+ (when (and (string-match "^\\(list\\.\\|nntp\\+LocalNews:\\|nnvirtual:\\)" group)
(not (string= "INBOX" group))
(numberp unread) (> unread 0))
(ignore-errors
@@ -2483,29 +2614,9 @@ Else, return \" \"."
(browse-url (nth count urls)))))
(select-window this-window)))
-;;;_ . Keybindings
-
-(when using-textexpander
- ;;(define-key override-global-map [(alt ?v)] 'scroll-down)
- (define-key global-map [(alt ?v)] 'scroll-down)
- (define-key override-global-map [(meta ?v)] 'yank)
- (define-key global-map [(meta ?v)] 'yank))
-
-(defun wikipedia-query (term)
- (interactive (list (read-string "Wikipedia search: " (word-at-point))))
- (w3m-search "en.wikipedia" term))
-
-(defun wolfram-alpha-query (term)
- (interactive (list (read-string "Ask Wolfram Alpha: " (word-at-point))))
- (w3m-browse-url (format "http://m.wolframalpha.com/input/?i=%s"
- (w3m-search-escape-query-string term))))
+;;;_ . Gnus keybindings
(define-key global-map [(alt meta ?f)] 'gnus-query)
-(define-key global-map [(alt meta ?g)] 'w3m-search)
-(define-key global-map [(alt meta ?h)] 'wolfram-alpha-query)
-(define-key global-map [(alt meta ?w)] 'wikipedia-query)
-
-(define-key global-map [(control ?h) (control ?i)] 'info-lookup-symbol)
(eval-after-load "gnus-group"
'(define-key gnus-group-score-map [?s] 'gnus-score-groups))
@@ -2526,6 +2637,31 @@ Else, return \" \"."
(define-key gnus-summary-mode-map [(control ?c) (control ?o)]
'gnus-article-browse-urls)))
+;;;_. Keybindings
+
+;;;_ , global-map
+
+(when using-textexpander
+ ;;(define-key override-global-map [(alt ?v)] 'scroll-down)
+ (define-key global-map [(alt ?v)] 'scroll-down)
+ (define-key override-global-map [(meta ?v)] 'yank)
+ (define-key global-map [(meta ?v)] 'yank))
+
+(defun wikipedia-query (term)
+ (interactive (list (read-string "Wikipedia search: " (word-at-point))))
+ (w3m-search "en.wikipedia" term))
+
+(defun wolfram-alpha-query (term)
+ (interactive (list (read-string "Ask Wolfram Alpha: " (word-at-point))))
+ (w3m-browse-url (format "http://m.wolframalpha.com/input/?i=%s"
+ (w3m-search-escape-query-string term))))
+
+(define-key global-map [(alt meta ?g)] 'w3m-search)
+(define-key global-map [(alt meta ?h)] 'wolfram-alpha-query)
+(define-key global-map [(alt meta ?w)] 'wikipedia-query)
+
+(define-key global-map [(control ?h) (control ?i)] 'info-lookup-symbol)
+
(eval-after-load "w3m"
'(let (proxy-host proxy-port)
(with-temp-buffer
@@ -2542,21 +2678,33 @@ Else, return \" \"."
(add-hook 'w3m-mode-hook 'w3m-type-ahead-mode)
- (define-key w3m-minor-mode-map "\C-m" 'w3m-view-url-with-external-browser)))
+ (define-key w3m-minor-mode-map "\C-m"
+ 'w3m-view-url-with-external-browser)))
-;;;_. Keybindings
+;;;_ . f?
+
+(define-key global-map [f9] 'gud-cont)
+(define-key global-map [f10] 'gud-next)
+(define-key global-map [f11] 'gud-step)
+(define-key global-map [(shift f11)] 'gud-finish)
+
+;;;_ . C-?
-;;;_ , global
+(define-key global-map [(control return)] 'other-window)
+
+(define-key global-map [(control ?z)] 'collapse-or-expand)
-;;;_ . M-<?>
+;;;_ . M-?
-(autoload 'anything-lisp-complete-symbol-partial-match "anything-complete" nil t)
+(autoload 'anything-lisp-complete-symbol-partial-match
+ "anything-complete" nil t)
-;;(define-key global-map [(meta ?/)] 'hippie-expand)
(define-key global-map [(meta ?,)] 'anything-resume)
(define-key global-map [(meta ?/)] 'dabbrev-expand)
(define-key global-map [(meta ??)] 'anything-lisp-complete-symbol-partial-match)
+(define-key global-map [(meta ?g) ?g] 'anything-find-git-file)
+
(defun delete-indentation-forward ()
(interactive)
(delete-indentation t))
@@ -2571,14 +2719,13 @@ Else, return \" \"."
(defun switch-to-gnus ()
(interactive)
- (let ((alist
- '(("\\`\\*unsent")
- ("\\`\\*Article")
- ("\\`\\*Summary")
- ("\\`\\*Group"
- (lambda (buf)
- (with-current-buffer buf
- (gnus-group-get-new-news))))))
+ (let ((alist '(("\\`\\*unsent")
+ ("\\`\\*Article")
+ ("\\`\\*Summary")
+ ("\\`\\*Group"
+ (lambda (buf)
+ (with-current-buffer buf
+ (gnus-group-get-new-news))))))
candidate)
(catch 'found
(dolist (item alist)
@@ -2593,9 +2740,7 @@ Else, return \" \"."
(throw 'found (setq candidate last))))))
(if candidate
(ido-visit-buffer candidate ido-default-buffer-method)
- ;;(gnus-unplugged)
- (gnus)
- )))
+ (gnus))))
(defun show-compilation ()
(interactive)
@@ -2625,8 +2770,6 @@ Else, return \" \"."
(define-key global-map [(meta shift ?g)] 'switch-to-gnus)
(define-key global-map [(meta ?m)] 'org-smart-capture)
(define-key global-map [(meta shift ?m)] 'org-inline-note)
-(define-key global-map [(meta shift ?n)] 'winner-redo)
-(define-key global-map [(meta shift ?p)] 'winner-undo)
;;(define-key global-map [(meta shift ?t)] 'tags-search)
(define-key global-map [(meta shift ?t)] 'anything-gtags-select)
@@ -2643,6 +2786,7 @@ Else, return \" \"."
(defun my-anything-occur ()
(interactive)
+ (require 'anything-config)
(anything-other-buffer 'anything-c-source-occur "*Anything Occur*"))
(define-key global-map [(meta ?s) ?a] 'anything-do-grep)
@@ -2700,42 +2844,7 @@ Else, return \" \"."
(define-key global-map [(meta alt ?w)] 'copy-code-as-rtf)
-;;;_ . C-<?>
-
-(eval-when-compile
- (require 'ace-jump-mode))
-
-(define-key global-map [(control return)] 'other-window)
-
-(defun quick-jump-char (&optional prefix no-ace-jump)
- (interactive "P")
- (let* ((query-char (event-basic-type last-command-event))
- (regexp (regexp-quote (char-to-string query-char)))
- (ace-jump-mode-hook
- (list (function
- (lambda ()
- (define-key overriding-local-map
- [(alt ?-)]
- (function
- (lambda (&optional prefix)
- (interactive "P")
- (ace-jump-done)
- (quick-jump-char prefix)))))))))
- (if (looking-at regexp)
- (forward-char))
- (re-search-forward regexp)
- (backward-char)
- (unless no-ace-jump
- (ace-jump-do (regexp-quote (char-to-string query-char))))))
-
-(define-key global-map [(control ?.)] 'ace-jump-mode)
-(define-key override-global-map [(control ?.)] 'ace-jump-mode)
-(eval-after-load "flyspell"
- '(define-key flyspell-mode-map [(control ?\.)] 'ace-jump-mode))
-
-(define-key global-map [(control ?z)] 'collapse-or-expand)
-
-;;;_ . C-M-<?>
+;;;_ . C-M-?
(define-key global-map [(control meta backspace)] 'backward-kill-sexp)
@@ -2761,122 +2870,13 @@ Else, return \" \"."
(delete-other-windows)
(bury-buffer)))
-;;;_ . C-h <?>
-
-(defun my-anything-apropos ()
- (interactive)
- (require 'anything-config)
- (anything
- :prompt "Info about: "
- :candidate-number-limit 5
- :sources '(anything-c-source-emacs-commands
- anything-c-source-emacs-functions
- anything-c-source-emacs-variables
- anything-c-source-info-emacs
- anything-c-source-info-elisp
- anything-c-source-info-gnus
- anything-c-source-info-org
- anything-c-source-info-cl
- anything-c-source-emacs-source-defun)))
-
-(define-key global-map [(control ?h) ?a] 'anything-apropos)
-
-(defun scratch ()
- (interactive)
- (switch-to-buffer-other-window (get-buffer-create "*scratch*"))
- ;;(lisp-interaction-mode)
- (text-mode)
- (goto-char (point-min))
- (when (looking-at ";")
- (forward-line 4)
- (delete-region (point-min) (point)))
- (goto-char (point-max)))
-
-(defun find-which (name)
- (interactive "sCommand name: ")
- (find-file-other-window
- (substring (shell-command-to-string (format "which %s" name)) 0 -1)))
-
-(defun my-describe-symbol (symbol &optional mode)
- (interactive
- (info-lookup-interactive-arguments 'symbol current-prefix-arg))
- (let (info-buf find-buf desc-buf cust-buf)
- (save-window-excursion
- (ignore-errors
- (info-lookup-symbol symbol mode)
- (setq info-buf (get-buffer "*info*")))
- (let ((sym (intern-soft symbol)))
- (when sym
- (if (functionp sym)
- (progn
- (find-function sym)
- (setq find-buf (current-buffer))
- (describe-function sym)
- (setq desc-buf (get-buffer "*Help*")))
- (find-variable sym)
- (setq find-buf (current-buffer))
- (describe-variable sym)
- (setq desc-buf (get-buffer "*Help*"))
- ;;(customize-variable sym)
- ;;(setq cust-buf (current-buffer))
- ))))
-
- (delete-other-windows)
-
- (flet ((switch-in-other-buffer
- (buf)
- (when buf
- (split-window-vertically)
- (switch-to-buffer-other-window buf))))
- (switch-to-buffer find-buf)
- (switch-in-other-buffer desc-buf)
- (switch-in-other-buffer info-buf)
- ;;(switch-in-other-buffer cust-buf)
- (balance-windows))))
-
-(defvar lisp-find-map)
-(define-prefix-command 'lisp-find-map)
-(define-key global-map [(control ?h) ?e] 'lisp-find-map)
-(define-key lisp-find-map [?a] 'my-anything-apropos)
-(define-key lisp-find-map [?c] 'finder-commentary)
-(define-key lisp-find-map [?e] 'view-echo-area-messages)
-(define-key lisp-find-map [?f] 'find-function)
-(define-key lisp-find-map [?F] 'find-face-definition)
-(define-key lisp-find-map [?d] 'my-describe-symbol)
-(define-key lisp-find-map [?i] 'info-apropos)
-(define-key lisp-find-map [?k] 'find-function-on-key)
-(define-key lisp-find-map [?l] 'find-library)
-(define-key lisp-find-map [?s] 'scratch)
-(define-key lisp-find-map [?v] 'find-variable)
-(define-key mode-specific-map [?e ?w] 'find-which)
-
-;;;_ . f<?>
-
-(define-key global-map [f8] 'stopwatch)
-
-(define-key global-map [f9] 'gud-cont)
-(define-key global-map [f10] 'gud-next)
-(define-key global-map [f11] 'gud-step)
-(define-key global-map [(shift f11)] 'gud-finish)
-
-;;;_ . A-<?>
+;;;_ . A-?
(if t
(define-key key-translation-map (kbd "A-TAB") (kbd "M-TAB"))
(define-key key-translation-map [(alt tab)] [(meta tab)]))
-;;;_ , breadcrumb
-
-(define-key global-map [(alt ?b)] 'bc-set)
-(define-key global-map [(alt ?d)] 'bc-local-next)
-(define-key global-map [(alt ?g)] 'bc-goto-current)
-(define-key global-map [(alt ?l)] 'bc-list)
-(define-key global-map [(alt ?m)] 'bc-set)
-(define-key global-map [(alt ?n)] 'bc-next)
-(define-key global-map [(alt ?p)] 'bc-previous)
-(define-key global-map [(alt ?u)] 'bc-local-previous)
-
-;;;_ , ctl-x
+;;;_ , ctl-x-map
(defun ido-switch-buffer-tiny-frame (buffer)
(interactive (list (ido-read-buffer "Buffer: " nil t)))
@@ -2912,45 +2912,39 @@ Else, return \" \"."
(define-key ctl-x-map [?r ?b] 'ido-bookmark-jump)
(define-key ctl-x-map [?d] 'delete-whitespace-rectangle)
+(define-key ctl-x-map [?f] 'anything-find-git-file)
+(define-key ctl-x-map [(shift ?f)] 'set-fill-column)
(define-key ctl-x-map [?g] 'magit-status)
(define-key ctl-x-map [?m] 'compose-mail)
-(define-key ctl-x-map [(control ?f)] 'lusty-file-explorer)
-(define-key ctl-x-map [(control ?n)] 'next-line)
-(define-key ctl-x-map [(meta ?n)] 'set-goal-column)
(define-key ctl-x-map [?t] 'toggle-truncate-lines)
-(defun unfill-paragraph (arg)
- (interactive "*p")
- (let (beg end)
- (forward-paragraph arg)
- (setq end (copy-marker (- (point) 2)))
- (backward-paragraph arg)
- (if (eolp)
- (forward-char))
- (setq beg (point-marker))
- (when (> (count-lines beg end) 1)
- (while (< (point) end)
- (goto-char (line-end-position))
- (let ((sent-end (memq (char-before) '(?. ?\; ?! ??))))
- (delete-indentation 1)
- (if sent-end
- (insert ? )))
- (end-of-line))
- (save-excursion
- (goto-char beg)
- (while (re-search-forward "[^.;!?:]\\([ \t][ \t]+\\)" end t)
- (replace-match " " nil nil nil 1))))))
+;;;_ . C-x C-?
-(defun unfill-region (beg end)
- (interactive "r")
- (setq end (copy-marker end))
+(define-key ctl-x-map [(control ?b)] 'ibuffer)
+
+(defun duplicate-line ()
+ "Duplicate the line containing point."
+ (interactive)
(save-excursion
- (goto-char beg)
- (while (< (point) end)
- (unfill-paragraph 1)
- (forward-paragraph))))
+ (let (line-text)
+ (goto-char (line-beginning-position))
+ (let ((beg (point)))
+ (goto-char (line-end-position))
+ (setq line-text (buffer-substring beg (point))))
+ (if (eobp)
+ (insert ?\n)
+ (forward-line))
+ (open-line 1)
+ (insert line-text))))
-(define-key mode-specific-map [(meta ?q)] 'unfill-paragraph)
+(define-key ctl-x-map [(control ?d)] 'duplicate-line)
+(define-key ctl-x-map [(control ?e)] 'pp-eval-last-sexp)
+(define-key ctl-x-map [(control ?n)] 'next-line)
+(define-key ctl-x-map [(control ?z)] 'eshell-toggle)
+
+;;;_ . C-x M-?
+
+(define-key ctl-x-map [(meta ?n)] 'set-goal-column)
(defun refill-paragraph (arg)
(interactive "*P")
@@ -2987,40 +2981,11 @@ Else, return \" \"."
(define-key ctl-x-map [(meta ?q)] 'refill-paragraph)
-;;;_ . C-x C-<?>
-
-(define-key ctl-x-map [(control ?b)] 'ibuffer)
-
-(defun duplicate-line ()
- "Duplicate the line containing point."
- (interactive)
- (save-excursion
- (let (line-text)
- (goto-char (line-beginning-position))
- (let ((beg (point)))
- (goto-char (line-end-position))
- (setq line-text (buffer-substring beg (point))))
- (if (eobp)
- (insert ?\n)
- (forward-line))
- (open-line 1)
- (insert line-text))))
-
-(define-key ctl-x-map [(control ?d)] 'duplicate-line)
-(define-key ctl-x-map [(control ?e)] 'pp-eval-last-sexp)
-(define-key ctl-x-map [(control ?z)] 'eshell-toggle)
-
-;;;_ . C-x M-<?>
-
(define-key ctl-x-map [(meta ?z)] 'shell-toggle)
-;;;_ , mode-specific
+;;;_ , mode-specific-map
-(defun delete-to-end-of-buffer ()
- (interactive)
- (kill-region (point) (point-max)))
-
-(define-key mode-specific-map [(control ?z)] 'delete-to-end-of-buffer)
+;;;_ . C-c ?
(define-key mode-specific-map [tab] 'ff-find-other-file)
@@ -3085,10 +3050,12 @@ Else, return \" \"."
(define-key mode-specific-map [?e ?r] 'eval-region)
(define-key mode-specific-map [?e ?s] 'scratch)
(define-key mode-specific-map [?e ?v] 'edit-variable)
+(define-key mode-specific-map [?e ?w] 'find-which)
(define-key mode-specific-map [?e ?z] 'byte-recompile-directory)
(define-key mode-specific-map [?f] 'flush-lines)
(define-key mode-specific-map [?g] 'goto-line)
+(define-key mode-specific-map [?G] 'gist-region-or-buffer)
(define-key mode-specific-map [?h] 'crosshairs-mode)
(define-key mode-specific-map [?i ?b] 'flyspell-buffer)
@@ -3099,16 +3066,31 @@ Else, return \" \"."
(define-key mode-specific-map [?i ?m] 'ispell-message)
(define-key mode-specific-map [?i ?r] 'ispell-region)
-(define-key mode-specific-map [?j] 'dired-jump-other-window)
+;; (define-key mode-specific-map [?j] 'dired-jump-other-window)
+
+(defun my-activate-sunrise ()
+ (interactive)
+ (let ((sunrise-exists
+ (count-if (lambda (buf)
+ (string-match " (Sunrise)$" (buffer-name buf)))
+ (buffer-list))))
+ (if (> sunrise-exists 0)
+ (call-interactively 'sunrise)
+ (sunrise "~/dl/" "~/Archives/"))))
+
+(define-key mode-specific-map [?j] 'my-activate-sunrise)
+(define-key mode-specific-map [(control ?j)] 'sunrise-cd)
(defun dired-double-jump (first-dir second-dir)
(interactive
(list (ido-read-directory-name "First directory: "
- (expand-file-name "~/") "~/dl")
+ (expand-file-name "~") nil nil "dl/")
(ido-read-directory-name "Second directory: "
- (expand-file-name "~/") "~/dl")))
- (dired first-dir)
- (dired-other-window second-dir))
+ (expand-file-name "~") nil nil "Archives/")))
+ (if t
+ (sunrise first-dir second-dir)
+ (dired first-dir)
+ (dired-other-window second-dir)))
(define-key mode-specific-map [?J] 'dired-double-jump)
@@ -3299,48 +3281,142 @@ Else, return \" \"."
(define-key mode-specific-map [?w ?e] 'yaoddmuse-edit-default)
(define-key mode-specific-map [?w ?p] 'yaoddmuse-post-library-default)
-(define-key mode-specific-map [?y ?n] 'yas/new-snippet)
-(define-key mode-specific-map [?y tab] 'yas/expand)
-(define-key mode-specific-map [?y ?f] 'yas/find-snippets)
-(define-key mode-specific-map [?y ?r] 'yas/reload-all)
-(define-key mode-specific-map [?y ?v] 'yas/visit-snippet-file)
-
(define-key mode-specific-map [?z] 'clean-buffer-list)
(define-key mode-specific-map [?\[] 'align-regexp)
(define-key mode-specific-map [?=] 'count-matches)
(define-key mode-specific-map [?\;] 'comment-or-uncomment-region)
-;;;_ , isearch-mode
+;;;_ . C-c C-?
-(eval-after-load "isearch"
- '(progn
- (define-key isearch-mode-map [(control ?c)] 'isearch-toggle-case-fold)
- (define-key isearch-mode-map [(control ?t)] 'isearch-toggle-regexp)
- (define-key isearch-mode-map [(control ?^)] 'isearch-edit-string)
- (define-key isearch-mode-map [(control ?i)] 'isearch-complete)))
+(defun delete-to-end-of-buffer ()
+ (interactive)
+ (kill-region (point) (point-max)))
+
+(define-key mode-specific-map [(control ?z)] 'delete-to-end-of-buffer)
+
+;;;_ . C-c M-?
+
+(defun unfill-paragraph (arg)
+ (interactive "*p")
+ (let (beg end)
+ (forward-paragraph arg)
+ (setq end (copy-marker (- (point) 2)))
+ (backward-paragraph arg)
+ (if (eolp)
+ (forward-char))
+ (setq beg (point-marker))
+ (when (> (count-lines beg end) 1)
+ (while (< (point) end)
+ (goto-char (line-end-position))
+ (let ((sent-end (memq (char-before) '(?. ?\; ?! ??))))
+ (delete-indentation 1)
+ (if sent-end
+ (insert ? )))
+ (end-of-line))
+ (save-excursion
+ (goto-char beg)
+ (while (re-search-forward "[^.;!?:]\\([ \t][ \t]+\\)" end t)
+ (replace-match " " nil nil nil 1))))))
+
+(defun unfill-region (beg end)
+ (interactive "r")
+ (setq end (copy-marker end))
+ (save-excursion
+ (goto-char beg)
+ (while (< (point) end)
+ (unfill-paragraph 1)
+ (forward-paragraph))))
+
+(define-key mode-specific-map [(meta ?q)] 'unfill-paragraph)
+
+;;;_ , help-map
+
+(define-key help-map [?a] 'anything-apropos)
+
+(defun scratch ()
+ (interactive)
+ (switch-to-buffer-other-window (get-buffer-create "*scratch*"))
+ ;;(lisp-interaction-mode)
+ (text-mode)
+ (goto-char (point-min))
+ (when (looking-at ";")
+ (forward-line 4)
+ (delete-region (point-min) (point)))
+ (goto-char (point-max)))
+
+(defun find-which (name)
+ (interactive "sCommand name: ")
+ (find-file-other-window
+ (substring (shell-command-to-string (format "which %s" name)) 0 -1)))
+
+(defun my-describe-symbol (symbol &optional mode)
+ (interactive
+ (info-lookup-interactive-arguments 'symbol current-prefix-arg))
+ (let (info-buf find-buf desc-buf cust-buf)
+ (save-window-excursion
+ (ignore-errors
+ (info-lookup-symbol symbol mode)
+ (setq info-buf (get-buffer "*info*")))
+ (let ((sym (intern-soft symbol)))
+ (when sym
+ (if (functionp sym)
+ (progn
+ (find-function sym)
+ (setq find-buf (current-buffer))
+ (describe-function sym)
+ (setq desc-buf (get-buffer "*Help*")))
+ (find-variable sym)
+ (setq find-buf (current-buffer))
+ (describe-variable sym)
+ (setq desc-buf (get-buffer "*Help*"))
+ ;;(customize-variable sym)
+ ;;(setq cust-buf (current-buffer))
+ ))))
+
+ (delete-other-windows)
+
+ (flet ((switch-in-other-buffer
+ (buf)
+ (when buf
+ (split-window-vertically)
+ (switch-to-buffer-other-window buf))))
+ (switch-to-buffer find-buf)
+ (switch-in-other-buffer desc-buf)
+ (switch-in-other-buffer info-buf)
+ ;;(switch-in-other-buffer cust-buf)
+ (balance-windows))))
+
+(defvar lisp-find-map)
+(define-prefix-command 'lisp-find-map)
+(define-key help-map [?e] 'lisp-find-map)
+(define-key lisp-find-map [?a] 'my-anything-apropos)
+(define-key lisp-find-map [?c] 'finder-commentary)
+(define-key lisp-find-map [?e] 'view-echo-area-messages)
+(define-key lisp-find-map [?f] 'find-function)
+(define-key lisp-find-map [?F] 'find-face-definition)
+(define-key lisp-find-map [?d] 'my-describe-symbol)
+(define-key lisp-find-map [?i] 'info-apropos)
+(define-key lisp-find-map [?k] 'find-function-on-key)
+(define-key lisp-find-map [?l] 'find-library)
+(define-key lisp-find-map [?s] 'scratch)
+(define-key lisp-find-map [?v] 'find-variable)
;;;_. Post initialization
-(unless (null window-system)
+(when window-system
(add-hook 'after-init-hook 'emacs-min)
-
- (add-hook 'after-init-hook 'session-initialize t)
(add-hook 'after-init-hook 'server-start t)
- (add-hook 'after-init-hook 'edit-server-start t)
-
(add-hook 'after-init-hook
(lambda ()
(org-agenda-list)
(org-fit-agenda-window)
(org-resolve-clocks)) t))
-(add-hook 'after-init-hook 'override-global-mode)
-
;; Local Variables:
;; mode: emacs-lisp
;; mode: allout
-;; after-save-hook: (byte-recompile-file)
+;; after-save-hook: (my-byte-recompile-file)
;; outline-regexp: "^;;;_\\([,. ]+\\)"
;; End:
View
46 init.el
@@ -5,16 +5,42 @@
(load "~/.emacs.d/load-path")
- ;; ;; This file loads Org-mode and then loads the rest of our Emacs
- ;; ;; initialization from Emacs lisp embedded in literate Org-mode files.
- ;;
- ;; (require 'org)
- ;; (require 'ob-tangle)
- ;;
- ;; ;; load up all literate org-mode files in this directory
- ;; (mapc #'org-babel-load-file
- ;; (directory-files user-emacs-directory t "\\.org$"))
+ (defmacro use-package (name &rest args)
+ (let ((commands (plist-get args :commands))
+ (init-body (plist-get args :init))
+ (config-body (plist-get args :config))
+ (diminish-var (plist-get args :diminish))
+ (name-string (if (stringp name) name
+ (symbol-name name))))
+ (if diminish-var
+ (setq config-body
+ `(progn
+ ,config-body
+ (ignore-errors (diminish (quote ,diminish-var))))))
+ (if (or commands (plist-get args :defer))
+ (let (form)
+ (unless (listp commands)
+ (setq commands (list commands)))
+ (dolist (command commands)
+ (add-to-list
+ 'form `(autoload (function ,command)
+ ,name-string nil t)))
+ `(progn
+ ,@form
+ ,init-body
+ (eval-after-load ,name-string
+ (quote ,config-body))))
+ `(when ,(if (stringp name)
+ `(load ,name t)
+ `(require ',name nil t))
+ ,init-body
+ ,config-body))))
- (load "~/.emacs.d/emacs"))
+ (put 'use-package 'lisp-indent-function 1)
+
+ (font-lock-add-keywords 'emacs-lisp-mode
+ '(("(use-package\\>" . font-lock-keyword-face)))
+
+ (load "~/.emacs.d/emacs"))
;;; init.el ends here
View
0  site-lisp/xml-rpc.el → lib/xml-rpc.el
File renamed without changes
View
45 lisp/misc.el
@@ -0,0 +1,45 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defadvice ido-visit-buffer (before switch-to-buffers-workgroup
+ (buffer method &optional record)
+ activate)
+ "If a workgroup is showing BUFFER, switch to it first"
+ (wg-aif (wg-find-buffer (if (bufferp buffer)
+ (buffer-name buffer)
+ buffer))
+ (ignore-errors
+ (wg-switch-to-workgroup it))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;;_ , modeline-posn
+
+;; (size-indication-mode)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(eval-when-compile
+ (require 'ace-jump-mode))
+
+(defun quick-jump-char (&optional prefix no-ace-jump)
+ (interactive "P")
+ (let* ((query-char (event-basic-type last-command-event))
+ (regexp (regexp-quote (char-to-string query-char)))
+ (ace-jump-mode-hook
+ (list (function
+ (lambda ()
+ (define-key overriding-local-map
+ [(alt ?-)]
+ (function
+ (lambda (&optional prefix)
+ (interactive "P")
+ (ace-jump-done)
+ (quick-jump-char prefix)))))))))
+ (if (looking-at regexp)
+ (forward-char))
+ (re-search-forward regexp)
+ (backward-char)
+ (unless no-ace-jump
+ (ace-jump-do (regexp-quote (char-to-string query-char))))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
View
17 load-path.el
@@ -2,15 +2,21 @@
(defconst user-lisp-directory
(expand-file-name "lisp/" user-emacs-directory))
+(defconst user-lib-directory
+ (expand-file-name "lib/" user-emacs-directory))
(defconst user-site-lisp-directory
(expand-file-name "site-lisp/" user-emacs-directory))
+(defconst user-unused-directory
+ (expand-file-name "unused/" user-emacs-directory))
(defconst user-override-directory
(expand-file-name "override/" user-emacs-directory))
;; Add top-level lisp directories, in case they were not setup by the
;; environment.
(dolist (dir (list user-lisp-directory
+ user-lib-directory
user-site-lisp-directory
+ user-unused-directory
user-override-directory))
(dolist (entry (directory-files-and-attributes dir))
(if (cadr entry)
@@ -28,12 +34,13 @@
;; Packages with Lisp code in subdirectories...
"site-lisp/anything/extensions/"
- "site-lisp/auctex/preview/"
- "site-lisp/doxymacs/lisp/"
- "site-lisp/ess/lisp/"
- "site-lisp/ghc-mod/elisp/"
"site-lisp/session/lisp/"
- "site-lisp/slime/contrib/"
+
+ "unused/auctex/preview/"
+ "unused/doxymacs/lisp/"
+ "unused/ess/lisp/"
+ "unused/ghc-mod/elisp/"
+ "unused/slime/contrib/"
;; Packages located elsewhere on the system...
"/usr/local/share/emacs/site-lisp/"
View
42 settings.el
@@ -1,8 +1,10 @@
+;; '(gnus-select-method (quote (nnimap "Local" (nnimap-address "localhost") (nnimap-user "johnw") (nnimap-server-port 9143) (nnimap-stream network))))
+
(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.
'(Info-fit-frame-flag nil)
'(TeX-PDF-mode t)
'(TeX-engine (quote xetex))
@@ -10,14 +12,17 @@
'(TeX-view-program-list (quote (("Skim" ("osascript" " ~/bin/skim-gotopage.script" " %O" (mode-io-correlate " %(outpage)"))))))
'(TeX-view-program-selection (quote (((output-dvi style-pstricks) "dvips and gv") (output-dvi "xdvi") (output-pdf "Skim") (output-html "xdg-open"))))
'(abbrev-file-name "~/.emacs.d/abbrev_defs")
+ '(abbrev-mode t t)
'(ac-auto-show-menu nil)
'(ac-auto-start 3)
'(ac-clang-flags (quote ("-isystem" "/usr/local/include/c++/v1" "-isystem" "/usr/local/include/boost-1_49" "-isystem" "/opt/local/include" "-I/Users/johnw/Products/ledger/debug" "-include" "/Users/johnw/Products/ledger/debug/system.hh" "-I/Users/johnw/Projects/ledger/src" "-I/Users/johnw/Projects/ledger/lib" "-I/Users/johnw/Projects/ledger/lib/utfcpp/source")))
'(ac-comphist-file "/Users/johnw/.emacs.d/data/ac-comphist.dat")
'(ac-ignore-case nil)
+ '(ac-use-fuzzy nil)
'(after-save-hook (quote (executable-make-buffer-file-executable-if-script-p)))
'(align-c++-modes (quote (csharp-mode c++-mode c-mode java-mode groovy-mode)))
'(align-to-tab-stop nil)
+ '(allout-auto-activation t)
'(allout-command-prefix ".")
'(ansi-color-names-vector ["black" "red" "green" "brown" "blue" "magenta" "blue" "white"])
'(auto-compression-mode t nil (jka-compr))
@@ -73,6 +78,7 @@
'(dired-listing-switches "-lh")
'(dired-load-hook (quote ((lambda nil (load "dired-x")))))
'(dired-no-confirm (quote (byte-compile chgrp chmod chown copy hardlink symlink touch)))
+ '(dired-omit-files "^\\.?#\\|^\\.\\(DS_Store\\|localized\\|AppleDouble\\)$\\|^\\.\\.$")
'(dired-omit-mode nil t)
'(dired-recursive-copies (quote always))
'(dired-recursive-deletes (quote always))
@@ -89,7 +95,7 @@
'(erc-auto-query (quote window-noselect))
'(erc-autoaway-message "I'm away (after %i seconds of idle-time)")
'(erc-autoaway-mode t)
- '(erc-autojoin-channels-alist (quote (("localhost" "&bitlbee") ("freenode.net" "#boost" "#ledger") ("irc.oftc.net" "#llvm") ("irc.schmorp.de" "#schmorpforge"))))
+ '(erc-autojoin-channels-alist (quote (("localhost" "&bitlbee") ("freenode.net" "#macports" "#boost" "#ledger") ("irc.oftc.net" "#llvm") ("irc.schmorp.de" "#schmorpforge"))))
'(erc-autojoin-mode t)
'(erc-fools (quote ("JordiGH")))
'(erc-generate-log-file-name-function (quote erc-generate-log-file-name-short))
@@ -129,7 +135,6 @@
'(eval-expr-print-function (quote pp) t)
'(exec-path (quote ("/Users/johnw/bin" "/usr/local/bin" "/opt/local/libexec/git-core" "/opt/local/bin" "/usr/bin" "/bin" "/usr/local/sbin" "/opt/local/sbin" "/usr/sbin" "/sbin" "/usr/X11R6/bin")))
'(fill-column 78)
- '(find-directory-functions (quote (dired-noselect)))
'(find-ls-option (quote ("-print0 | xargs -0 ls -ld" . "-ld")))
'(find-ls-subdir-switches "-alh")
'(flyspell-abbrev-p nil)
@@ -140,7 +145,6 @@
'(frame-title-format (quote (:eval (concat (if buffer-file-name default-directory "%b") " " (number-to-string (cdr (assq (quote width) (frame-parameters)))) "x" (number-to-string (cdr (assq (quote height) (frame-parameters))))))) t)
'(gdb-find-source-frame t)
'(gdb-same-frame nil)
- '(global-auto-complete-mode t)
'(global-auto-revert-mode t)
'(global-font-lock-mode t nil (font-lock))
'(global-whitespace-mode t)
@@ -191,7 +195,7 @@ http://www.boostpro.com")))))
'(gnus-score-expiry-days 30)
'(gnus-score-find-score-files-function (quote (gnus-score-find-hierarchical)))
'(gnus-select-group-hook (quote (gnus-group-set-timestamp)))
- '(gnus-select-method (quote (nnimap "Local" (nnimap-address "localhost") (nnimap-user "johnw") (nnimap-server-port 9143) (nnimap-stream network))))
+ '(gnus-select-method (quote (nnimap "Local" (nnimap-stream shell))))
'(gnus-signature-separator (quote ("^-- $" "^-- *$" "^_____+$")))
'(gnus-simplify-subject-functions (quote (gnus-simplify-subject-fuzzy)))
'(gnus-sort-gathered-threads-function (quote gnus-thread-sort-by-date) t)
@@ -283,7 +287,7 @@ http://www.boostpro.com")))))
'(message-fill-column 78)
'(message-interactive t)
'(message-mail-alias-type nil)
- '(message-mode-hook (quote (abbrev-mode footnote-mode turn-on-auto-fill turn-on-flyspell turn-on-orgstruct (lambda nil (set-fill-column 78)) (lambda nil (column-marker-1 78)))))
+ '(message-mode-hook (quote (abbrev-mode footnote-mode turn-on-auto-fill turn-on-flyspell turn-on-orgstruct (lambda nil (set-fill-column 78)))))
'(message-send-mail-function (quote message-send-mail-with-sendmail))
'(message-send-mail-partially-limit nil)
'(message-sendmail-envelope-from (quote header))
@@ -410,7 +414,7 @@ SCHEDULED: %t
'(redisplay-dont-pause t t)
'(regex-tool-backend (quote perl))
'(runner-init-file "~/.emacs.d/data/runner-conf.el")
- '(safe-local-variable-values (quote ((after-save-hook byte-recompile-file) (after-save-hook git-commit-changes) (org-refer-by-number-id . "1C72AB51-33C2-4FF8-9367-2B494D125027"))))
+ '(safe-local-variable-values (quote ((after-save-hook my-byte-recompile-file) (after-save-hook git-commit-changes) (org-refer-by-number-id . "1C72AB51-33C2-4FF8-9367-2B494D125027"))))
'(same-window-buffer-names (quote ("*eshell*" "*shell*" "*mail*" "*inferior-lisp*" "*ielm*" "*scheme*")))
'(sc-citation-leader "")
'(sc-confirm-always-p nil)
@@ -420,6 +424,7 @@ SCHEDULED: %t
'(scroll-bar-mode nil)
'(send-mail-function (quote sendmail-send-it))
'(session-globals-exclude (quote (load-history flyspell-auto-correct-ring)))
+ '(session-globals-include (quote ((kill-ring 10 nil) (session-file-alist 100 t) (file-name-history 200 nil) search-ring regexp-search-ring sr-history-registry)))
'(session-registers (quote (t (0 . 127))))
'(session-save-file "~/.emacs.d/data/session")
'(session-use-package t nil (session))
@@ -433,6 +438,13 @@ SCHEDULED: %t
'(smtpmail-smtp-service 587 t)
'(smtpmail-starttls-credentials (quote (("mail.johnwiegley.com" 587 nil nil) ("smtp.gmail.com" 587 nil nil))))
'(sql-sqlite-program "sqlite3")
+ '(sr-attributes-display-mask (quote (nil nil t nil nil nil)))
+ '(sr-listing-switches "--time-style=locale --group-directories-first -alDhgG")
+ '(sr-loop-use-popups nil)
+ '(sr-popviewer-style (quote single-frame))
+ '(sr-show-file-attributes nil)
+ '(sr-show-hidden-files t)
+ '(sr-use-commander-keys nil)
'(ssl-certificate-verification-policy 1)
'(svn-status-hide-unmodified t)
'(tags-apropos-verbose t)
@@ -470,7 +482,7 @@ SCHEDULED: %t
'(wg-query-for-save-on-workgroups-mode-exit nil)
'(whitespace-action (quote (report-on-bogus)))
'(whitespace-auto-cleanup t)
- '(whitespace-global-modes t)
+ '(whitespace-global-modes (quote (not org-mode erc-mode dired-mode)))
'(whitespace-line-column 80)
'(whitespace-rescan-timer-time nil)
'(whitespace-silent t)
@@ -485,10 +497,10 @@ SCHEDULED: %t
'(zencoding-preview-default nil))
(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.
'(diff-added ((t (:foreground "DarkGreen"))))
'(diff-added2 ((t (:foreground "SeaGreen"))))
'(diff-changed ((t (:foreground "MediumBlue"))))
View
228 site-lisp/all.el
@@ -1,228 +0,0 @@
-;;; all.el --- Edit all lines matching a given regexp.
-
-;; Copyright (C) 1985, 1986, 1987, 1992, 1994 Free Software Foundation, Inc.
-;; Copyright (C) 1994 Per Abrahamsen
-
-;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
-;; Version: $Id: all.el,v 5.2 1997/03/04 10:29:42 abraham Exp $
-;; Keywords: matching
-
-;; LCD Archive Entry:
-;; all|Per Abrahamsen|abraham@dina.kvl.dk|
-;; Edit all lines matching a given regexp|
-;; $Date: 1997/03/04 10:29:42 $|$Revision: 5.2 $|~/misc/all.Z|
-
-;; 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 2, 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 this program; if not, write to the Free Software
-;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;; Comments:
-
-;; Just like occur, except that changes in the *All* buffer is
-;; propagated to the original buffer.
-
-;; I also added highlighting of the matches.
-
-;; You can no longer use mouse-2 to find a match in the original file,
-;; since the default definition of mouse to is useful.
-;; However, `C-c C-c' still works.
-
-;; Line numbers are not listed in the *All* buffer.
-
-;; Ok, it is _not_ just like occur.
-
-;; Some limitations:
-
-;; - Undo in the *All* buffer is an ordinary change in the original.
-;; - Changes to the original buffer is not reflected in the *All* buffer.
-;; - A single change in the *All* buffer must be limited to a single match.
-
-;; Requires GNU Emacs 19.23 or later.
-
-;;; Code:
-
-(defvar all-mode-map ())
-
-(if all-mode-map
- ()
- (setq all-mode-map (make-sparse-keymap))
- (define-key all-mode-map "\C-c\C-c" 'all-mode-goto))
-
-(defvar all-buffer nil)
-
-(defun all-mode ()
- "Major mode for output from \\[all].
-
-All changes made in this buffer will be propagated to the buffer where
-you ran \\[all].
-
-Press \\[all-mode-goto] to go to the same spot in the original buffer."
- (kill-all-local-variables)
- (use-local-map all-mode-map)
- (setq major-mode 'all-mode)
- (setq mode-name "All")
- (make-local-variable 'all-buffer)
- (run-hooks 'all-mode-hook))
-
-(defun all-mode-find (pos)
- ;; Find position in original buffer corresponding to POS.
- (let ((overlay (all-mode-find-overlay pos)))
- (if overlay
- (+ (marker-position (overlay-get overlay 'marker))
- (- pos (overlay-start overlay))))))
-
-(defun all-mode-find-overlay (pos)
- ;; Find the overlay containing POS.
- (let ((overlays (overlays-at pos)))
- (while (and overlays (null (overlay-get (car overlays) 'marker)))
- (setq overlays (cdr overlays)))
- (car-safe overlays)))
-
-(defun all-mode-goto ()
- "Move point to the corresponding position in the original buffer."
- (interactive)
- (let ((pos (all-mode-find (point))))
- (if pos
- (pop-to-buffer all-buffer)
- (error "This text is not from the original buffer"))
- (goto-char pos)))
-
-(defvar all-initialization-p nil)
-
-(defun all-before-change-function (from to)
- ;; Check that change is legal
- (and all-buffer
- (not all-initialization-p)
- (let ((start (all-mode-find-overlay from))
- (end (all-mode-find-overlay to)))
- (not (and start (eq start end))))
- (error "Changes should be limited to a single text piece")))
-
-(add-hook 'before-change-functions 'all-before-change-function)
-
-(defun all-after-change-function (from to length)
- ;; Propagate changes from *All* buffer.
- (and all-buffer
- (null all-initialization-p)
- (let ((buffer (current-buffer))
- (pos (all-mode-find from)))
- (if pos
- (progn
- (set-buffer all-buffer)
- (delete-region pos (+ pos length))
- (save-excursion
- (goto-char pos)
- (insert-buffer-substring buffer from to))
- (set-buffer buffer))))))
-
-(add-hook 'after-change-functions 'all-after-change-function)
-
-;;;###autoload
-(defun all (regexp &optional nlines)
- "Show all lines in the current buffer containing a match for REGEXP.
-
-If a match spreads across multiple lines, all those lines are shown.
-
-Each line is displayed with NLINES lines before and after, or -NLINES
-before if NLINES is negative.
-NLINES defaults to `list-matching-lines-default-context-lines'.
-Interactively it is the prefix arg.
-
-The lines are shown in a buffer named `*All*'.
-Any changes made in that buffer will be propagated to this buffer."
- (interactive (list (let* ((default (car regexp-history))
- (input
- (read-from-minibuffer
- (if default
- (format
- "Edit lines matching regexp (default `%s'): " default)
- "Edit lines matching regexp: ")
- nil nil nil
- 'regexp-history)))
- (if (> (length input) 0) input
- (setcar regexp-history default)))
- current-prefix-arg))
- (setq nlines (if nlines (prefix-numeric-value nlines)
- list-matching-lines-default-context-lines))
- (setq all-initialization-p t)
- (let ((first t)
- (buffer (current-buffer))
- (prevend nil)
- (prevstart nil)
- (prevpos (point-min)))
- (with-output-to-temp-buffer "*All*"
- (save-excursion
- (set-buffer standard-output)
- (all-mode)
- (setq all-buffer buffer)
- (insert "Lines matching ")
- (prin1 regexp)
- (insert " in buffer " (buffer-name buffer) ?. ?\n)
- (insert "--------\n"))
- (if (eq buffer standard-output)
- (goto-char (point-max)))
- (save-excursion
- (beginning-of-buffer)
- ;; Find next match, but give up if prev match was at end of buffer.
- (while (and (not (= prevpos (point-max)))
- (re-search-forward regexp nil t))
- (goto-char (match-beginning 0))
- (beginning-of-line)
- (setq prevpos (point))
- (goto-char (match-end 0))
- (let* ((start (save-excursion
- (goto-char (match-beginning 0))
- (forward-line (if (< nlines 0) nlines (- nlines)))
- (point)))
- (end (save-excursion
- (goto-char (match-end 0))
- (if (> nlines 0)
- (forward-line (1+ nlines))
- (forward-line 1))
- (point)))
- marker)
- (cond ((null prevend)
- (setq prevstart start
- prevend end))
- ((> start prevend)
- (all-insert)
- (setq prevstart start
- prevend end))
- (t
- (setq prevend end)))))
- (if prevend
- (all-insert)))))
- (setq all-initialization-p nil))
-
-(defun all-insert ()
- ;; Insert match.
- (save-excursion
- (setq marker (make-marker))
- (set-marker marker prevstart)
- (set-buffer standard-output)
- (let ((from (point))
- to)
- (insert-buffer-substring buffer prevstart prevend)
- (setq to (point))
- (overlay-put (make-overlay from to) 'marker marker)
- (goto-char from)
- (while (re-search-forward regexp to t)
- (overlay-put (make-overlay (match-beginning 0) (match-end 0))
- 'face 'highlight))
- (goto-char to)
- (if (> nlines 0)
- (insert "--------\n")))))
-
-(provide 'all)
-
-;;; all.el ends here
1  site-lisp/auto-complete-clang
@@ -1 +0,0 @@
-Subproject commit d457ef42ad88148dd4e483d872b0ae483bb6f9f1
View
2  site-lisp/backup-each-save.el
@@ -120,7 +120,7 @@ on the system \"/user@host:\"."
(subst-char-in-string ?/ ?! containing-dir))))
(when (not (file-exists-p backup-container))
(make-directory backup-container t))
- (format "%s%s-%s" backup-container basename
+ (format "%s%s~%s~" backup-container basename
(format-time-string backup-each-save-time-format))))
(provide 'backup-each-save)
View
0  site-lisp/lisp/cldoc.el → site-lisp/cldoc.el
File renamed without changes
View
0  site-lisp/drewadams/col-highlight.el → site-lisp/col-highlight.el
File renamed without changes
View
245 site-lisp/column-marker.el
@@ -1,245 +0,0 @@
-;;; column-marker.el --- Highlight certain character columns
-;;
-;; Filename: column-marker.el
-;; Description: Highlight certain character columns
-;; Author: Rick Bielawski <rbielaws@i1.net>
-;; Maintainer: Rick Bielawski <rbielaws@i1.net>
-;; Created: Tue Nov 22 10:26:03 2005
-;; Version:
-;; Last-Updated: Fri Aug 18 17:42:04 2006 (-25200 Pacific Daylight Time)
-;; By: dradams
-;; Update #: 270
-;; Keywords: tools convenience highlight
-;; Compatibility: GNU Emacs 21, GNU Emacs 22
-;;
-;; Features that might be required by this library:
-;;
-;; None
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Highlights the background at a given character column.
-;;
-;; Commands `column-marker-1', `column-marker-2', and
-;; `column-marker-3' each highlight a given column (using different
-;; background colors, by default).
-;;
-;; - With no prefix argument, each highlights the current column
-;; (where the cursor is).
-;;
-;; - With a non-negative numeric prefix argument, each highlights that
-;; column.
-;;
-;; - With plain `C-u' (no number), each turns off its highlighting.
-;;
-;; - With `C-u C-u', each turns off all column highlighting.
-;;
-;; If two commands highlight the same column, the last-issued
-;; highlighting command shadows the other - only the last-issued
-;; highlighting is seen. If that "topmost" highlighting is then
-;; turned off, the other highlighting for that column then shows
-;; through.
-;;
-;; Examples:
-;;
-;; M-x column-marker-1 highlights the column where the cursor is, in
-;; `column-marker-1-face'.
-;;
-;; C-u 70 M-x column-marker-2 highlights column 70 in
-;; `column-marker-2-face'.
-;;
-;; C-u 70 M-x column-marker-3 highlights column 70 in
-;; `column-marker-3-face'. The `column-marker-2-face' highlighting no
-;; longer shows.
-;;
-;; C-u M-x column-marker-3 turns off highlighting for column-marker-3,
-;; so `column-marker-2-face' highlighting shows again for column 70.
-;;
-;; C-u C-u M-x column-marker-1 (or -2 or -3) erases all column highlighting.
-;;
-;; These commands use `font-lock-fontify-buffer', so syntax
-;; highlighting (`font-lock-mode') must be turned on. There might be
-;; a performance impact during refontification.
-;;
-;;
-;; Installation: Place this file on your load path, and put this in
-;; your init file (`.emacs'):
-;;
-;; (require 'column-marker)
-;;
-;; Other init file suggestions (examples):
-;;
-;; ;; Highlight column 80 in foo mode.
-;; (add-hook foo-mode-hook (lambda () (interactive) (column-marker-1 80)))
-;;
-;; ;; Use `C-c m' interactively to highlight with `column-marker-1-face'.
-;; (global-set-key [?\C-c ?m] 'column-marker-1)
-;;
-;;
-;; Please report any bugs!
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;; 2006/08/18 dadams
-;; column-marker-create: Add newlines to doc-string sentences.
-;; 2005/12/31 dadams
-;; column-marker-create: Add marker to column-marker-vars inside the defun,
-;; so it is done in the right buffer, updating column-marker-vars buffer-locally.
-;; column-marker-find: Corrected comment. Changed or to progn for clarity.
-;; 2005/12/29 dadams
-;; Updated wrt new version of column-marker.el (mulit-column characters).
-;; Corrected stray occurrences of column-marker-here to column-marker-1.
-;; column-marker-vars: Added make-local-variable.