annotate .emacs @ 120:339805e00f03

set python spacing back to four, by popular demand
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 27 Dec 2010 07:13:11 -0800
parents 89a64b0d6146
children 7a4c86310463
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
1 (server-start)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
2 (if (boundp 'tool-bar-mode) (tool-bar-mode 0))
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
3 (setq inhibit-startup-message t)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
4 (setq make-backup-files nil)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
5 (put 'downcase-region 'disabled nil)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
6 (setq truncate-lines nil)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
7 (setq truncate-partial-width-windows nil)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
8 (setq use-file-dialog nil)
75
89a64b0d6146 adding indentation for javascript
Jeff Hammel <jhammel@mozilla.com>
parents: 62
diff changeset
9
89a64b0d6146 adding indentation for javascript
Jeff Hammel <jhammel@mozilla.com>
parents: 62
diff changeset
10 ;; indentation
89a64b0d6146 adding indentation for javascript
Jeff Hammel <jhammel@mozilla.com>
parents: 62
diff changeset
11
89a64b0d6146 adding indentation for javascript
Jeff Hammel <jhammel@mozilla.com>
parents: 62
diff changeset
12 ;; python indentation
120
339805e00f03 set python spacing back to four, by popular demand
Jeff Hammel <jhammel@mozilla.com>
parents: 75
diff changeset
13 (setq python-indent 4)
339805e00f03 set python spacing back to four, by popular demand
Jeff Hammel <jhammel@mozilla.com>
parents: 75
diff changeset
14 (setq-default py-indent-offset 4)
0
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
15 (setq python-guess-indent nil)
75
89a64b0d6146 adding indentation for javascript
Jeff Hammel <jhammel@mozilla.com>
parents: 62
diff changeset
16
89a64b0d6146 adding indentation for javascript
Jeff Hammel <jhammel@mozilla.com>
parents: 62
diff changeset
17 ;; javascript indentation: http://www.brgeight.se/downloads/emacs/javascript.el
89a64b0d6146 adding indentation for javascript
Jeff Hammel <jhammel@mozilla.com>
parents: 62
diff changeset
18 (setq javascript-indent-level 2)
89a64b0d6146 adding indentation for javascript
Jeff Hammel <jhammel@mozilla.com>
parents: 62
diff changeset
19
0
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
20 (setq-default indent-tabs-mode nil)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
21 (defface extra-whitespace-face '((t (:background "pale green"))) "Used for tabs and such.")
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
22
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
23 (autoload 'doctest-mode "doctest-mode" "doctest editing mode." t)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
24
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
25 (transient-mark-mode 1)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
26
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
27 (put 'upcase-region 'disabled nil)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
28 ;; Show line-number in the mode line
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
29 (line-number-mode 1)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
30
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
31 ;; Show column-number in the mode line
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
32 (column-number-mode 1)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
33
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
34 ;; Bind major editing modes to certain file extensions
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
35 (setq auto-mode-alist (cons '("\\.zcml$" . sgml-mode) auto-mode-alist))
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
36 (setq auto-mode-alist (cons '("\\.pt$" . sgml-mode) auto-mode-alist))
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
37 (setq auto-mode-alist (cons '("\\.cpt$" . sgml-mode) auto-mode-alist))
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
38 (setq auto-mode-alist (cons '("\\.cpy$" . python-mode) auto-mode-alist))
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
39 (setq auto-mode-alist (cons '("\\.vpy$" . python-mode) auto-mode-alist))
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
40
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
41 ;; Turn off the status bar and on the mouse if we're not in a window system
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
42 (menu-bar-mode (if window-system 1 -1))
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
43 (add-hook 'text-mode-hook 'turn-on-auto-fill)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
44
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
45 (add-hook 'sgml-mode-hook 'turn-off-auto-fill)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
46
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
47 (setq grep-command "grep -liE")
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
48
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
49 ;; recentf stuff
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
50 (require 'recentf)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
51 (recentf-mode 1)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
52 (setq recentf-max-menu-items 25)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
53 (global-set-key "\C-x\ \C-r" 'recentf-open-files)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
54
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
55 ;; full-steam-ahead-and-damn-the-torpedoes
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
56 (defun
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
57 full-steam-ahead-and-damn-the-torpedoes
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
58 (prompt) t)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
59 (defalias 'y-or-n-p
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
60 'full-steam-ahead-and-damn-the-torpedoes)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
61 (defalias 'yes-or-no-p
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
62 'full-steam-ahead-and-damn-the-torpedoes)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
63
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
64 (require 'uniquify)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
65 (setq uniquify-buffer-name-style 'post-forward)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
66
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
67 ;; wheel mouse
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
68 (global-set-key [mouse-4] 'scroll-down)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
69 (global-set-key [mouse-5] 'scroll-up)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
70
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
71 ;; substring buffer switching mode
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
72 (iswitchb-mode 1)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
73
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
74 (global-set-key "\M-g" 'goto-line)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
75
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
76 ;; (when (load "flymake" t)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
77 ;; (defun flymake-pyflakes-init ()
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
78 ;; (let* ((temp-file (flymake-init-create-temp-buffer-copy
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
79 ;; 'flymake-create-temp-inplace))
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
80 ;; (local-file (file-relative-name
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
81 ;; temp-file
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
82 ;; (file-name-directory buffer-file-name))))
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
83 ;; (list "pyflakes" (list local-file))))
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
84
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
85 ;; (add-to-list 'flymake-allowed-file-name-masks
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
86 ;; '("\\.py\\'" flymake-pyflakes-init)))
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
87
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
88 ;; (add-hook 'find-file-hook 'flymake-find-file-hook)
f3ab51c79813 adding configuration from https://svn.openplans.org/svn/config_jhammel/
k0s <k0scist@gmail.com>
parents:
diff changeset
89 (server-start)
4
81e89e519980 changed a bunch of stuff, evidently
k0s <k0scist@gmail.com>
parents: 0
diff changeset
90
81e89e519980 changed a bunch of stuff, evidently
k0s <k0scist@gmail.com>
parents: 0
diff changeset
91 (fset 'break "import pdb; pdb.set_trace();\C-a\C-i")
81e89e519980 changed a bunch of stuff, evidently
k0s <k0scist@gmail.com>
parents: 0
diff changeset
92 (add-hook 'python-mode-hook
81e89e519980 changed a bunch of stuff, evidently
k0s <k0scist@gmail.com>
parents: 0
diff changeset
93 '(lambda ()
81e89e519980 changed a bunch of stuff, evidently
k0s <k0scist@gmail.com>
parents: 0
diff changeset
94 (local-set-key [(meta ?p) (meta ?p)] 'break)))