comparison pers-init.el @ 32:cb9b76219c55

attempt to merge mail read and send from all over
author Henry S Thompson <ht@inf.ed.ac.uk>
date Sun, 08 Oct 2023 16:36:27 +0100
parents 0e5b39d2f8bb
children ce71d12b00ad
comparison
equal deleted inserted replaced
31:129123962e51 32:cb9b76219c55
5 ;;; Last edited: Fri Sep 25 09:22:22 1992 5 ;;; Last edited: Fri Sep 25 09:22:22 1992
6 ;;; Edit history since port: made load-path not site-dependant 6 ;;; Edit history since port: made load-path not site-dependant
7 ;;; split into common-init for all my incarnations and pers-init for private 7 ;;; split into common-init for all my incarnations and pers-init for private
8 ;;; added lemacs compatibility 8 ;;; added lemacs compatibility
9 9
10 ;;; HACK to deal with current x-crash workaround that I use a tty-launched
11 ;;; xemacs via gnuclient from an X environment
12 ;;; Not sure this is still needed 2023-10-07
13 (if (and (eq
14 (device-type (frame-device (get-frame-for-buffer (current-buffer))))
15 'x)
16 (not (getenv "DISPLAY")))
17 (progn (message "setting DISPLAY in env")
18 (setenv "DISPLAY" ":0")))
19
10 ;;; mail stuff 20 ;;; mail stuff
11 (setq mail-archive-file-name "~/mail/cpy/general") 21 (site-caseq (edin
22 (setq mail-archive-file-name (concat "/disk/scratch/mail/cpy/general/"
23 (format-time-string
24 "%Y-%m" (current-time))
25 ".mbox"))
26 (t (setq mail-archive-file-name "~/mail/cpy/general"))))
27
28
12 (setq rmail-dont-reply-to-names "hthompso*\\|h\\.thompso*\\|ht@*" ) 29 (setq rmail-dont-reply-to-names "hthompso*\\|h\\.thompso*\\|ht@*" )
13 (set-default 'ht-last-file (expand-file-name "~/mail/")) 30
14 (setq ht-diary-file-name "~/mail/diary.babyl") 31 (site-caseq (edin
15 (setq mail-append-host "inf.ed.ac.uk") 32 (setq rmail-show-mime nil)
33 (set-default 'ht-last-file (expand-file-name "/disk/scratch/mail/"))
34 (setq ht-diary-file-name "/disk/scratch/mail/diary.babyl")
35 (setq user-mail-address "ht@inf.ed.ac.uk")
36 (setq mail-append-host "inf.ed.ac.uk")
37 (setq mail-host-address "inf.ed.ac.uk")))
38
16 (setq user-full-name "Henry S. Thompson") 39 (setq user-full-name "Henry S. Thompson")
17 (setq user-mail-address "ht@inf.ed.ac.uk")
18 (setq mail-host-address "inf.ed.ac.uk")
19 40
20 ;; new mail hackery 41 ;; new mail hackery
21 (site-caseq ((edin ircs ldc) 42 (site-caseq ((edin ircs ldc)
22 (setq rmail-spool-directory (file-name-as-directory 43 (setq rmail-spool-directory (file-name-as-directory
23 (concat rmail-spool-directory 44 (concat rmail-spool-directory
24 "ht-mail"))))) 45 "ht-mail")))))
25
26 ;; sending mail on the road
27 ;; [moved to mail-from-m.el, which is required by gnus-init.el
28
29 ;; don't know why this is necessary 46 ;; don't know why this is necessary
30 (site-caseq ((edin) 47 (site-caseq ((edin)
31 (setq rmail-primary-inbox-list 48 (setq rmail-primary-inbox-list
32 (list (concat rmail-spool-directory "ht"))))) 49 (list (concat rmail-spool-directory "ht")))))
33 50
34 ;; Perforce
35
36 ;;(setq p4-global-server-port "zorg.milowski.com:1666")
37 ;;(setenv "P4PORT" "zorg.milowski.com:1666")
38 ;;(setenv "P4CLIENT" "MarkupMan")
39 ;;(setenv "P4CONFIG" ".p4env")
40 ;;(load-library "p4")
41 ;;(setq p4-use-p4config-exclusively t)
42 ;;(p4-set-p4-executable "/c/Program Files/Perforce/p4.exe")
43 (setq vc-command-messages t) 51 (setq vc-command-messages t)
44 52
45 (setq minibuffer-max-depth nil) 53 (setq minibuffer-max-depth nil)
46 (defun run-kcl () 54 (defun run-kcl ()
47 "Run an inferior kcl process" 55 "Run an inferior kcl process"
50 (inferior-lisp-mode)) 58 (inferior-lisp-mode))
51 59
52 (require 'mdn-extras) 60 (require 'mdn-extras)
53 (setq auto-mode-alist 61 (setq auto-mode-alist
54 (append '(("/perl/" . perl-mode) 62 (append '(("/perl/" . perl-mode)
55 ("\\.scm$" . scheme-mode)) 63 ("\\.scm$" . scheme-mode)
64 ("\\.dsl$" . lisp-mode))
56 auto-mode-alist)) 65 auto-mode-alist))
57 (setq inferior-lisp-program "scheme") 66 (setq inferior-lisp-program "scheme")
58 ;;; for scheme 67 ;;; for scheme
59 (put 'letrec 'lisp-indent-function 1) 68 (put 'letrec 'lisp-indent-function 1)
60 (put 'case 'lisp-indent-function 1) 69 (put 'case 'lisp-indent-function 1)
61 70
62 (site-caseq (parc (nconc load-path '("/import/local/emacs/gnus-3.13/")) 71 (site-caseq (parc (nconc load-path '("/import/local/emacs/gnus-3.13/"))
63 (setq rmail-primary-inbox-list 72 (setq rmail-primary-inbox-list
64 '("~/mbox" "/net/piglet/usr/spool/mail/$USER"))) 73 '("~/mbox" "/net/piglet/usr/spool/mail/$USER"))))
65 (edin (setq load-path (cons
66 "/home/ht/emacs/shared/gnus-5.0.15/lisp"
67 load-path))))
68 74
69 (defun run-sicstus () 75 (defun run-sicstus ()
70 "Run an inferior Prolog process, input and output via buffer *prolog*." 76 "Run an inferior Prolog process, input and output via buffer *prolog*."
71 (interactive) 77 (interactive)
72 (if (not (boundp 'prolog-mode-map)) 78 (if (not (boundp 'prolog-mode-map))
78 (require 'shell) 84 (require 'shell)
79 (switch-to-buffer (make-shell "prolog" (site-caseq (edin "sicstus") 85 (switch-to-buffer (make-shell "prolog" (site-caseq (edin "sicstus")
80 (parc "prolog")))) 86 (parc "prolog"))))
81 (inferior-prolog-mode)) 87 (inferior-prolog-mode))
82 88
83 (site-caseq ((laptop maritain)) 89 (require 'hist)
84 (t(require 'hist) 90 (rplacd (assoc "*shell*" hk-pat-table)
85 (rplacd (assoc "*shell*" hk-pat-table) 91 "[a-z]+<[0-9]+>: ")
86 "[a-z]+<[0-9]+>: ")))
87 92
88 ;; turn off suspend-emacs -- use pause-emacs (^X.) instead 93 ;; turn off suspend-emacs -- use pause-emacs (^X.) instead
89 (global-unset-key "\C-Z") 94 (global-unset-key "\C-Z")
90 (global-unset-key "\C-x\C-z") 95 (global-unset-key "\C-x\C-z")
91 96
92 (global-set-key "\C-xl" (function goto-line)) 97 (global-set-key "\C-xl" (function goto-line))
93 98
94 ;(require 'repl-comment) 99 (require 'repl-comment)
95 100
96 ;(require 'compress) 101 (require 'compress)
97 102
98 (if (string-match "Lucid" emacs-version) 103 (if (string-match "Lucid" emacs-version)
99 (site-caseq ((laptop maritain))
100 (t(require 'lemacs-compat))))
101
102 (if (boundp 'epoch::version)
103 ;; epoch only goes here
104 (progn 104 (progn
105 (if (string-match "4\\."emacs-version) 105 (require 'lemacs-compat)))
106 (load "motion4" nil t) 106
107 (load "motion" nil t)) 107 (if window-system
108 (redisplay-frame) 108 (progn
109 109 (add-hook 'sh-mode-hook '(lambda ()
110 (require 'alarm) 110 (font-lock-mode 1)))
111 (idle-save 15) 111 (add-hook 'perl-mode-hook '(lambda ()
112 112 (font-lock-mode 1)))
113 (defun ht-rooms-setup (&optional arg) 113 (add-hook 'emacs-lisp-mode-hook '(lambda ()
114 (interactive) 114 (font-lock-mode 1)))
115 (redisplay-frame) 115 (add-hook 'lisp-mode-hook '(lambda ()
116 (require 'mail-extras) 116 (font-lock-mode 1)))
117 (require 'diary) 117 (add-hook 'sgml-mode-hook '(lambda ()
118 (require 'my-news) 118 (if (not
119 (let ((scr (current-frame))) 119 (boundp 'sgml-font-lock-keywords))
120 (load "ht-rooms-epoch.config" nil t) 120 (load "sgml-font-lock-keywords" t t))
121 (unwind-protect (make-frame-for-room "diary" "-0" "+130")) 121 (setq adaptive-fill-mode nil)
122 (unwind-protect (make-frame-for-room "elisp" "-25" "+148")) 122 (font-lock-mode 1)
123 (unwind-protect (make-frame-for-room "news" "-50" "+166")) 123 ))
124 (unwind-protect (make-frame-for-room "mail" "-75" "+184")) 124 (add-hook 'c-mode-hook '(lambda ()
125 (epoch::delete-frame scr)) 125 (font-lock-mode 1)))
126 ;; presumably this is now frame local, so not quite the right thing. 126 (add-hook 'c++-mode-hook '(lambda ()
127 (setq ht-default-config (current-window-configuration))) 127 (font-lock-mode 1)))
128 (add-hook 'scheme-mode-hook
129 '(lambda ()
130 (setq
131 scheme-font-lock-keywords
132 (if (or
133 (boundp 'lisp-font-lock-keywords)
134 (load "lisp-font-lock-keywords" t t))
135 lisp-font-lock-keywords))
136 (font-lock-mode 1)))
137 (add-hook 'python-mode-hook '(lambda ()
138 (font-lock-mode 1)))
139 (setq sgml-insert-missing-element-comment nil)
140 (load "psgml" nil t)
141 (load "psgml-edit" nil t)
142 ;; (load "xml-hack" nil t)
143 ; (setq sgml-catalog-files '("CATALOG" "f:/lib/sgml/catalog"))
144 (if (string-match "i386" (emacs-version))
145 (progn (defun win32-get-clipboard-data-cmd ()
146 (interactive)(insert (win32-get-clipboard-data)))
147 (global-set-key
148 "\C-x\C-y" 'win32-get-clipboard-data-cmd)))
128 )) 149 ))
129 (if (string-match "^\\(19\\|2\\)" emacs-version) 150
130 (progn
131 ;; common v19
132 (if window-system
133 (progn
134 (add-hook 'sh-mode-hook '(lambda ()
135 (font-lock-mode 1)))
136 (add-hook 'lsl-mode-hook '(lambda ()
137 (font-lock-mode 1)))
138 (add-hook 'perl-mode-hook '(lambda ()
139 (font-lock-mode 1)))
140 (add-hook 'emacs-lisp-mode-hook '(lambda ()
141 (font-lock-mode 1)))
142 (add-hook 'lisp-mode-hook '(lambda ()
143 (font-lock-mode 1)))
144 (add-hook 'sgml-mode-hook '(lambda ()
145 (if (not
146 (boundp 'sgml-font-lock-keywords))
147 (load "sgml-font-lock-keywords" t t))
148 (setq adaptive-fill-mode nil)
149 (font-lock-mode 1)
150 ))
151 (add-hook 'c-mode-hook '(lambda ()
152 (font-lock-mode 1)))
153 (add-hook 'c++-mode-hook '(lambda ()
154 (font-lock-mode 1)))
155 (add-hook 'scheme-mode-hook
156 '(lambda ()
157 (setq
158 scheme-font-lock-keywords
159 (if (or
160 (boundp 'lisp-font-lock-keywords)
161 (load "lisp-font-lock-keywords" t t))
162 lisp-font-lock-keywords))
163 (font-lock-mode 1)))
164 (add-hook 'python-mode-hook '(lambda ()
165 (font-lock-mode 1)))
166 (setq py-python-command "//c/Program Files/Python22/python")
167 (setq sgml-insert-missing-element-comment nil)
168 (load "psgml" nil t)
169 (load "psgml-edit" nil t)
170 ;; (load "xml-hack" nil t)
171 ; (setq sgml-catalog-files '("CATALOG" "f:/lib/sgml/catalog"))
172 (if (string-match "i386" (emacs-version))
173 (progn (defun win32-get-clipboard-data-cmd ()
174 (interactive)(insert (win32-get-clipboard-data)))
175 (global-set-key
176 "\C-x\C-y" 'win32-get-clipboard-data-cmd)))
177 ;; gnus
178 ; (setq mail-signature t)
179
180 ;; loading gnus postponed to e.g. mail-from-delphix, q.v.
181
182 ; (require 'gnus-min)
183 ))
184 (load "gnus-init" nil t)
185
186 ;; (require 'idle)
187 ;; (idle-save 15)
188 151
189 (if (string-match "Lucid" emacs-version) 152 (site-caseq (edin
190 ;; lemacs only goes here 153 (setq sgml-catalog-files '("catalog" "/afs/inf.ed.ac.uk/user/h/ht/lib/sgml/catalog"))))
191 (progn 154
192 (message "lem") 155 (if (string-match "Lucid" emacs-version)
193 (setq bbdb-north-american-phone-numbers-p nil) 156 ;; lemacs only goes here
194 (setq bbdb-use-pop-up nil) 157 (progn
195 (require 'mail-abbrevs) 158 (message "lem")
196 (require 'bbdb) 159 ;; DICE comes here 2012-01-13
197 ;(require 'bbdb-rmail) 160 (setq package-get-remove-copy nil)
198 (require 'bbdb-com) ; to fix auto-fill 161 (require 'mail-abbrevs)
199 (setq mail-use-rfc822 nil) 162 (setq bbdb-north-american-phone-numbers-p nil)
200 (add-hook 'gnus-summary-mode-hook 163 (setq bbdb-use-pop-up nil)
201 (function (lambda () 164 (setq bbdb-complete-name-allow-cycling t
202 (make-local-variable 'mail-use-rfc822) 165 bbdb-completion-type 'primary-or-name)
203 (setq mail-use-rfc822 t)))) 166 (setq bbdb-quiet-about-name-mismatches t)
204 (if (>= emacs-major-version 21) 167 (setq bbdb-always-add-addresses t)
205 (progn 168 (setq bbdb-new-nets-always-primary t)
206 (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus) 169 (site-caseq (edin
207 (add-hook 'gnus-startup-hook 'bbdb-insinuate-message))) 170 (setq bbdb-file "/disk/scratch/mail/.bbdb")))
208 (fset 'bbdb-auto-fill-function (lambda () t)) ; ditto 171 (setq bbdb-hashtable-size 24203)
209 (fmakunbound 'bbdb-orig-rmail-expunge) 172 (require 'bbdb)
210 ;(add-hook 'rmail-mode-hook 'bbdb-insinuate-rmail) 173 ;(require 'bbdb-rmail)
211 (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus) 174 (require 'bbdb-com) ; to fix auto-fill
212 (add-hook 'mail-setup-hook 'bbdb-insinuate-sendmail) 175 (setq mail-use-rfc822 nil)
213 (setq bbdb-dwim-net-address-allow-redundancy t) 176 (add-hook 'gnus-summary-mode-hook
214 (add-hook 'mail-setup-hook 'bbdb-define-all-aliases) 177 (function (lambda ()
215 (add-hook 'gnus-message-setup-hook 'bbdb-define-all-aliases) 178 (make-local-variable 'mail-use-rfc822)
216 (if (not (fboundp 'define-mail-abbrev)) 179 (setq mail-use-rfc822 t))))
217 ;; fix a bug which crashes occasionally -- see also 180 (if (>= emacs-major-version 21)
218 ;; bbdb-com 181 (progn
219 (progn 182 (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
220 (require 'sendmail) 183 (add-hook 'gnus-startup-hook 'bbdb-insinuate-message)))
221 ;(defadvice sendmail-pre-abbrev-expand-hook 184 (fset 'bbdb-auto-fill-function (lambda () t)) ; ditto
222 ; (before bbdb-rebuilt-all-aliases activate) 185 (fmakunbound 'bbdb-orig-rmail-expunge)
223 ; (bbdb-rebuilt-all-aliases)) 186 ;(add-hook 'rmail-mode-hook 'bbdb-insinuate-rmail)
224 )) 187 (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
225 (defun gnuserv-start-maybe () 188 (add-hook 'mail-setup-hook 'bbdb-insinuate-sendmail)
226 (if (not (frame-live-p gnuserv-frame)) 189 (setq bbdb-dwim-net-address-allow-redundancy t)
227 (gnuserv-start))) 190 (add-hook 'mail-setup-hook 'bbdb-define-all-aliases)
191 (add-hook 'gnus-message-setup-hook 'bbdb-define-all-aliases)
192 (if (not (fboundp 'define-mail-abbrev))
193 ;; fix a bug which crashes occasionally -- see also
194 ;; bbdb-com
195 (progn
196 (require 'sendmail)
197 ;(defadvice sendmail-pre-abbrev-expand-hook
198 ; (before bbdb-rebuilt-all-aliases activate)
199 ; (bbdb-rebuilt-all-aliases))
200 ))
201 (defun gnuserv-start-maybe ()
202 (if (not (frame-live-p gnuserv-frame))
203 (gnuserv-start)))
228 ;;; (require 'itimer) 204 ;;; (require 'itimer)
229 ;;; (start-itimer "gsr" 'gnuserv-start-maybe 205 ;;; (start-itimer "gsr" 'gnuserv-start-maybe
230 ;;; 1200 1200 nil nil) 206 ;;; 1200 1200 nil nil)
231 207
232 (if window-system 208 (if window-system
233 (progn 209 (progn
234 (require 'highlight-headers) 210 (message "window-system-1")
235 (defun rmail-fontify-headers () 211 ;; DICE comes here 2012-01-13
236 (highlight-headers (point-min) (point-max) t)) 212 (require 'highlight-headers)
237 (add-hook 'rmail-show-message-hook 'rmail-fontify-headers) 213 (defun rmail-fontify-headers ()
238 (setq dired-mode-hook 214 (highlight-headers (point-min) (point-max) t))
239 '(lambda () 215 (add-hook 'rmail-show-message-hook 'rmail-fontify-headers)
240 (font-lock-mode 1) 216 (setq dired-mode-hook
241 (define-key dired-mode-map 217 '(lambda ()
242 [button2] '(lambda (click) 218 (font-lock-mode 1)
243 (interactive "e") 219 (define-key dired-mode-map
244 (mouse-set-point click) 220 [button2] '(lambda (click)
245 (dired-advertised-find-file))))) 221 (interactive "e")
246 ;; (setq highlight-headers-follow-url-function 222 (mouse-set-point click)
247 ;; 'highlight-headers-ht-follow-url-netscape 223 (dired-advertised-find-file)))))
248 ;; browse-url-browser-function 224 (set-face-background 'modeline '((x) . "lightgrey"))
249 ;;'highlight-headers-ht-follow-url-netscape) 225 ))
250 )) 226 ;; DICE comes here 2012-01-13
251 ;; (load "~rjc/public_html/device-type-hacking.el") 227 (load "device-type-hacking" t t)
252 (load "perl-mode" nil t) 228 (message "dth")
253 (defun ht-rooms-setup (&optional arg) 229 (site-caseq (edin
254 (interactive) 230 (defun ht-rooms-setup (&optional arg)
255 (require 'mail-extras) 231 (interactive)
256 (require 'diary) 232 (require 'mail-extras)
257 (require 'my-news) 233 (require 'diary)
258 ;; override changed default, except in gnus 234 ;; override changed default, except in gnus
259 (setq mail-use-rfc822 nil) 235 (setq mail-use-rfc822 nil)
260 (add-hook 'gnus-summary-mode-hook 236 (add-hook 'gnus-summary-mode-hook
261 (function (lambda () 237 (function (lambda ()
262 (make-local-variable 'mail-use-rfc822) 238 (make-local-variable 'mail-use-rfc822)
263 (setq mail-use-rfc822 t)))) 239 (setq mail-use-rfc822 t))))
264 (if (>= emacs-major-version 21) 240 (if (>= emacs-major-version 21)
265 (progn 241 (progn
266 (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus) 242 (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
267 (add-hook 'gnus-startup-hook 'bbdb-insinuate-message))) 243 (add-hook 'gnus-startup-hook 'bbdb-insinuate-message)))
268 (defun ht-rooms-setup (&optional arg) 244 (defun ht-rooms-setup (&optional arg)
269 (interactive) 245 (interactive)
270 (require 'mail-extras) 246 (require 'mail-extras)
271 (require 'diary) 247 (require 'diary)
272 (let ((scr (selected-frame))) 248 (let ((scr (selected-frame)))
273 ; (sit-for 5) 249 ; (sit-for 5)
274 (load "ht-rooms.config" nil t) 250 (load "ht-rooms.config" nil t)
275 (unwind-protect (make-screen-for-room "diary" "0" "+62")) 251 (unwind-protect (make-screen-for-room "diary" "0" "+62"))
276 ; (sit-for 5) 252 ; (sit-for 5)
277 (unwind-protect (make-screen-for-room "elisp" "-25" "+79")) 253 (unwind-protect (make-screen-for-room "elisp" "-25" "+79"))
278 ; (sit-for 5) 254 ; (sit-for 5)
279 (unwind-protect (make-screen-for-room "news" "-50" "+96")) 255 (unwind-protect (make-screen-for-room "news" "-50" "+96"))
280 ; (sit-for 5) 256 ; (sit-for 5)
281 (unwind-protect (make-screen-for-room "mail" "-75" "+113")) 257 (unwind-protect (make-screen-for-room "mail" "-75" "+113"))
282 (sit-for 1) 258 (sit-for 1)
283 (delete-screen scr)) 259 (delete-screen scr))
284 (setq ht-default-config (current-window-configuration))))) 260 (setq ht-default-config (current-window-configuration)))))
285 ;; vanilla v19 goes here
286 (if window-system
287 (progn
288 (defvar ht-frame-parameter-mods
289 '((auto-raise . t)
290 (auto-lower . nil)
291 (cursor-type . bar)))
292 (nconc
293 (site-caseq ((laptop maritain) (list '(height . 35)))
294 (t
295 (list
296 '(font .
297 "-adobe-courier-medium-r-normal--14-*"))))
298 ht-frame-parameter-mods
299 ) 261 )
300 ;; if we have X, we have ISO-Latin-1, so 262 (message "gnus-init")
301 ;; set char codes 128--255 to display as themselves. 263 (require 'gnus-init)
302 (require 'disp-table) 264 )
303 (standard-display-8bit 161 255) 265 ;; vanilla v19 goes here
266 ;; probably stale/broken
267 (message "vanilla")
268 (if window-system
269 (progn
270 (message "window-system-2")
271 (defvar ht-frame-parameter-mods
272 '((auto-raise . t)
273 (auto-lower . nil)
274 (cursor-type . bar)))
275 (nconc
276 (site-caseq ((laptop maritain) (list '(height . 35)))
277 (t
278 (list
279 '(font .
280 "-adobe-courier-medium-r-normal--14-*"))))
281 ht-frame-parameter-mods
282 )
283 ;; if we have X, we have ISO-Latin-1, so
284 ;; set char codes 128--255 to display as themselves.
285 (require 'disp-table)
286 (standard-display-8bit 161 255)
304 ; (transient-mark-mode t) 287 ; (transient-mark-mode t)
305 ;; hightlight searching in bold 288 ;; hightlight searching in bold
306 (setq search-highlight t) 289 (setq search-highlight t)
307 (make-face 'isearch) 290 (make-face 'isearch)
308 (copy-face 'bold 'isearch) 291 (copy-face 'bold 'isearch)
309 ; (set-face-underline-p 'region t) 292 ; (set-face-underline-p 'region t)
310 ; (set-face-background 'region "white") 293 ; (set-face-background 'region "white")
311 ; (set-face-foreground 'region "black") 294 ; (set-face-foreground 'region "black")
312 ; (setq c++-font-lock-keywords 'undef) 295 ; (setq c++-font-lock-keywords 'undef)
313 ; (setq c-font-lock-keywords 'undef) 296 ; (setq c-font-lock-keywords 'undef)
314 (modify-frame-parameters 297 (modify-frame-parameters
315 nil 298 nil
316 ht-frame-parameter-mods) 299 ht-frame-parameter-mods)
317 (setq default-frame-alist 300 (setq default-frame-alist
318 (append 301 (append
319 ht-frame-parameter-mods default-frame-alist)) 302 ht-frame-parameter-mods default-frame-alist))
320 ;; fix cut and paste 303 ;; fix cut and paste
321 (setq interprogram-paste-function nil 304 (setq interprogram-paste-function nil
322 interprogram-cut-function nil) 305 interprogram-cut-function nil)
323 (defun ht-mouse-set-region (click) "set region and primary selection" 306 (defun ht-mouse-set-region (click) "set region and primary selection"
324 (interactive "e") 307 (interactive "e")
325 (mouse-set-region click) 308 (mouse-set-region click)
326 (x-set-selection "PRIMARY" (buffer-substring (point)(mark)))) 309 (x-set-selection "PRIMARY" (buffer-substring (point)(mark))))
327 (defun ht-mouse-drag-region (click) 310 (defun ht-mouse-drag-region (click)
328 "drag region and set primary selection" 311 "drag region and set primary selection"
329 (interactive "e") 312 (interactive "e")
330 (mouse-drag-region click) 313 (mouse-drag-region click)
331 (if mark-active 314 (if mark-active
332 (x-set-selection "PRIMARY" (buffer-substring (point)(mark))))) 315 (x-set-selection "PRIMARY" (buffer-substring (point)(mark)))))
333 (global-set-key [drag-mouse-1] (function ht-mouse-set-region)) 316 (global-set-key [drag-mouse-1] (function ht-mouse-set-region))
334 (global-set-key [down-mouse-1] (function ht-mouse-drag-region)) 317 (global-set-key [down-mouse-1] (function ht-mouse-drag-region))
335 (defun ht-mouse-insert-primary (click) 318 (defun ht-mouse-insert-primary (click)
336 "set point and insert primary selection" 319 "set point and insert primary selection"
337 (interactive "e") 320 (interactive "e")
338 (mouse-set-point click) 321 (mouse-set-point click)
339 (push-mark nil nil t) 322 (push-mark nil nil t)
340 (insert (x-selection))) 323 (insert (x-selection)))
341 (global-set-key [mouse-2] (function ht-mouse-insert-primary)) 324 (global-set-key [mouse-2] (function ht-mouse-insert-primary))
342 (setq dired-mode-hook 325 (setq dired-mode-hook
343 '(lambda () 326 '(lambda ()
344 (font-lock-mode 1) 327 (font-lock-mode 1)
345 (define-key dired-mode-map 328 (define-key dired-mode-map
346 [mouse-2] '(lambda (click) 329 [mouse-2] '(lambda (click)
347 (interactive "e") 330 (interactive "e")
348 (mouse-set-point click) 331 (mouse-set-point click)
349 (dired-advertised-find-file))))) 332 (dired-advertised-find-file)))))
350 333
351 (defun ht-rooms-setup (&optional arg) 334 (defun ht-rooms-setup (&optional arg)
352 (interactive) 335 (interactive)
353 (require 'mail-extras) 336 (require 'mail-extras)
354 (require 'diary) 337 (require 'diary)
355 (require 'my-news) 338 (require 'my-news)
356 ;; override changed default, except in gnus 339 ;; override changed default, except in gnus
357 (setq mail-use-rfc822 nil) 340 (setq mail-use-rfc822 nil)
358 (add-hook 'gnus-summary-mode-hook 341 (add-hook 'gnus-summary-mode-hook
359 (function (lambda () 342 (function (lambda ()
360 (make-local-variable 'mail-use-rfc822) 343 (make-local-variable 'mail-use-rfc822)
361 (setq mail-use-rfc822 t)))) 344 (setq mail-use-rfc822 t))))
362 (let ((scr (selected-frame))) 345 (let ((scr (selected-frame)))
363 (load "ht-rooms.config" nil t) 346 (load "ht-rooms.config" nil t)
364 (unwind-protect (make-frame-for-room "elisp" "-25" "-58")) 347 (unwind-protect (make-frame-for-room "elisp" "-25" "-58"))
365 (unwind-protect (progn 348 (unwind-protect (progn
366 (make-frame-for-room "news" "-50" "-40") 349 (make-frame-for-room "news" "-50" "-40")
367 )) 350 ))
368 (unwind-protect (progn 351 (unwind-protect (progn
369 (make-frame-for-room "mail" "-75" "-22") 352 (make-frame-for-room "mail" "-75" "-22")
370 )) 353 ))
371 (unwind-protect (progn 354 (unwind-protect (progn
372 (make-frame-for-room 355 (make-frame-for-room
373 "diary" 356 "diary"
374 "-0" 357 "-0"
375 (concat 358 (concat
376 "+" 359 "+"
377 (format 360 (format
378 "%d" 361 "%d"
379 (- 362 (-
380 (cdr 363 (cdr
381 (assoc 364 (assoc
382 'top 365 'top
383 (frame-parameters 366 (frame-parameters
384 (cdr 367 (cdr
385 (assoc 368 (assoc
386 "elisp" 369 "elisp"
387 frames-table))))) 370 frames-table)))))
388 18)))) 371 18))))
389 )) 372 ))
390 (make-frame-invisible scr)) 373 (make-frame-invisible scr))
391 (setq ht-default-config (current-window-configuration)))))) 374 (setq ht-default-config (current-window-configuration))))))
392 (setq sgml-insert-missing-element-comment nil) 375 (setq sgml-insert-missing-element-comment nil)
393 (add-hook 'sgml-mode-hook 'sgml-fix-para) 376 (load "psgml" nil t)
394 ) 377 (load "psgml-edit" nil t)
395 ;; v18 emacs only goes here 378 (load "xml-hack" nil t)
396 (progn 379 (add-hook 'sgml-mode-hook 'sgml-fix-para)
397 (require 'compress) 380 ;; v18 emacs only was here
398 (defun ht-rooms-setup (&optional arg)
399 (interactive)
400 (require 'mail-extras)
401 (require 'diary)
402 (require 'my-news)
403 (load "ht-rooms.config" nil t)
404 (setq ht-default-config (current-window-configuration)))))
405 381
406 (defun ht-rooms-resetup () 382 (defun ht-rooms-resetup ()
407 (interactive) 383 (interactive)
408 (setq rooms-table nil) 384 (setq rooms-table nil)
409 (setq frames-table nil) 385 (setq frames-table nil)
427 nil 403 nil
428 ;; it didn't work, so start a new Netscape process. 404 ;; it didn't work, so start a new Netscape process.
429 (call-process "netscape" nil 0 nil url))) 405 (call-process "netscape" nil 0 nil url)))
430 (message "Sending URL to Netscape... done")) 406 (message "Sending URL to Netscape... done"))
431 407
432 (site-caseq (laptop (defun system-name () "francis.markup.co.uk"))) 408 ;;; Moved from custom.el -- not customisable, I think. . .
409 (setq
410 ecb-options-version "2.27"
411 gnus-treat-display-smileys nil
412 gnus-treat-from-picon nil
413 gnus-treat-mail-picon nil
414 gnus-treat-newsgroups-picon nil
415 jde-enable-abbrev-mode t
416 package-get-require-signed-base-updates nil
417 pgg-passphrase-cache-expiry 36000
418 pui-package-install-dest-dir "/afs/inf.ed.ac.uk/user/h/ht/.xemacs/xemacs-packages"
419 efs-ftp-program-args '("-i" "-n" "-g" "-v")
420 efs-use-passive-mode t ; actually turns it _off_ !
421 )
422
423 (custom-set-faces
424 '(font-lock-builtin-face ((((type x mswindows)(class color)(background light))(:foreground "Purple"))(((type tty)(class color))(:foreground "magenta"))))
425 '(font-lock-comment-face ((((type x mswindows)(class color)(background light))(:foreground "blue4"))(((type tty)(class color))(:foreground "blue"))))
426 '(font-lock-constant-face ((((type x mswindows)(class color)(background light))(:foreground "CadetBlue"))(((type tty)(class color))(:foreground "cyan"))))
427 '(font-lock-doc-string-face ((((type x mswindows)(class color)(background light))(:foreground "green4"))(((type tty)(class color))(:foreground "green"))))
428 '(font-lock-function-name-face ((((type x mswindows)(class color)(background light))(:foreground "brown4"))(((type tty)(class color))(:foreground "cyan" :bold))))
429 '(font-lock-keyword-face ((((type x mswindows)(class color)(background light))(:foreground "red4"))(((type tty)(class color))(:foreground "red" :bold))))
430 '(font-lock-preprocessor-face ((((type x mswindows)(class color)(background light))(:foreground "blue3"))(((type tty)(class color))(:foreground "cyan" :bold))))
431 '(font-lock-reference-face ((((type x mswindows)(class color)(background light))(:foreground "red3"))(((type tty)(class color))(:foreground "red"))))
432 '(font-lock-string-face ((((type x mswindows)(class color)(background light))(:foreground "green4"))(((type tty)(class color))(:foreground "green" :bold))))
433 '(font-lock-type-face ((((type x mswindows)(class color)(background light))(:foreground "steelblue"))(((type tty)(class color))(:foreground "cyan" :bold))))
434 '(font-lock-variable-name-face ((((type x mswindows)(class color)(background light))(:foreground "magenta4"))(((type tty)(class color))(:foreground "magenta" :bold))))
435 '(font-lock-warning-face ((((type x mswindows)(class color)(background light))(:foreground "Red" :bold))(((type tty)(class color))(:foreground "red" :bold))))
436 )
437
438 (custom-set-faces
439 '(modeline (
440 (((type x mswindows)(class color))
441 (:foreground "black" :background "gray80"))
442 (t
443 (:foreground "black" :background "white"))))
444 '(modeline-buffer-id (
445 (((type x mswindows)(class color))
446 (:foreground "blue4" :background "gray80"))
447 (((type tty)(class color))
448 (:foreground "blue" :background "white"))
449 (t
450 (:foreground "black" :background "white" :bold t))))
451 '(modeline-mousable (
452 (((type x mswindows)(class color))
453 (:foreground "firebrick" :background "gray80"))
454 (((type tty)(class color))
455 (:foreground "red" :background "white"))
456 (t
457 (:foreground "black" :background "white"))))
458 '(modeline-mousable-minor-mode (
459 (((type x mswindows)(class color))
460 (:foreground "green4" :background "gray80"))
461 (((type tty)(class color))
462 (:foreground "green" :background "white" :bold t))
463 (t
464 (:foreground "black" :background "white"))))
465 )
433 466
434 (cd (user-home-directory)) 467 (cd (user-home-directory))
435 468
436 (require 'misc) ; used to be in common-init... 469 (require 'misc) ; used to be in common-init...
437 470