annotate pers-init.el @ 21:7b2c4ed36302

for new maritain
author ht
date Mon, 30 Nov 2020 16:00:15 +0000
parents cc9c7bc8194a
children 0e5b39d2f8bb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
1 ;;; GNU Emacs init file for Henry Thompson
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
2 ;;; This part shared between all hosts
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
3 ;;; This part is my personal stuff, not for other incarnations
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
4 ;;; initialisation file for Emacs, that is, (l)emacs and epoch common
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
5 ;;; Last edited: Fri Sep 25 09:22:22 1992
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
6 ;;; Edit history since port: made load-path not site-dependant
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
7 ;;; split into common-init for all my incarnations and pers-init for private
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
8 ;;; added lemacs compatibility
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
9
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
10 ;;; mail stuff
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
11 (setq mail-archive-file-name "~/mail/cpy/general")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
12 (setq rmail-dont-reply-to-names "hthompso*\\|h\\.thompso*\\|ht@*" )
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
13 (set-default 'ht-last-file (expand-file-name "~/mail/"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
14 (setq ht-diary-file-name "~/mail/diary.babyl")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
15 (setq mail-append-host "inf.ed.ac.uk")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
16 (setq user-full-name "Henry S. Thompson")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
17 (setq user-mail-address "ht@inf.ed.ac.uk")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
18 (setq mail-host-address "inf.ed.ac.uk")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
19
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
20 ;; new mail hackery
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
21 (site-caseq ((edin ircs ldc)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
22 (setq rmail-spool-directory (file-name-as-directory
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
23 (concat rmail-spool-directory
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
24 "ht-mail")))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
25
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
26 ;; sending mail on the road
21
7b2c4ed36302 for new maritain
ht
parents: 19
diff changeset
27 ;; [moved to mail-from-m.el, which is required by gnus-init.el
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
28
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
29 ;; don't know why this is necessary
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
30 (site-caseq ((edin)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
31 (setq rmail-primary-inbox-list
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
32 (list (concat rmail-spool-directory "ht")))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
33
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
34 ;; Perforce
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
35
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
36 ;;(setq p4-global-server-port "zorg.milowski.com:1666")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
37 ;;(setenv "P4PORT" "zorg.milowski.com:1666")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
38 ;;(setenv "P4CLIENT" "MarkupMan")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
39 ;;(setenv "P4CONFIG" ".p4env")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
40 ;;(load-library "p4")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
41 ;;(setq p4-use-p4config-exclusively t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
42 ;;(p4-set-p4-executable "/c/Program Files/Perforce/p4.exe")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
43 (setq vc-command-messages t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
44
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
45 (setq minibuffer-max-depth nil)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
46 (defun run-kcl ()
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
47 "Run an inferior kcl process"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
48 (interactive)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
49 (switch-to-buffer (make-shell "kcl" "kcl"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
50 (inferior-lisp-mode))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
51
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
52 (require 'mdn-extras)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
53 (setq auto-mode-alist
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
54 (append '(("/perl/" . perl-mode)
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
55 ("\\.scm$" . scheme-mode))
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
56 auto-mode-alist))
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
57 (setq inferior-lisp-program "/c/Progra~1/ChezSc~1.4/bin/i3nt/petite")
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
58 ;;; for scheme
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
59 (put 'letrec 'lisp-indent-function 1)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
60 (put 'case 'lisp-indent-function 1)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
61
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
62 (site-caseq (parc (nconc load-path '("/import/local/emacs/gnus-3.13/"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
63 (setq rmail-primary-inbox-list
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
64 '("~/mbox" "/net/piglet/usr/spool/mail/$USER")))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
65 (edin (setq load-path (cons
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
66 "/home/ht/emacs/shared/gnus-5.0.15/lisp"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
67 load-path))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
68
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
69 (defun run-sicstus ()
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
70 "Run an inferior Prolog process, input and output via buffer *prolog*."
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
71 (interactive)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
72 (if (not (boundp 'prolog-mode-map))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
73 (let ((load-path (cons
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
74 (site-caseq (parc "/import/prolog-1.8/emacs")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
75 (edin "??"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
76 load-path)))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
77 (load "prolog" nil t)))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
78 (require 'shell)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
79 (switch-to-buffer (make-shell "prolog" (site-caseq (edin "sicstus")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
80 (parc "prolog"))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
81 (inferior-prolog-mode))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
82
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
83 (site-caseq ((laptop maritain))
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
84 (t(require 'hist)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
85 (rplacd (assoc "*shell*" hk-pat-table)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
86 "[a-z]+<[0-9]+>: ")))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
87
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
88 ;; turn off suspend-emacs -- use pause-emacs (^X.) instead
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
89 (global-unset-key "\C-Z")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
90 (global-unset-key "\C-x\C-z")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
91
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
92 (global-set-key "\C-xl" (function goto-line))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
93
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
94 ;(require 'repl-comment)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
95
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
96 ;(require 'compress)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
97
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
98 (if (string-match "Lucid" emacs-version)
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
99 (site-caseq ((laptop maritain))
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
100 (t(require 'lemacs-compat))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
101
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
102 (if (boundp 'epoch::version)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
103 ;; epoch only goes here
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
104 (progn
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
105 (if (string-match "4\\."emacs-version)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
106 (load "motion4" nil t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
107 (load "motion" nil t))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
108 (redisplay-frame)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
109
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
110 (require 'alarm)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
111 (idle-save 15)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
112
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
113 (defun ht-rooms-setup (&optional arg)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
114 (interactive)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
115 (redisplay-frame)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
116 (require 'mail-extras)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
117 (require 'diary)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
118 (require 'my-news)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
119 (let ((scr (current-frame)))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
120 (load "ht-rooms-epoch.config" nil t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
121 (unwind-protect (make-frame-for-room "diary" "-0" "+130"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
122 (unwind-protect (make-frame-for-room "elisp" "-25" "+148"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
123 (unwind-protect (make-frame-for-room "news" "-50" "+166"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
124 (unwind-protect (make-frame-for-room "mail" "-75" "+184"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
125 (epoch::delete-frame scr))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
126 ;; presumably this is now frame local, so not quite the right thing.
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
127 (setq ht-default-config (current-window-configuration)))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
128 ))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
129 (if (string-match "^\\(19\\|2\\)" emacs-version)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
130 (progn
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
131 ;; common v19
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
132 (if window-system
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
133 (progn
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
134 (add-hook 'sh-mode-hook '(lambda ()
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
135 (font-lock-mode 1)))
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
136 (add-hook 'lsl-mode-hook '(lambda ()
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
137 (font-lock-mode 1)))
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
138 (add-hook 'perl-mode-hook '(lambda ()
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
139 (font-lock-mode 1)))
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
140 (add-hook 'emacs-lisp-mode-hook '(lambda ()
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
141 (font-lock-mode 1)))
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
142 (add-hook 'lisp-mode-hook '(lambda ()
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
143 (font-lock-mode 1)))
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
144 (add-hook 'sgml-mode-hook '(lambda ()
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
145 (if (not
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
146 (boundp 'sgml-font-lock-keywords))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
147 (load "sgml-font-lock-keywords" t t))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
148 (setq adaptive-fill-mode nil)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
149 (font-lock-mode 1)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
150 ))
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
151 (add-hook 'c-mode-hook '(lambda ()
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
152 (font-lock-mode 1)))
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
153 (add-hook 'c++-mode-hook '(lambda ()
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
154 (font-lock-mode 1)))
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
155 (add-hook 'scheme-mode-hook
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
156 '(lambda ()
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
157 (setq
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
158 scheme-font-lock-keywords
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
159 (if (or
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
160 (boundp 'lisp-font-lock-keywords)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
161 (load "lisp-font-lock-keywords" t t))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
162 lisp-font-lock-keywords))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
163 (font-lock-mode 1)))
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
164 (add-hook 'python-mode-hook '(lambda ()
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
165 (font-lock-mode 1)))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
166 (setq py-python-command "//c/Program Files/Python22/python")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
167 (setq sgml-insert-missing-element-comment nil)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
168 (load "psgml" nil t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
169 (load "psgml-edit" nil t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
170 ;; (load "xml-hack" nil t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
171 ; (setq sgml-catalog-files '("CATALOG" "f:/lib/sgml/catalog"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
172 (if (string-match "i386" (emacs-version))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
173 (progn (defun win32-get-clipboard-data-cmd ()
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
174 (interactive)(insert (win32-get-clipboard-data)))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
175 (global-set-key
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
176 "\C-x\C-y" 'win32-get-clipboard-data-cmd)))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
177 ;; gnus
12
b53b1f1f2d4a *** empty log message ***
ht
parents: 6
diff changeset
178 ; (setq mail-signature t)
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
179
12
b53b1f1f2d4a *** empty log message ***
ht
parents: 6
diff changeset
180 ;; loading gnus postponed to e.g. mail-from-delphix, q.v.
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
181
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
182 ; (require 'gnus-min)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
183 ))
21
7b2c4ed36302 for new maritain
ht
parents: 19
diff changeset
184 (load "gnus-init" nil t)
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
185
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
186 ;; (require 'idle)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
187 ;; (idle-save 15)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
188
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
189 (if (string-match "Lucid" emacs-version)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
190 ;; lemacs only goes here
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
191 (progn
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
192 (setq bbdb-north-american-phone-numbers-p nil)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
193 (setq bbdb-use-pop-up nil)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
194 (require 'bbdb)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
195 (add-hook 'rmail-mode-hook 'bbdb-insinuate-rmail)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
196 (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
197 (add-hook 'mail-setup-hook 'bbdb-insinuate-sendmail)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
198 (add-hook 'mail-setup-hook 'bbdb-define-all-aliases)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
199 (add-hook 'gnus-message-setup-hook 'bbdb-define-all-aliases)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
200
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
201
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
202
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
203 (if window-system
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
204 (progn
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
205 (require 'highlight-headers)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
206 (defun rmail-fontify-headers ()
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
207 (highlight-headers (point-min) (point-max) t))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
208 (add-hook 'rmail-show-message-hook 'rmail-fontify-headers)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
209 (setq dired-mode-hook
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
210 '(lambda ()
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
211 (font-lock-mode 1)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
212 (define-key dired-mode-map
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
213 [button2] '(lambda (click)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
214 (interactive "e")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
215 (mouse-set-point click)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
216 (dired-advertised-find-file)))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
217 ;; (setq highlight-headers-follow-url-function
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
218 ;; 'highlight-headers-ht-follow-url-netscape
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
219 ;; browse-url-browser-function
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
220 ;;'highlight-headers-ht-follow-url-netscape)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
221 ))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
222 ;; (load "~rjc/public_html/device-type-hacking.el")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
223 (load "perl-mode" nil t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
224 (defun ht-rooms-setup (&optional arg)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
225 (interactive)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
226 (require 'mail-extras)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
227 (require 'diary)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
228 (require 'my-news)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
229 ;; override changed default, except in gnus
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
230 (setq mail-use-rfc822 nil)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
231 (add-hook 'gnus-summary-mode-hook
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
232 (function (lambda ()
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
233 (make-local-variable 'mail-use-rfc822)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
234 (setq mail-use-rfc822 t))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
235 (if (>= emacs-major-version 21)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
236 (progn
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
237 (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
238 (add-hook 'gnus-startup-hook 'bbdb-insinuate-message)))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
239 (defun ht-rooms-setup (&optional arg)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
240 (interactive)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
241 (require 'mail-extras)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
242 (require 'diary)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
243 (let ((scr (selected-frame)))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
244 ; (sit-for 5)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
245 (load "ht-rooms.config" nil t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
246 (unwind-protect (make-screen-for-room "diary" "0" "+62"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
247 ; (sit-for 5)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
248 (unwind-protect (make-screen-for-room "elisp" "-25" "+79"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
249 ; (sit-for 5)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
250 (unwind-protect (make-screen-for-room "news" "-50" "+96"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
251 ; (sit-for 5)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
252 (unwind-protect (make-screen-for-room "mail" "-75" "+113"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
253 (sit-for 1)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
254 (delete-screen scr))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
255 (setq ht-default-config (current-window-configuration)))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
256 ;; vanilla v19 goes here
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
257 (if window-system
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
258 (progn
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
259 (defvar ht-frame-parameter-mods
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
260 '((auto-raise . t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
261 (auto-lower . nil)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
262 (cursor-type . bar)))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
263 (nconc
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
264 (site-caseq ((laptop maritain) (list '(height . 35)))
6
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
265 (t
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
266 (list
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
267 '(font .
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
268 "-adobe-courier-medium-r-normal--14-*"))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
269 ht-frame-parameter-mods
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
270 )
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
271 ;; if we have X, we have ISO-Latin-1, so
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
272 ;; set char codes 128--255 to display as themselves.
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
273 (require 'disp-table)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
274 (standard-display-8bit 161 255)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
275 ; (transient-mark-mode t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
276 ;; hightlight searching in bold
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
277 (setq search-highlight t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
278 (make-face 'isearch)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
279 (copy-face 'bold 'isearch)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
280 ; (set-face-underline-p 'region t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
281 ; (set-face-background 'region "white")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
282 ; (set-face-foreground 'region "black")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
283 ; (setq c++-font-lock-keywords 'undef)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
284 ; (setq c-font-lock-keywords 'undef)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
285 (modify-frame-parameters
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
286 nil
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
287 ht-frame-parameter-mods)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
288 (setq default-frame-alist
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
289 (append
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
290 ht-frame-parameter-mods default-frame-alist))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
291 ;; fix cut and paste
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
292 (setq interprogram-paste-function nil
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
293 interprogram-cut-function nil)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
294 (defun ht-mouse-set-region (click) "set region and primary selection"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
295 (interactive "e")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
296 (mouse-set-region click)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
297 (x-set-selection "PRIMARY" (buffer-substring (point)(mark))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
298 (defun ht-mouse-drag-region (click)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
299 "drag region and set primary selection"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
300 (interactive "e")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
301 (mouse-drag-region click)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
302 (if mark-active
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
303 (x-set-selection "PRIMARY" (buffer-substring (point)(mark)))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
304 (global-set-key [drag-mouse-1] (function ht-mouse-set-region))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
305 (global-set-key [down-mouse-1] (function ht-mouse-drag-region))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
306 (defun ht-mouse-insert-primary (click)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
307 "set point and insert primary selection"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
308 (interactive "e")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
309 (mouse-set-point click)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
310 (push-mark nil nil t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
311 (insert (x-selection)))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
312 (global-set-key [mouse-2] (function ht-mouse-insert-primary))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
313 (setq dired-mode-hook
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
314 '(lambda ()
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
315 (font-lock-mode 1)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
316 (define-key dired-mode-map
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
317 [mouse-2] '(lambda (click)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
318 (interactive "e")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
319 (mouse-set-point click)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
320 (dired-advertised-find-file)))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
321
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
322 (defun ht-rooms-setup (&optional arg)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
323 (interactive)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
324 (require 'mail-extras)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
325 (require 'diary)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
326 (require 'my-news)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
327 ;; override changed default, except in gnus
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
328 (setq mail-use-rfc822 nil)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
329 (add-hook 'gnus-summary-mode-hook
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
330 (function (lambda ()
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
331 (make-local-variable 'mail-use-rfc822)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
332 (setq mail-use-rfc822 t))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
333 (let ((scr (selected-frame)))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
334 (load "ht-rooms.config" nil t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
335 (unwind-protect (make-frame-for-room "elisp" "-25" "-58"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
336 (unwind-protect (progn
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
337 (make-frame-for-room "news" "-50" "-40")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
338 ))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
339 (unwind-protect (progn
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
340 (make-frame-for-room "mail" "-75" "-22")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
341 ))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
342 (unwind-protect (progn
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
343 (make-frame-for-room
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
344 "diary"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
345 "-0"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
346 (concat
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
347 "+"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
348 (format
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
349 "%d"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
350 (-
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
351 (cdr
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
352 (assoc
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
353 'top
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
354 (frame-parameters
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
355 (cdr
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
356 (assoc
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
357 "elisp"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
358 frames-table)))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
359 18))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
360 ))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
361 (make-frame-invisible scr))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
362 (setq ht-default-config (current-window-configuration)))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
363 (setq sgml-insert-missing-element-comment nil)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
364 (add-hook 'sgml-mode-hook 'sgml-fix-para)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
365 ))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
366 ;; v18 emacs only goes here
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
367 (progn
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
368 (require 'compress)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
369 (defun ht-rooms-setup (&optional arg)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
370 (interactive)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
371 (require 'mail-extras)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
372 (require 'diary)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
373 (require 'my-news)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
374 (load "ht-rooms.config" nil t)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
375 (setq ht-default-config (current-window-configuration)))))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
376
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
377 (defun sgml-fix-para ()
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
378 (setq paragraph-separate
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
379 "</[^>]*>\n\\([ \t]+\\| \\)")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
380 (setq paragraph-start
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
381 "^[ \t]*</?[A-Za-z._-]+[ >]"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
382
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
383 (defun highlight-headers-ht-follow-url-netscape (url)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
384 (message "Sending URL to Netscape...")
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
385 (save-excursion
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
386 (set-buffer (get-buffer-create "*Shell Command Output*"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
387 (erase-buffer)
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
388 (if (equal 0 (call-process "netscape" nil t nil "-display" ":0.0"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
389 "-remote"
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
390 (concat "openURL(" url ")")))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
391 ;; it worked
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
392 nil
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
393 ;; it didn't work, so start a new Netscape process.
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
394 (call-process "netscape" nil 0 nil url)))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
395 (message "Sending URL to Netscape... done"))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
396
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
397 (site-caseq (laptop (defun system-name () "francis.markup.co.uk")))
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
398
dccf9e53f179 *** empty log message ***
ht
parents:
diff changeset
399 (cd (user-home-directory))
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
400
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
401 (defun ht-custom-size ()
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
402 (interactive)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
403 (site-caseq ((laptop maritain)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
404 (message (format "pw: %s" (device-pixel-width (selected-device))))))
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
405 (if (fboundp 'device-pixel-width)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
406 (let ((pw (device-pixel-width (selected-device)))
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
407 (ph (device-pixel-height (selected-device))))
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
408 (cond ((= pw 2048)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
409 ;; we're on a _really_ big external monitor
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
410 (set-frame-pixel-size (selected-frame) 900 1050)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
411 (set-frame-position (selected-frame) 0 0))
21
7b2c4ed36302 for new maritain
ht
parents: 19
diff changeset
412 ((= pw 1920)
7b2c4ed36302 for new maritain
ht
parents: 19
diff changeset
413 ;; we're on a 27" curved external monitor
7b2c4ed36302 for new maritain
ht
parents: 19
diff changeset
414 (set-frame-pixel-size (selected-frame) 720 980)
7b2c4ed36302 for new maritain
ht
parents: 19
diff changeset
415 (set-frame-position (selected-frame) -8 2))
19
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
416 ((= pw 1680)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
417 ;; we're on a big external monitor
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
418 (font-menu-set-font nil nil 10)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
419 (set-frame-pixel-size (selected-frame) 900 1000)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
420 (set-frame-position (selected-frame) -3 -20))
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
421 ((= pw 1097)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
422 ;; we're on an XPS 13, mag. 300%
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
423 (require 'font-menu)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
424 (font-menu-set-font nil nil 9)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
425 (set-frame-pixel-size (selected-frame) 583 583); 80 x 39
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
426 (set-frame-position (selected-frame) -5 -26))
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
427 ((= pw 1536)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
428 ;; we're on an XPS 13, mag. 250%
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
429 (require 'font-menu)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
430 (font-menu-set-font nil nil 10)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
431 (set-frame-pixel-size (selected-frame) 670 782); 81 x 49
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
432 (set-frame-position (selected-frame) -5 -26))
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
433 ((= ph 768)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
434 ;; we're on a narrow cinema-ratio laptop
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
435 (set-frame-pixel-size (selected-frame) 690 710)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
436 (set-frame-position (selected-frame) -5 -26))
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
437 ((= ph 900)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
438 ;; we're on a cinema-ratio laptop
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
439 (set-frame-pixel-size (selected-frame) 800 820)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
440 (set-frame-position (selected-frame) -3 -20))
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
441 ((= pw 1600)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
442 ;; we're on a big external monitor
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
443 (set-frame-pixel-size (selected-frame) 900 1120)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
444 (set-frame-position (selected-frame) -3 -20))
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
445 ((= pw 1280)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
446 (cond ((= ph 720)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
447 (set-frame-pixel-size (selected-frame) 700 655)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
448 (set-frame-position (selected-frame) -3 -30))
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
449 (t
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
450 (set-frame-pixel-size (selected-frame) 700 960)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
451 (set-frame-position (selected-frame) -3 -20))))))))
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
452
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
453 (ht-custom-size)
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
454
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
455 ;;; make dired list directories first
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
456 (defadvice dired-insert-directory (before my-dired-insert-directory
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
457 (dir-or-list switches &optional wildcard full-p))
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
458 (setq switches (concat switches " --group-directories-first")))
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
459
cc9c7bc8194a custom-size
ht
parents: 17
diff changeset
460 (ad-activate 'dired-insert-directory)