annotate lib/emacs/pers-init.el @ 96:a7e72a254790

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