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
ELPA-related fixes; added aspell personal dictionary.
technomancy (author)
Fri Sep 26 12:26:17 -0700 2008
commit  a28b4f29cd6d2ecb55a56aefcc8415b7f07c2f15
tree    130c7ddab78e419fcbea2f0a24fc36e0dffa2d03
parent  5a5bf3e2ba9bbbf7a5ed3cca4f01709b7b5d9ba5
...
8
9
10
 
11
12
13
...
30
31
32
 
 
33
34
35
...
57
58
59
60
61
62
63
64
...
106
107
108
109
 
110
111
112
...
115
116
117
118
 
119
120
121
122
123
124
 
125
126
127
...
8
9
10
11
12
13
14
...
31
32
33
34
35
36
37
38
...
60
61
62
 
 
63
64
65
...
107
108
109
 
110
111
112
113
...
116
117
118
 
119
120
121
122
123
124
125
126
127
128
129
0
@@ -8,6 +8,7 @@
0
 ;; Created: 2008-03-18
0
 ;; Keywords: project, convenience
0
 ;; EmacsWiki: FindFileInProject
0
+;; Package-Requires: ((project-local-variables "0.2"))
0
 
0
 ;; This file is NOT part of GNU Emacs.
0
 
0
@@ -30,6 +31,8 @@
0
 
0
 ;;; Commentary:
0
 
0
+;; This library depends on GNU find.
0
+
0
 ;; This file provides a method for quickly finding any file in a given
0
 ;; project. Projects are defined as per the `project-local-variables'
0
 ;; library, by the presence of a `.emacs-project' file in a directory.
0
@@ -57,8 +60,6 @@
0
 ;; Recommended binding:
0
 ;; (global-set-key (kbd "C-x C-M-f") 'find-file-in-project)
0
 
0
-;; This library depends on GNU find.
0
-
0
 ;;; TODO:
0
 
0
 ;; Performance testing with large projects
0
@@ -106,7 +107,7 @@ directory they are found in so that they are unique."
0
   (setcar file-cons
0
           (concat (car file-cons) ": "
0
                   (cadr (reverse (split-string (cdr file-cons) "/"))))))
0
-
0
+;;;###autoload
0
 (defun find-file-in-project ()
0
   "Prompt with a completing list of all files in the project to find one.
0
 
0
@@ -115,13 +116,14 @@ an `.emacs-project' file. You can override this by locally
0
 setting the `ffip-project-root' variable."
0
   (interactive)
0
   (let* ((project-files (ffip-project-files))
0
- (file (if (functionp 'ido-completing-read)
0
+ (file (if (and (boundp 'ido-mode) ido-mode)
0
                    (ido-completing-read "Find file in project: "
0
                                         (mapcar 'car project-files))
0
                  (completing-read "Find file in project: "
0
                                   (mapcar 'car project-files)))))
0
     (find-file (cdr (assoc file project-files)))))
0
 
0
+;;;###autoload
0
 (defun ffip-project-root (&optional dir)
0
   "Find the root of the project defined by presence of `.emacs-project'."
0
   (file-name-directory (plv-find-project-file default-directory "")))
...
1
 
2
3
4
...
30
31
32
33
 
34
35
36
37
 
 
 
 
 
 
 
 
 
 
 
 
38
39
40
...
46
47
48
 
49
50
51
...
53
54
55
 
56
57
58
59
60
...
 
1
2
3
4
...
30
31
32
 
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
...
58
59
60
61
62
63
64
...
66
67
68
69
70
 
71
72
73
0
@@ -1,4 +1,4 @@
0
-;;; idle-highlight.el --- Highlight the word the point is on.
0
+;;; idle-highlight.el --- highlight the word the point is on
0
 
0
 ;; Copyright (C) 2008 Phil Hagelberg
0
 
0
@@ -30,11 +30,23 @@
0
 
0
 ;;; Commentary:
0
 
0
-;; Based on some snippets by fledermaus from #emacs channel.
0
+;; Based on some snippets by fledermaus from the #emacs channel.
0
 
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
+;; Enabling it in a hook is recommended. Example:
0
+;;
0
+;; (defun my-coding-hook ()
0
+;; (make-local-variable 'column-number-mode)
0
+;; (column-number-mode t)
0
+;; (if window-system (hl-line-mode t))
0
+;; (idle-highlight))
0
+;;
0
+;; (add-hook 'emacs-lisp-mode-hook 'my-coding-hook)
0
+;; (add-hook 'ruby-mode-hook 'my-coding-hook)
0
+;; (add-hook 'js2-mode-hook 'my-coding-hook)
0
+
0
 ;;; Code:
0
 
0
 (require 'thingatpt)
0
@@ -46,6 +58,7 @@
0
   "Timer to activate re-highlighting.")
0
 
0
 (defun idle-highlight-word-at-point ()
0
+ "Highlight the word under the point."
0
   (let* ((target-symbol (symbol-at-point))
0
          (target (symbol-name target-symbol)))
0
     (when idle-highlight-last-word
0
@@ -53,8 +66,8 @@
0
                                   (regexp-quote idle-highlight-last-word)
0
                                   "\\>")))
0
     (when (and idle-highlight-timer target target-symbol
0
+ ;; TODO: no need to highlight keywords like if
0
                (not (in-string-p)) (not (equal target "end")))
0
- ;; TODO: check for faces we like with describe-text-properties
0
       (highlight-regexp (concat "\\<" (regexp-quote target) "\\>") 'region)
0
       (setq idle-highlight-last-word target))))
0
 
...
266
267
268
 
...
266
267
268
269
0
@@ -266,3 +266,4 @@
0
 ;; http://cedet.cvs.sourceforge.net/cedet/cedet/contrib/
0
 
0
 ;; make an emacs peepcode
0
+
...
27
28
29
 
30
31
32
...
27
28
29
30
31
32
33
0
@@ -27,6 +27,7 @@
0
       color-theme-is-global t
0
       save-place t
0
       imenu-auto-rescan t
0
+ ispell-silently-savep t
0
       magit-auto-update t
0
       truncate-partial-width-windows nil
0
       uniquify-buffer-name-style 'forward
...
1
 
2
3
4
...
48
49
50
 
51
 
52
53
54
55
56
57
 
58
 
59
60
61
...
69
70
71
72
73
74
...
 
1
2
3
4
...
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
...
73
74
75
 
76
77
0
@@ -1,4 +1,4 @@
0
-;;; project-local-variables.el --- Set project-local variables from a file.
0
+;;; project-local-variables.el --- set project-local variables from a file
0
 
0
 ;; Copyright (C) 2008 Ryan Davis and Phil Hagelberg
0
 
0
@@ -48,14 +48,18 @@
0
   "Like setq, but makes sym a local variable first."
0
   `(set (make-local-variable ',sym) ,val))
0
 
0
+;;;###autoload
0
 (defun plv-find-project-file (dir mode-name)
0
+ "Look up the project file in and above `dir'."
0
  (let ((f (expand-file-name (concat plv-project-file mode-name) dir))
0
        (parent (file-truename (expand-file-name ".." dir))))
0
    (cond ((string= dir parent) nil)
0
          ((file-exists-p f) f)
0
          (t (plv-find-project-file parent mode-name)))))
0
 
0
+;;;###autoload
0
 (defadvice hack-local-variables (before project-local-variables activate)
0
+ "Load the appropriate .emacs-project files for a file."
0
   (let* ((full-name (symbol-name major-mode))
0
          (mode-name (if (string-match "\\(.*\\)-mode$" full-name)
0
                         (match-string 1 full-name)
0
@@ -69,5 +73,4 @@
0
 (add-to-list 'auto-mode-alist '("^\.emacs-project" . emacs-lisp-mode))
0
 
0
 (provide 'project-local-variables)
0
-
0
 ;;; project-local-variables.el ends here
0
\ No newline at end of file
...
74
75
76
 
77
78
79
...
74
75
76
77
78
79
80
0
@@ -74,6 +74,7 @@
0
         (any "Joel Watson" "friends")
0
 
0
         ;; misc
0
+ (from "VMWare" junk)
0
         (any "cron" junk)
0
         (any "Anacron" junk)
0
         (from "Inbox Archiver" junk)
...
4
5
6
7
8
9
 
10
11
12
...
4
5
6
 
 
 
7
8
9
10
0
@@ -4,8 +4,6 @@ export JRUBY_HOME=/home/phil/bin/jruby-1.1.3
0
 export JAVA_OPTS="-client"
0
 export SAKE_UNSAFE="why-not"
0
 
0
-if [ -r ~/.java_profile ]; then
0
- source ~/.java_profile
0
-fi
0
+source ~/.java_profile
0
 
0
 export CDPATH=.:~/src:~/work
0
\ No newline at end of file

Comments

    No one has commented yet.