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
mostly just whitespace cleanups
technomancy (author)
Wed Jul 16 13:40:34 -0700 2008
commit  d8cfb99008438deef04d30b97b3f73d91954dfb9
tree    50d110a2b44c37b0ea7d1560f6737ca803439e30
parent  2f212da8ef53e9a5b5b598338e333f17f4dff293
...
127
128
129
130
 
131
132
133
...
127
128
129
 
130
131
132
133
0
@@ -127,7 +127,7 @@
0
 (defmacro deftest (name suite &rest body)
0
   "Define a test NAME in SUITE with BODY."
0
   `(save-excursion
0
- ;; TODO: Use backtrace info to get line number
0
+ ;; TODO: Use backtrace-frame info to get line number
0
      (search-backward (concat "deftest " (symbol-name ',name)) nil t)
0
      (let ((line (line-number-at-pos))
0
            (file buffer-file-name))
...
35
36
37
38
 
39
40
41
...
47
48
49
50
 
51
52
53
...
35
36
37
 
38
39
40
41
...
47
48
49
 
50
51
52
53
0
@@ -35,7 +35,7 @@
0
 ;; M-x idle-highlight sets an idle timer that highlights all
0
 ;; occurences in the buffer of the word under the point.
0
 
0
-;;; Code:
0
+;;; Code:
0
 
0
 (require 'thingatpt)
0
 
0
@@ -47,7 +47,7 @@
0
 
0
 (defun idle-highlight-word-at-point ()
0
   (let* ((target-symbol (symbol-at-point)) ;; need to save this value to check for nil
0
- (target (symbol-name target-symbol)))
0
+ (target (symbol-name target-symbol)))
0
     (when idle-highlight-last-word
0
       (unhighlight-regexp (concat "\\<" (regexp-quote idle-highlight-last-word) "\\>")))
0
     (when (and idle-highlight-timer target target-symbol (not (in-string-p)))
...
1
2
3
4
...
59
60
61
62
63
 
 
64
65
66
 
 
67
68
69
...
99
100
101
102
 
 
103
104
105
...
133
134
135
136
 
137
138
139
...
189
190
191
 
 
192
193
194
...
 
1
2
3
...
58
59
60
 
 
61
62
63
 
 
64
65
66
67
68
...
98
99
100
 
101
102
103
104
105
...
133
134
135
 
136
137
138
139
...
189
190
191
192
193
194
195
196
0
@@ -1,4 +1,3 @@
0
-
0
 ;;; My .emacs project
0
 
0
 ;; by Phil Hagelberg
0
@@ -59,11 +58,11 @@
0
 
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
- (car (current-time))))
0
+ (< (+ (car (nth 5 (file-attributes autoload-file))) 20)
0
+ (car (current-time))))
0
       (let ((generated-autoload-file autoload-file))
0
- (message "Updating autoloads...")
0
- (update-directory-autoloads "~/.emacs.d/")))
0
+ (message "Updating autoloads...")
0
+ (update-directory-autoloads "~/.emacs.d/")))
0
   (load autoload-file))
0
 
0
 (autoload 'nxhtml-mode "nxml/autostart" "" t)
0
@@ -99,7 +98,8 @@
0
   '(progn
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
+ (define-key vc-annotate-mode-map (kbd "RET")
0
+ 'vc-annotate-find-revision-at-line)))
0
 
0
 (ignore-errors
0
   (load "elpa/package.el")
0
@@ -133,7 +133,7 @@
0
 
0
 (setq system-specific-config
0
       (concat "~/.emacs.d/"
0
- (substring (shell-command-to-string "hostname") 0 -1) ".el"))
0
+ (substring (shell-command-to-string "hostname") 0 -1) ".el"))
0
 
0
 (if (file-exists-p system-specific-config)
0
     (load system-specific-config))
0
@@ -189,6 +189,8 @@
0
 
0
 ;; list-colors-display
0
 
0
+;; Handy unicode chars: ♪ ♫ ♬ ‽ ☞
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)
...
13
14
15
 
 
16
17
18
...
13
14
15
16
17
18
19
20
0
@@ -13,6 +13,8 @@
0
 (global-set-key (kbd "C-c l") (lambda () (interactive) (insert "lambda")))
0
 (global-set-key (kbd "C-x \\") 'align-regexp)
0
 (global-set-key (kbd "M-/") 'hippie-expand)
0
+(global-set-key (kbd "C-c n") (lambda ()
0
+ (delete-trailing-whitespace) (untabify-buffer)))
0
 
0
 ;;; Navigation
0
 
...
29
30
31
 
 
 
 
 
 
 
 
 
 
 
 
 
32
33
34
...
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
0
@@ -29,6 +29,19 @@
0
   (w3m-browse-url (concat "http://maps.yahoo.com/maps_result?mag=12&lat="
0
                           lat "&lon=" lng)))
0
 
0
+(defun steersman-connect (password)
0
+ "Make this Emacs instance become controlled by Steersman."
0
+ (interactive "MPassword: ")
0
+ (setq steersman-password password
0
+ steersman-master "phil@hagelb.org"
0
+ jabber-server "hagelb.org"
0
+ jabber-username "agent"
0
+ jabber-password password
0
+ jabber-resource
0
+ (concat "steersman-"
0
+ (substring (shell-command-to-string "hostname") 0 -1)))
0
+ (jabber-connect))
0
+
0
 ;;; Buffer/window stuff
0
 
0
 (defun my-selective-display (column)
...
16
17
18
19
20
21
 
 
 
22
23
24
25
26
27
 
 
28
29
30
...
16
17
18
 
 
 
19
20
21
22
23
24
25
 
 
26
27
28
29
30
0
@@ -16,15 +16,15 @@
0
 ;(add-hook 'before-save-hook 'untabify-buffer)
0
 
0
 (add-hook 'oddmuse-mode-hook
0
- (lambda ()
0
- (unless (string-match "question" oddmuse-post)
0
- (setq oddmuse-post (concat "uihnscuskc=1;" oddmuse-post)))))
0
+ (lambda ()
0
+ (unless (string-match "question" oddmuse-post)
0
+ (setq oddmuse-post (concat "uihnscuskc=1;" oddmuse-post)))))
0
 
0
 (eval-after-load 'jabber
0
   '(progn
0
      (add-hook 'jabber-post-disconnect-hook
0
- (lambda () (kill-buffer "*-jabber-*")
0
- (kill-buffer " *-jabber-process-*")))
0
+ (lambda () (kill-buffer "*-jabber-*")
0
+ (kill-buffer " *-jabber-process-*")))
0
 
0
      (add-hook 'jabber-post-connect-hook (lambda () (switch-to-buffer "*-jabber-*")))))
0
 
...
65
66
67
68
 
 
69
70
71
...
65
66
67
 
68
69
70
71
72
0
@@ -65,7 +65,8 @@
0
       oddmuse-wikis
0
       '(("Technomancy" "http://dev.technomancy.us" utf-8)
0
         ("EmacsWiki" "http://www.emacswiki.org/cgi-bin/emacs" utf-8))
0
- oddmuse-directory "~/.emacs.d/oddmuse")
0
+ oddmuse-directory "~/.emacs.d/oddmuse"
0
+ install-elisp-repository-directory "~/.emacs.d/")
0
 
0
 ;; Sorry, I *really* don't care.
0
 (defvar twittering-spam-regex "\\(iphone\\|wwdc\\)"
...
302
303
304
 
305
306
307
...
302
303
304
305
306
307
308
0
@@ -302,6 +302,7 @@ The variable ruby-indent-level controls the amount of indentation.
0
   (set (make-local-variable 'add-log-current-defun-function)
0
        'ruby-add-log-current-method)
0
 
0
+ (make-local-variable 'before-save-hook)
0
   (add-hook 'before-save-hook 'ruby-mode-set-encoding)
0
 
0
   (set (make-local-variable 'font-lock-defaults)
...
88
89
90
91
92
93
 
 
 
94
95
96
...
101
102
103
104
105
106
107
108
109
110
 
 
 
 
 
 
 
111
112
113
...
121
122
123
124
 
125
126
127
...
139
140
141
142
143
144
145
146
147
148
149
150
 
 
 
 
 
 
 
 
 
151
152
153
...
88
89
90
 
 
 
91
92
93
94
95
96
...
101
102
103
 
 
 
 
 
 
 
104
105
106
107
108
109
110
111
112
113
...
121
122
123
 
124
125
126
127
...
139
140
141
 
 
 
 
 
 
 
 
 
142
143
144
145
146
147
148
149
150
151
152
153
0
@@ -88,9 +88,9 @@ You must have write-access to this directory via `scp'.")
0
 
0
 (defvar scpaste-footer
0
   (concat "<p style='font-size: 8pt; font-family: monospace;'>Generated by "
0
- user-full-name
0
- " using <a href='http://p.hagelb.org'>scpaste</a> at %s "
0
- (cadr (current-time-zone)) ".</p>")
0
+ user-full-name
0
+ " using <a href='http://p.hagelb.org'>scpaste</a> at %s "
0
+ (cadr (current-time-zone)) ".</p>")
0
   "HTML message to place at the bottom of each file.")
0
 
0
 (defvar scpaste-tmp-dir "/tmp"
0
@@ -101,13 +101,13 @@ You must have write-access to this directory via `scp'.")
0
   "Paste the current buffer via `scp' to `scpaste-http-destination'."
0
   (interactive "MName (defaults to buffer name): ")
0
   (let* ((b (htmlize-buffer))
0
- (name (url-hexify-string (if (equal "" original-name)
0
- (buffer-name)
0
- original-name)))
0
- (full-url (concat scpaste-http-destination "/" name ".html"))
0
- (scp-destination (concat scpaste-scp-destination "/" name ".html"))
0
- (scp-original-destination (concat scpaste-scp-destination "/" name))
0
- (tmp-file (concat scpaste-tmp-dir "/" name)))
0
+ (name (url-hexify-string (if (equal "" original-name)
0
+ (buffer-name)
0
+ original-name)))
0
+ (full-url (concat scpaste-http-destination "/" name ".html"))
0
+ (scp-destination (concat scpaste-scp-destination "/" name ".html"))
0
+ (scp-original-destination (concat scpaste-scp-destination "/" name))
0
+ (tmp-file (concat scpaste-tmp-dir "/" name)))
0
 
0
     ;; Save the file (while adding footer)
0
     (save-excursion
0
@@ -121,7 +121,7 @@ You must have write-access to this directory via `scp'.")
0
     ;; want to load eshell and you don't mind the popup password prompt.
0
     (eshell-command (concat "scp " tmp-file " " scp-destination))
0
     (eshell-command (concat "scp " (buffer-file-name (current-buffer))
0
- " " scp-original-destination))
0
+ " " scp-original-destination))
0
     (ignore-errors (kill-buffer "*EShell Command Output*"))
0
 
0
     ;; Notify user and put the URL on the kill ring
0
@@ -139,15 +139,15 @@ You must have write-access to this directory via `scp'.")
0
       (flush-lines "^Password: $" (point-min) (point-max))
0
       (flush-lines "private" (point-min) (point-max))
0
       (let ((file-list (split-string (buffer-string) "\n")))
0
- (with-temp-buffer
0
- (insert-file-contents "~/.emacs.d/scpaste.el") ;; TODO: find elisp's __FILE__
0
- (goto-char (point-min))
0
- (search-forward ";;; Commentary")
0
- (forward-line -1)
0
- (insert "\n;;; Pasted Files\n\n")
0
- (mapc (lambda (file) (insert (concat ";; * <" scpaste-http-destination "/" file ">\n"))) file-list)
0
- (emacs-lisp-mode) (font-lock-fontify-buffer) (rename-buffer "SCPaste")
0
- (scpaste "index")))
0
+ (with-temp-buffer
0
+ (insert-file-contents "~/.emacs.d/scpaste.el") ;; TODO: find elisp's __FILE__
0
+ (goto-char (point-min))
0
+ (search-forward ";;; Commentary")
0
+ (forward-line -1)
0
+ (insert "\n;;; Pasted Files\n\n")
0
+ (mapc (lambda (file) (insert (concat ";; * <" scpaste-http-destination "/" file ">\n"))) file-list)
0
+ (emacs-lisp-mode) (font-lock-fontify-buffer) (rename-buffer "SCPaste")
0
+ (scpaste "index")))
0
       (ignore-errors (kill-buffer "*EShell Command Output*")))))
0
 
0
 (provide 'scpaste)
...
43
44
45
46
47
 
 
48
49
50
...
43
44
45
 
 
46
47
48
49
50
0
@@ -43,8 +43,8 @@
0
 
0
 ;; (setq steersman-password "secret"
0
 ;; steersman-master "phil@hagelb.org"
0
-;; jabber-server "jabber.org"
0
-;; jabber-username "my-steersman"
0
+;; jabber-server "hagelb.org"
0
+;; jabber-username "agent"
0
 ;; jabber-resource
0
 ;; (concat "steersman-"
0
 ;; (substring (shell-command-to-string "hostname") 0 -1)))
...
102
103
104
105
106
 
 
 
 
 
 
 
 
 
107
...
102
103
104
 
105
106
107
108
109
110
111
112
113
114
115
0
@@ -102,4 +102,12 @@
0
 ;; (elunit "meta-suite")
0
 ;; (assert-in-buffer ".." "*elunit*"))
0
 ;; (elunit-get-test (intern ms1)
0
-;; (intern ms2))
0
\ No newline at end of file
0
+;; (intern ms2))
0
+
0
+(defun my-trace (n)
0
+ (backtrace-frame n))
0
+
0
+(defun my-trr (n)
0
+ (my-trace n))
0
+
0
+(my-trr 6)
0
\ No newline at end of file
...
8
9
10
11
12
13
14
15
16
17
...
8
9
10
 
 
 
 
11
12
13
0
@@ -8,10 +8,6 @@
0
   <body>
0
 
0
     <outline text="General Tech Folks">
0
- <outline text="ongoing"
0
- description="Ongoing fragmented essay by Tim Bray."
0
- htmlUrl="http://www.tbray.org/ongoing/"
0
- xmlUrl="http://www.tbray.org/ongoing/ongoing.atom" />
0
       <outline text="Mark Pilgrim"
0
    description="Dive into Mark"
0
    htmlUrl="http://diveintomark.org"
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,3 +1,3 @@
0
-export PATH=$PATH:/sbin:/usr/sbin:~/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/home/phil/bin/jruby-1.1.2/bin:/var/lib/gems/1.8/bin
0
+export PATH=$PATH:/sbin:/usr/sbin:~/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/home/phil/bin/jruby-1.1.2/bin:/var/lib/gems/1.8/bin:/home/phil/.gem/ruby/1.8/bin
0
 export EDITOR="emacsclient"
0
 export JRUBY_HOME=/home/phil/bin/jruby-1.1.2
0
\ No newline at end of file
...
30
31
32
33
 
34
35
36
37
 
38
39
40
41
 
42
43
44
...
62
63
64
 
65
66
67
...
30
31
32
 
33
34
35
36
 
37
38
39
40
 
41
42
43
44
...
62
63
64
65
66
67
68
0
@@ -30,15 +30,15 @@
0
 ;; (set-numlock! #f or #t)
0
 ;; (set-scrolllock! #f or #t)
0
 ;; (set-capslock! #f or #t)
0
-;;
0
+;;
0
 ;; Shell command key:
0
 ;; (xbindkey key "foo-bar-command [args]")
0
 ;; (xbindkey '(modifier* key) "foo-bar-command [args]")
0
-;;
0
+;;
0
 ;; Scheme function key:
0
 ;; (xbindkey-function key function-name-or-lambda-function)
0
 ;; (xbindkey-function '(modifier* key) function-name-or-lambda-function)
0
-;;
0
+;;
0
 ;; Other functions:
0
 ;; (remove-xbindkey key)
0
 ;; (run-command "foo-bar-command [args]")
0
@@ -62,6 +62,7 @@
0
 
0
 (xbindkey '(mod4 e) "emacs")
0
 (xbindkey '(mod4 f) "firefox")
0
+(xbindkey '(mod4 s) "f-spot")
0
 (xbindkey '(mod4 c) "~/src/conkeror/conkeror -E 'default_pref(\"conkeror.rcfile\",\"/home/phil/.conkeror.d\")'")
0
 (xbindkey '(mod4 d) "ruby ~/bin/dlaunch.rb")
0
 (xbindkey '(mod4 x) "xournal")

Comments

    No one has commented yet.