public
Description: Phil Hagelberg's personal dotfiles collection: the product of years of accumulated obsessive minor tweaks. Mostly Emacs Lisp.
Homepage: http://technomancy.us
Clone URL: git://github.com/technomancy/dotfiles.git
upgraded to latest gitsum version
technomancy (author)
Mon Apr 14 14:32:09 -0700 2008
commit  17896fea0a07bb226a5acfe3fe5e3cf77fb8b650
tree    dff8111e8820ec089d08acdd3268db241ea09667
parent  8cfcba35f182b87b12ada8c6f80ea0344f6e9217
0
...
26
27
28
29
30
31
32
33
34
35
36
 
 
37
38
39
...
42
43
44
45
46
47
 
 
 
 
 
 
48
49
50
51
52
53
54
 
 
55
 
 
56
57
58
...
62
63
64
65
66
67
68
69
70
71
72
73
74
 
75
76
77
...
85
86
87
 
 
 
88
89
90
91
92
93
 
 
 
 
 
 
94
95
 
96
97
98
99
100
...
103
104
105
106
107
108
109
110
111
 
 
 
112
113
114
115
116
117
118
119
 
 
120
121
122
...
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
210
211
212
213
 
 
 
 
 
 
 
214
215
216
217
218
219
220
221
222
223
224
225
226
 
 
 
227
228
 
 
 
 
 
229
230
 
 
 
 
231
232
233
 
234
235
236
237
 
 
 
238
239
 
...
26
27
28
 
 
 
 
 
 
 
 
29
30
31
32
33
...
36
37
38
 
 
 
39
40
41
42
43
44
45
46
47
 
48
 
 
49
50
51
52
53
54
55
56
...
60
61
62
 
 
 
 
 
 
63
64
65
 
66
67
68
69
...
77
78
79
80
81
82
83
 
 
 
 
 
84
85
86
87
88
89
90
 
91
92
 
93
94
95
...
98
99
100
 
101
 
 
 
 
102
103
104
105
 
 
 
 
 
 
 
106
107
108
109
110
...
113
114
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
 
189
 
190
191
192
193
194
195
196
197
198
 
 
199
 
200
 
 
201
 
 
 
202
203
204
205
206
 
207
208
209
210
211
212
213
214
215
216
217
218
219
 
220
221
 
 
 
222
223
224
225
 
226
0
@@ -26,14 +26,8 @@
0
 ;; with uniform syntax and a real macro system.
0
 ;; - http://ratpoison.nongnu.org/inspiration.html
0
 
0
-;;; On with the show:
0
-
0
-;;; Fix for a bug in CVS Emacs 2 April 08; remove when fixed upstream:
0
-(defun handle-shift-selection ())
0
-
0
-;;;
0
-;;; server singleton
0
-;;;
0
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0
+;; server singleton
0
 
0
 (unless (string-equal "root" (getenv "USER"))
0
   (when (and (> emacs-major-version 22)
0
@@ -42,17 +36,21 @@
0
                           'listen))))
0
     (server-start)))
0
 
0
-;;;
0
-;;; load-path, autoloads, and requires
0
-;;;
0
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0
+
0
+;;; Fix for a bug in CVS Emacs 2 April 08; remove when fixed upstream:
0
+(defun handle-shift-selection ())
0
+
0
+(toggle-debug-on-error)
0
 
0
 (add-to-list 'load-path "~/.emacs.d")
0
 (add-to-list 'load-path "~/.emacs.d/jabber")
0
-(add-to-list 'load-path "~/.emacs.d/nxml/nxml-mode-20041004")
0
 
0
-;; Regenerate the autoload file if it doesn't exist or it's too
0
-;; old. (2 weeks or so)
0
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0
+;; loading modes
0
 
0
+;;; Regenerate the autoload file if it doesn't exist or it's too
0
+;;; old. (2 weeks or so)
0
 (let ((autoload-file "~/.emacs.d/loaddefs.el"))
0
   (if (or (not (file-exists-p autoload-file))
0
    (< (+ (car (nth 5 (file-attributes autoload-file))) 20)
0
@@ -62,16 +60,10 @@
0
   (update-directory-autoloads "~/.emacs.d/")))
0
   (load autoload-file))
0
 
0
-(autoload 'nxhtml-mode "nxml/autostart" "" t)
0
-(autoload 'nxml-mode "nxml/autostart" "" t)
0
-(autoload 'ruby-mode "ruby-mode" "" t)
0
-(autoload 'javascript-mode "javascript" "" t)
0
-
0
-(autoload 'w3m "w3m-load" "" t)
0
 (autoload 'yaml-mode "yaml-mode")
0
 (autoload 'moz-minor-mode "moz" "Mozilla Minor and Inferior Mozilla Modes" t)
0
 (autoload 'whitespace-mode "whitespace" "Toggle whitespace visualization." t)
0
-(autoload 'tail-file "tail" "Tail a file." t)
0
+(autoload 'tail-file "tail.el" "Tail a file." t)
0
 (autoload 'lisppaste-paste-region "lisppaste" "" t)
0
 (autoload 'top-mode "top-mode" "" t)
0
 (autoload 'jabber-connect "jabber" "" t)
0
@@ -85,16 +77,19 @@
0
 (require 'which-func)
0
 (require 'cc-defs)
0
 
0
+;; TODO: make this an autoload; it's slow!
0
+;;(load "nxml/autostart.el")
0
+
0
 (eval-after-load 'vc
0
- '(progn
0
- (require 'gitsum)
0
- (require 'log-view)
0
- (define-key log-view-mode-map (kbd "RET") 'log-view-find-revision)
0
- (define-key vc-annotate-mode-map (kbd "RET") 'vc-annotate-find-revision-at-line)))
0
+ '(progn (require 'vc-buttons)
0
+ (require 'gitsum)))
0
+
0
+;; some boxes won't have this installed from CVS
0
+;; if that is so, try roastbeef install w3m && roastbeef install emacs-w3m
0
+(ignore-errors (require 'w3m-load))
0
 
0
-;;
0
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0
 ;; My support files and configurations
0
-;;
0
 
0
 (require 'my-calendar)
0
 (require 'my-eshell)
0
@@ -103,20 +98,13 @@
0
 (require 'my-registers)
0
 (require 'my-misc)
0
 (require 'my-hook-setup)
0
-(require 'my-lisp)
0
 
0
-(eval-after-load 'ruby-mode '(require 'my-ruby))
0
-(eval-after-load 'javascript-mode '(require 'my-js))
0
-(eval-after-load 'jabber-connect '(load "jabber-config"))
0
-(eval-after-load 'irc '(load "rcirc-config"))
0
+(require 'my-ruby)
0
+(require 'my-lisp)
0
+(require 'my-js)
0
 
0
-;; Well, these autoloads have to get invoked somehow.
0
-(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
0
-(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
0
-(add-to-list 'auto-mode-alist '("\\.js$" . javascript-mode))
0
-(add-to-list 'auto-mode-alist '("\\.xml$" . nxml-mode))
0
-(add-to-list 'auto-mode-alist '("\\.html$" . nxhtml-mode))
0
-(add-to-list 'auto-mode-alist '("\\.rhtml$" . nxhtml-mode))
0
+(load "jabber-config")
0
+(load "rcirc-config")
0
 
0
 (setq system-specific-config
0
       (concat "~/.emacs.d/"
0
@@ -125,115 +113,114 @@
0
 (if (file-exists-p system-specific-config)
0
     (load system-specific-config))
0
 
0
-;;;
0
-;;; Cheat Sheet
0
-;;;
0
-
0
-;;; General
0
-;; M-z zap to char
0
-;; C-u C-SPC jump to previous edit
0
-;; M-/ autocomplete word
0
-;; M-! insert output of shell command
0
-;; M-| replace region with shell output
0
-;; M-x thumbs
0
-;; M-x follow-mode
0
-
0
-;;; Custom bindings
0
-;; C-c \ align-regexp
0
-;; C-c C-r revert buffer
0
-;; C-x M-k kill buffer and window
0
-;; C-x M-f find file in other window
0
-;; C-c d toggle-dedicated-window
0
-;; C-c p message point
0
-
0
-;;; Rectangles
0
-;; C-x r k Rectangle kill
0
-;; C-x r y Rectangle yank
0
-;; C-x r c Rectangle clear (replace with space)
0
-;; C-x r o Insert space rectangle
0
-;; C-x r t Replace rectangle with string
0
-
0
-;;; temp macros
0
-;; C-m C-m to start recording
0
-;; C-m C-s to stop
0
-;; C-m C-p to play
0
-
0
-;;; Macros
0
-;; C-m C-r to begin
0
-;; name it, and do stuff
0
-;; C-s to save
0
-
0
-;;; Ruby
0
-;; M-C-p, M-C-n back and forward blocks
0
-;; C-c C-s irb when in ruby-mode
0
-;; C-c C-r Send region to inf-ruby
0
-;; C-c M-r Send region to inf-ruby and switch to buffer
0
-;; C-c C-l Load file in ruby
0
-;; C-c C-x Send definition
0
-
0
-;;; Display
0
-;; C-u N C-x $ only display lines with less than N spaces of indentation
0
-;; C-x $ disable above
0
-;; C-x n n narrow visibility of buffer to region
0
-;; C-x n w widen to full buffer
0
-
0
-;;; Dired
0
-;; mark with 'm', press 'Q' for multi-file find/replace
0
-;; C-j launch dired when ido-mode is enabled
0
-
0
-;;; Gnus Namazu
0
-;; G G gnus keyword search
0
-;; G T show context in keyword search
0
-
0
-;; list-colors-display
0
-
0
-;;; VC
0
-;; C-x v g - blame (V to toggle committer data)
0
-;; C-x v d - dired (v t to show all files)
0
-;; C-x v = - diff (C-u to specify revision)
0
-;; C-x v ~ - visit specific revision
0
-;; C-x v l - log
0
-;; C-x v d - vc-status
0
-
0
-;;; Eshell
0
-;; piping: ifconfig > #<buffer interfaces>
0
-;; sudo: cd/sudo::
0
-
0
-;; Well, we already have `C-x r w R' (window-configuration-to-register)
0
-;; and `C-x r f R' (frame-configuration-to-register) for saving window
0
-;; configurations, and `C-x r j R' for restoring them.
0
-
0
-;; Profiling: time emacs -e save-buffers-kill-terminal
0
-
0
-;;;
0
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0
+;; Cheat Sheet
0
+
0
+;;; M-z zap to char
0
+;;; C-u C-SPC jump to previous edit
0
+;;; M-/ autocomplete word
0
+;;; M-! insert output of shell command
0
+;;; M-| replace region with shell output
0
+;;; M-x thumbs
0
+;;; M-x follow-mode
0
+
0
+;;;; Rectangles
0
+;;; C-x r k Rectangle kill
0
+;;; C-x r y Rectangle yank
0
+;;; C-x r c Rectangle clear (replace with space)
0
+;;; C-x r o Insert space rectangle
0
+;;; C-x r t Replace rectangle with string
0
+
0
+;;;; temp macros
0
+;;; C-m C-m to start recording
0
+;;; C-m C-s to stop
0
+;;; C-m C-p to play
0
+
0
+;;;; Macros
0
+;;; C-m C-r to begin
0
+;;; name it, and do stuff
0
+;;; C-s to save
0
+
0
+;;;; Ruby
0
+;;; M-C-p, M-C-n back and forward blocks
0
+;;; C-c C-s irb when in ruby-mode
0
+;;; C-c C-r Send region to inf-ruby
0
+;;; C-c M-r Send region to inf-ruby and switch to buffer
0
+;;; C-c C-l Load file in ruby
0
+;;; C-c C-x Send definition
0
+
0
+;;;; Display
0
+;;; C-u N C-x $ only display lines with less than N spaces of indentation
0
+;;; C-x $ disable above
0
+;;; C-x n n narrow visibility of buffer to region
0
+;;; C-x n w widen to full buffer
0
+
0
+;;;; Dired
0
+;;; mark with 'm', press 'Q' for multi-file find/replace
0
+;;; C-j launch dired when ido-mode is enabled
0
+
0
+;;;; Gnus Namazu
0
+;;; G G gnus keyword search
0
+;;; G T show context in keyword search
0
+
0
+;;; list-colors-display
0
+
0
+;;;; VC
0
+;;; C-x v g - blame (V to toggle committer data)
0
+;;; C-x v d - dired (v t to show all files)
0
+;;; C-x v = - diff (C-u to specify revision)
0
+;;; C-x v ~ - visit specific revision
0
+;;; C-x v l - log
0
+;;; C-x v d - vc-status
0
+
0
+;;;; Eshell
0
+;;; piping: ifconfig > #<buffer interfaces>
0
+;;; sudo: cd/sudo::
0
+
0
+;;; sudo ionice -c3 -ppid
0
+
0
+;;; Well, we already have `C-x r w R' (window-configuration-to-register)
0
+;;; and `C-x r f R' (frame-configuration-to-register) for saving window
0
+;;; configurations, and `C-x r j R' for restoring them.
0
+
0
+;;; Profiling: time emacs -e save-buffers-kill-terminal
0
+
0
 ;;; TODO:
0
-;;;
0
 
0
-;; follow Stefan's advice wrt vc-buttons and log-view.el
0
 ;; look into adding hyperlinks to vc-blame
0
+
0
+;; find a better dark-on-light color scheme
0
+
0
+;; steal ZSS defadvice in setup-aliases.el for find-file-at-point
0
+
0
+;; fix whitespace-mode. augh. horrible.
0
+
0
 ;; fix twittering-mode bugs mentioned in file
0
-;; submit patched rcirc completion
0
-;; scpaste: use tramp functions, finish scpaste-window
0
 
0
-;; fix whitespace-mode config to not be horrible
0
 ;; allow edits to occur buffer to get propagated to original buffer
0
-;; pcomplete for: kill/killall, git, apt-get
0
-;; unify statuses in twitter and jabber
0
 
0
-;;; Minor
0
-
0
-;; find a better dark-on-light color scheme
0
 ;; make column-number-mode only active in coding buffers
0
+
0
+;; pcomplete for: kill/killall, git, apt-get
0
+
0
 ;; flymake for JS and Ruby
0
-;; steal ZSS defadvice in setup-aliases.el for find-file-at-point
0
+
0
+;; submit patched rcirc completion
0
+
0
+;; scpaste: use tramp functions, finish scpaste-window
0
+
0
 ;; fix ruby-get-old-input to not care about what the prompt looks like
0
 
0
+;; check out js2-mode.el: http://code.google.com/p/js2-mode/
0
+
0
+;; disable global-hl-line-mode for shell buffers?
0
+
0
 ;;; Long-term:
0
 
0
-;; figure out how to get nnml under version control w/o merge conflicts
0
+;; figure out how to get nnml in VC w/o merge conflicts
0
 
0
-;; do something about getting a better ruby highlighter:
0
-;; http://rubyforge.org/projects/ruby-tp-dw-gram/
0
-;; http://cedet.cvs.sourceforge.net/cedet/cedet/contrib/
0
+;;; do something about getting a better ruby highlighter:
0
+;;; http://rubyforge.org/projects/ruby-tp-dw-gram/
0
+;;; http://cedet.cvs.sourceforge.net/cedet/cedet/contrib/
0
 
0
-;; make an emacs peepcode
0
+;;; make an emacs peepcode
...
26
27
28
 
29
30
31
...
38
39
40
41
 
42
43
44
...
50
51
52
53
 
54
55
56
...
58
59
60
61
 
62
63
64
...
156
157
158
 
 
 
 
 
 
 
 
 
 
159
160
161
...
163
164
165
 
 
 
 
166
...
26
27
28
29
30
31
32
...
39
40
41
 
42
43
44
45
...
51
52
53
 
54
55
56
57
...
59
60
61
 
62
63
64
65
...
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
...
174
175
176
177
178
179
180
181
0
@@ -26,6 +26,7 @@
0
 (define-derived-mode gitsum-diff-mode diff-mode "gitsum"
0
   "Git summary mode is for preparing patches to a Git repository.
0
 This mode is meant to be activated by `M-x gitsum' or pressing `s' in git-status.
0
+\\{gitsum-diff-mode-shared-map}
0
 \\{gitsum-diff-mode-map}"
0
   ;; magic...
0
   (lexical-let ((ro-bind (cons 'buffer-read-only gitsum-diff-mode-shared-map)))
0
@@ -38,7 +39,7 @@ This mode is meant to be activated by `M-x gitsum' or pressing `s' in git-status
0
 
0
 ;; When git.el is loaded, hack into keymap.
0
 (when (boundp 'git-status-mode-map)
0
- (define-key git-status-mode-map "s" 'gitsum))
0
+ (define-key git-status-mode-map "s" 'gitsum-switch-from-git-status))
0
 
0
 ;; Undo doesn't work in read-only buffers else.
0
 (defun gitsum-undo ()
0
@@ -50,7 +51,7 @@ A numeric argument serves as a repeat count."
0
   (let ((inhibit-read-only t))
0
     (undo)))
0
 
0
-(defun gitsum-refresh ()
0
+(defun gitsum-refresh (&optional arguments)
0
   "Regenerate the patch based on the current state of the index."
0
   (interactive)
0
   (let ((inhibit-read-only t))
0
@@ -58,7 +59,7 @@ A numeric argument serves as a repeat count."
0
     (insert "# Directory: " default-directory "\n")
0
     (insert "# Use n and p to navigate and k to kill a hunk. u is undo, g will refresh.\n")
0
     (insert "# Edit the patch as you please and press 'c' to commit.\n\n")
0
- (let ((diff (shell-command-to-string "git diff")))
0
+ (let ((diff (shell-command-to-string (concat "git diff " arguments))))
0
       (if (zerop (length diff))
0
           (insert "## No changes. ##")
0
         (insert diff)
0
@@ -156,6 +157,16 @@ A numeric argument serves as a repeat count."
0
   (interactive)
0
   (git-status default-directory))
0
 
0
+(defun gitsum-switch-from-git-status ()
0
+ "Switch to gitsum, resticting diff to marked files if any."
0
+ (interactive)
0
+ (let ((marked (git-get-filenames
0
+ (ewoc-collect git-status
0
+ (lambda (info) (git-fileinfo->marked info))))))
0
+ (gitsum)
0
+ (when marked
0
+ (gitsum-refresh (mapconcat 'identity marked " ")))))
0
+
0
 (defun gitsum ()
0
   "Entry point into gitsum-diff-mode."
0
   (interactive)
0
@@ -163,4 +174,8 @@ A numeric argument serves as a repeat count."
0
   (gitsum-diff-mode)
0
   (gitsum-refresh))
0
 
0
+;; viper compatible
0
+(eval-after-load "viper"
0
+ '(add-to-list 'viper-emacs-state-mode-list 'gitsum-diff-mode))
0
+
0
 (provide 'gitsum)
...
11
12
13
14
 
15
16
17
...
27
28
29
30
 
31
32
33
...
35
36
37
38
39
40
41
42
43
 
44
45
46
...
52
53
54
55
 
56
57
58
59
60
 
 
61
62
63
...
68
69
70
71
72
73
74
75
76
77
78
...
11
12
13
 
14
15
16
17
...
27
28
29
 
30
31
32
33
...
35
36
37
 
38
39
40
41
 
42
43
44
45
...
51
52
53
 
54
55
56
57
 
 
58
59
60
61
62
...
67
68
69
 
 
 
 
 
70
71
72
0
@@ -11,7 +11,7 @@
0
 
0
 (global-set-key "\C-\M-h" 'backward-kill-word)
0
 (global-set-key (kbd "C-c l") (lambda () (interactive) (insert "lambda")))
0
-(global-set-key (kbd "C-c \\") 'align-regexp)
0
+(global-set-key (kbd "C-x \\") 'align-regexp)
0
 
0
 ;;; Navigation
0
 
0
@@ -27,7 +27,7 @@
0
 
0
 (global-set-key (kbd "C-x M-f") 'ido-find-file-other-window)
0
 (global-set-key (kbd "C-x C-b") 'bs-show)
0
-(global-set-key (kbd "C-c C-r") 'revert-buffer)
0
+(global-set-key (kbd "C-x M-r") 'revert-buffer)
0
 
0
 ;;; Window management
0
 
0
@@ -35,12 +35,11 @@
0
 (global-set-key "\C-x=" 'enlarge-window)
0
 
0
 (global-set-key "\C-xO" (lambda () (interactive) (other-window -1)))
0
-(global-set-key "\C-x\C-o" (lambda () (interactive) (other-window 2)))
0
 (global-set-key "\C-x." (lambda () (interactive) (enlarge-window 1 t)))
0
 (global-set-key "\C-x," (lambda () (interactive) (shrink-window 1 t)))
0
 
0
 (global-set-key (kbd "C-x M-k") (lambda () (interactive) (kill-buffer (current-buffer)) (delete-window)))
0
-(global-set-key (kbd "C-c d") 'toggle-dedicated-window)
0
+(global-set-key (kbd "C-x d") 'toggle-dedicated-window)
0
 
0
 ;;; Lisp
0
 
0
@@ -52,12 +51,12 @@
0
 (global-set-key (kbd "C-x m") 'eshell)
0
 (global-set-key (kbd "C-x M") (lambda () (interactive) (eshell t)))
0
 
0
-;;; Web
0
+;; Web
0
 
0
 (global-set-key (kbd "C-x w") 'w3m)
0
 (global-set-key "\C-xh" 'view-url)
0
-(global-set-key "\C-ct" 'twittering-mode)
0
-(global-set-key "\C-cT" 'twittering-update-status-interactive)
0
+(global-set-key "\C-xt" 'twittering-mode)
0
+(global-set-key "\C-xT" 'twittering-update-status-interactive)
0
 
0
 ;;; Utility
0
 
0
@@ -68,11 +67,6 @@
0
 (define-key read-expression-map (kbd "TAB") #'lisp-complete-symbol)
0
 (global-set-key (kbd "M-\\") 'my-selective-display)
0
 (global-set-key (kbd "C-x v d") 'vc-status)
0
-(global-set-key (kbd "C-x v r") 'vc-resolve-conflicts)
0
-(global-set-key (kbd "C-c j") (lambda () (interactive)
0
- (switch-or-start "*-jabber-*" #'jabber-connect)))
0
-(global-set-key (kbd "C-c g") (lambda () (interactive)
0
- (switch-or-start "*Group*" #'gnus)))
0
 
0
 (define-key isearch-mode-map (kbd "C-o") ;; occur easily inside isearch
0
   (lambda ()
...
16
17
18
19
20
 
 
 
 
 
 
 
 
 
 
 
21
22
23
...
56
57
58
 
 
 
 
 
 
59
60
61
62
63
64
 
65
66
67
...
87
88
89
90
91
 
 
92
93
94
...
136
137
138
139
140
141
142
143
144
145
146
...
16
17
18
 
 
19
20
21
22
23
24
25
26
27
28
29
30
31
32
...
65
66
67
68
69
70
71
72
73
74
75
76
 
77
 
78
79
80
81
...
101
102
103
 
 
104
105
106
107
108
...
150
151
152
 
 
 
 
 
 
153
154
0
@@ -16,8 +16,17 @@
0
   (interactive "MUrl: ")
0
   (switch-to-buffer (url-retrieve-synchronously url))
0
   (rename-buffer url t)
0
- (goto-char (point-min))
0
- (html-mode))
0
+ (eval ;set major mode
0
+ (read
0
+ (concat
0
+ "("
0
+ (completing-read "Major mode: "
0
+ (mapcar (lambda
0
+ (x)
0
+ (list (symbol-name x)))
0
+ (apropos-internal "-mode$"
0
+ 'commandp))
0
+ nil t) ")"))))
0
 
0
 (defun map-coords (lat lng)
0
   "Show a Yahoo map marked with the point LAT by LNG."
0
@@ -56,12 +65,17 @@
0
   "Toggle the window-dedicated-p state of current window."
0
   (set-window-dedicated-p (current-window) (not (window-dedicated-p (current-window)))))
0
 
0
+(defun window-small-and-large ()
0
+ (interactive)
0
+ (if (equal 1 (length (window-list)))
0
+ (split-window))
0
+ (set-window-text-height (first (window-list)) (- (frame-height) 20)))
0
+
0
 (defun my-coding-hook ()
0
   "Enable things I consider convenient across all coding buffers."
0
   ;; (indent-buffer)
0
- ;; (whitespace-mode t)
0
   (hl-line-mode)
0
- (setq indicate-empty-lines t)
0
+ ;; (whitespace-mode t)
0
   (font-lock-add-keywords nil
0
        '(("\\<\\(FIX\\|TODO\\|FIXME\\|HACK\\|REFACTOR\\):" 1 font-lock-warning-face t))))
0
 
0
@@ -87,8 +101,8 @@
0
 
0
 ;;; Random stuff
0
 
0
-(defun recompile-init ()
0
- (interactive) ;; TODO: maybe shouldn't recompile my-* that changes a lot?
0
+(defun my-recompile-init ()
0
+ (interactive)
0
   (byte-recompile-directory (expand-file-name "~/.emacs.d") 0))
0
 
0
 (defun my-generate-elisp-tags ()
0
@@ -136,10 +150,4 @@
0
 
0
 (defun ss () (interactive) (server-start))
0
 
0
-(defun switch-or-start (buffer-name starter-function)
0
- (if (get-buffer buffer-name)
0
- (switch-to-buffer buffer-name)
0
- (funcall starter-function)))
0
-
0
-
0
 (provide 'my-defuns)
0
\ No newline at end of file
...
5
6
7
8
9
10
11
...
5
6
7
 
8
9
10
0
@@ -5,7 +5,6 @@
0
 
0
 (eval-after-load 'eshell
0
   '(progn
0
- (require 'ansi-color)
0
      (require 'pcmpl-rake)
0
      (require 'em-prompt)
0
      (require 'em-cmpl)
...
12
13
14
15
16
17
 
 
18
19
20
...
12
13
14
 
 
 
15
16
17
18
19
0
@@ -12,8 +12,7 @@
0
 (add-hook 'comint-mode-hook 'ansi-color-for-comint-mode-on)
0
 (add-hook 'js-mode-hook 'moz-minor-mode)
0
 (add-hook 'html-mode-hook 'auto-fill-mode)
0
-;;; Don't do this behind my back... sigh.
0
-;;(add-hook 'before-save-hook 'delete-trailing-whitespace)
0
-;;(add-hook 'before-save-hook 'untabify-buffer)
0
+;(add-hook 'before-save-hook 'delete-trailing-whitespace)
0
+;(add-hook 'before-save-hook 'untabify-buffer)
0
 
0
 (provide 'my-hook-setup)
0
\ No newline at end of file
...
31
32
33
 
 
 
 
34
35
36
 
37
38
39
...
31
32
33
34
35
36
37
38
39
 
40
41
42
43
0
@@ -31,9 +31,13 @@
0
 (add-to-list 'auto-mode-alist '("\\.js$" . javascript-mode))
0
 (add-to-list 'auto-mode-alist '("\\.json$" . yaml-mode))
0
 
0
+;; for helma
0
+(add-to-list 'auto-mode-alist '("\\.skin$" . html-mode))
0
+(add-to-list 'auto-mode-alist '("\\.hac$" . javascript-mode))
0
+
0
 (setq javascript-indent-level 2)
0
 
0
-;; (require 'flymake-js)
0
+(require 'flymake-js)
0
 ;; getting an error 100% of the time now.
0
 ;;(add-hook 'javascript-mode-hook 'flymake-js-load)
0
 
...
26
27
28
 
29
30
31
...
26
27
28
29
30
31
32
0
@@ -26,6 +26,7 @@
0
       inhibit-startup-message t
0
       transient-mark-mode t
0
       color-theme-is-global nil
0
+ indicate-empty-lines t
0
       save-place t
0
       truncate-partial-width-windows nil
0
       indent-tabs-mode nil
...
10
11
12
 
 
 
13
14
15
...
10
11
12
13
14
15
16
17
18
0
@@ -10,6 +10,9 @@
0
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0
 ;; Ruby help
0
 
0
+;; syntax highlighting needs to be done before ruby-electric
0
+(global-font-lock-mode t)
0
+
0
 (require 'ruby-mode)
0
 (require 'ruby-electric)
0
 (require 'inf-ruby)
...
1
2
3
4
...
24
25
26
27
28
29
30
...
 
1
2
3
...
23
24
25
 
26
27
28
0
@@ -1,4 +1,3 @@
0
-#!/usr/local/bin/ruby1.9
0
 ## ri-emacs.rb helper script for use with ri-ruby.el
0
 #
0
 # Author: Kristof Bastiaensen <kristof@vleeuwen.org>
0
@@ -24,7 +23,6 @@
0
 # For information on how to use and install see ri-ruby.el
0
 #
0
 
0
-require 'rubygems'
0
 require 'rdoc/ri/ri_paths'
0
 require 'rdoc/ri/ri_cache'
0
 require 'rdoc/ri/ri_util'
...
13
14
15
16
17
18
19
20
21
 
22
23
24
...
41
42
43
44
45
46
47
48
49
50
 
 
51
52
53
...
256
257
258
259
260
261
262
...
13
14
15
 
 
16
17
18
 
19
20
21
22
...
39
40
41
 
42
43
44
45
 
46
47
48
49
50
51
...
254
255
256
 
257
258
259
0
@@ -13,12 +13,10 @@
0
 ;; * the templete string system for status
0
 ;; id:masa_edw
0
 ;; * twittering-scroll-mode
0
-;; Phil Hagelberg
0
-;; * misc. bug fixes
0
 
0
 ;; This file is free software; you can redistribute it and/or modify
0
 ;; it under the terms of the GNU General Public License as published by
0
-;; the Free Software Foundation; either version 3, or (at your option)
0
+;; the Free Software Foundation; either version 2, or (at your option)
0
 ;; any later version.
0
 
0
 ;; This file is distributed in the hope that it will be useful,
0
@@ -41,13 +39,13 @@
0
 ;; twittering-(icon|scroll)-mode should *not* go in the modeline
0
 ;; q to bury-buffer
0
 ;; thanks; don't need a message every time HTTP GETs work
0
-;; disable undo for the twittering buffer; it caused overflow
0
 
0
 ;;; Bugs:
0
 
0
 ;; should warn if you go over 140 chars
0
-;; should not create a *twittering* buffer when you require, just when you launch.
0
 ;; sometimes icons get mixed up
0
+;; should not create a *twittering* buffer when you require it.
0
+;; undo buffer overflows; disable it
0
 
0
 ;;; Code:
0
 
0
@@ -256,7 +254,6 @@
0
   (set-syntax-table twittering-mode-syntax-table)
0
   (run-hooks 'twittering-mode-hook)
0
   (font-lock-mode -1)
0
- (buffer-disable-undo)
0
   (twittering-start)
0
   )
0