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
switch-or-start fix; coding-hook improvement.
technomancy (author)
Tue Aug 19 10:08:57 -0700 2008
commit  a20103d15bef0875043b0b6ddd67230ad790bca4
tree    1d29fae22787b632fc9de849f2dcca49fd2843f8
parent  d92beda35d6998aafec9163eeafc61d00af04354
...
3
4
5
 
 
 
6
7
8
...
3
4
5
6
7
8
9
10
11
0
@@ -3,6 +3,9 @@
0
 ;; by Phil Hagelberg
0
 ;; Much thanks to RMS and emacswiki.org
0
 
0
+;; All files distributed under the same terms as GNU Emacs unless
0
+;; otherwise stated.
0
+
0
 ;; Note: this relies on files found in my .emacs.d:
0
 ;; http://github.com/technomancy/dotfiles
0
 
...
114
115
116
117
 
 
118
119
120
...
225
226
227
228
229
230
 
 
 
 
 
 
231
232
233
...
114
115
116
 
117
118
119
120
121
...
226
227
228
 
 
 
229
230
231
232
233
234
235
236
237
0
@@ -114,7 +114,8 @@
0
   (set (make-local-variable 'comment-auto-fill-only-comments) t)
0
   (make-local-variable 'column-number-mode)
0
   (column-number-mode t)
0
- (if (window-system) (hl-line-mode))
0
+ (auto-fill-mode)
0
+ (if (window-system) (hl-line-mode t))
0
   (idle-highlight))
0
 
0
 (defun untabify-buffer ()
0
@@ -225,9 +226,12 @@
0
                          (thing-at-point 'filename))))
0
 
0
 (defun switch-or-start (function buffer)
0
- (if (get-buffer buffer)
0
- (switch-to-buffer buffer)
0
- (funcall function)))
0
+ "If the buffer is current, bury it, otherwise invoke the function."
0
+ (if (equal (buffer-name (current-buffer)) buffer)
0
+ (bury-buffer)
0
+ (if (get-buffer buffer)
0
+ (switch-to-buffer buffer)
0
+ (funcall function))))
0
 
0
 (defun gd (&optional arg)
0
   "Git diff for use in eshell."
...
32
33
34
 
35
36
37
...
32
33
34
35
36
37
38
0
@@ -32,6 +32,7 @@
0
                                   indentation space-after-tab)
0
       whitespace-line-column 100
0
       sql-server "localhost"
0
+ ediff-window-setup-function 'ediff-setup-windows-plain
0
       save-place-file (convert-standard-filename "~/.emacs.d/places")
0
       browse-url-browser-function 'browse-url-generic
0
       browse-url-generic-program "~/src/conkeror/conkeror")
...
74
75
76
77
78
 
 
79
80
81
...
74
75
76
 
 
77
78
79
80
81
0
@@ -74,8 +74,8 @@
0
 
0
 (defun ruby-test-file ()
0
   (interactive)
0
- (if (string-match "_test.rb$" buffer-file-name)
0
- (compile (concat "ruby " buffer-file-name))
0
+ (if (string-match "test.*\.rb$" buffer-file-name)
0
+ (compile (concat ruby-test-program " " buffer-file-name))
0
     (toggle-buffer)
0
     (compile (concat ruby-test-program " -I:../lib " buffer-file-name))
0
     (toggle-buffer)))
...
18
19
20
 
21
22
...
18
19
20
21
22
23
0
@@ -18,5 +18,6 @@ alias grepp ps aux | grep $*
0
 alias l ls -a -l $*
0
 alias la ls -a $*
0
 alias ll ls -l $*
0
+alias lh ls -l -h $*
0
 alias devlog tail -F log/development.log
0
 alias nil $*

Comments

    No one has commented yet.