Mercurial > hg > xemacs
comparison shared/pers-init.el @ 3:0a81352bd7d0
catch up
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Sat, 17 Sep 2022 11:01:40 +0100 |
parents | dd557432d846 |
children |
comparison
equal
deleted
inserted
replaced
2:dd557432d846 | 3:0a81352bd7d0 |
---|---|
96 | 96 |
97 (if (string-match "Lucid" emacs-version) | 97 (if (string-match "Lucid" emacs-version) |
98 (progn | 98 (progn |
99 (require 'lemacs-compat))) | 99 (require 'lemacs-compat))) |
100 | 100 |
101 (if (string-match "^\\(19\\|2\\)" emacs-version) | |
102 (progn | |
103 ;; common v19 and ater | |
104 (if window-system | 101 (if window-system |
105 (progn | 102 (progn |
106 (add-hook 'sh-mode-hook '(lambda () | 103 (add-hook 'sh-mode-hook '(lambda () |
107 (font-lock-mode 1))) | 104 (font-lock-mode 1))) |
108 (setq perl-mode-hook '(lambda () | 105 (setq perl-mode-hook '(lambda () |
138 (setq sgml-catalog-files '("catalog" "/afs/inf.ed.ac.uk/user/h/ht/lib/sgml/catalog")) | 135 (setq sgml-catalog-files '("catalog" "/afs/inf.ed.ac.uk/user/h/ht/lib/sgml/catalog")) |
139 | 136 |
140 (if (string-match "Lucid" emacs-version) | 137 (if (string-match "Lucid" emacs-version) |
141 ;; lemacs only goes here | 138 ;; lemacs only goes here |
142 (progn | 139 (progn |
143 (if (< emacs-major-version 21) | |
144 (setq load-path | |
145 (append '("/usr/contrib/lib/xemacs/site-lisp/xml" | |
146 "/usr/contrib/lib/xemacs/site-lisp/psgml") | |
147 load-path)) | |
148 ; (pui-add-install-directory | |
149 ; "/net/sunsite.doc.ic.ac.uk/public/pub/Mirrors/ftp.xemacs.org/pub/xemacs/packages") | |
150 ; (setq load-path (remove "/usr/contrib/lib/xemacs/xemacs-packages/lisp/gnus/" load-path)) | |
151 ;; DICE comes here 2012-01-13 | 140 ;; DICE comes here 2012-01-13 |
152 (setq package-get-remove-copy nil) | 141 (setq package-get-remove-copy nil) |
153 (setq bbdb-north-american-phone-numbers-p nil) | 142 (setq bbdb-north-american-phone-numbers-p nil) |
154 (setq bbdb-use-pop-up nil) | 143 (setq bbdb-use-pop-up nil) |
155 (setq bbdb-complete-name-allow-cycling t | 144 (setq bbdb-complete-name-allow-cycling t |
157 (setq bbdb-quiet-about-name-mismatches t) | 146 (setq bbdb-quiet-about-name-mismatches t) |
158 (setq bbdb-always-add-addresses t) | 147 (setq bbdb-always-add-addresses t) |
159 (setq bbdb-new-nets-always-primary t) | 148 (setq bbdb-new-nets-always-primary t) |
160 (setq bbdb-file "/disk/scratch/mail/.bbdb") | 149 (setq bbdb-file "/disk/scratch/mail/.bbdb") |
161 (setq bbdb-hashtable-size 24203) | 150 (setq bbdb-hashtable-size 24203) |
162 (require 'bbdb) | 151 ;(require 'bbdb) @ |
163 ;(require 'bbdb-rmail) | 152 ;(require 'bbdb-rmail) |
164 (require 'bbdb-com) ; to fix auto-fill | 153 ;(require 'bbdb-com) @ ; to fix auto-fill |
165 (fset 'bbdb-auto-fill-function (lambda () t)) ; ditto | 154 (fset 'bbdb-auto-fill-function (lambda () t)) ; ditto |
166 (fmakunbound 'bbdb-orig-rmail-expunge) | 155 (fmakunbound 'bbdb-orig-rmail-expunge) |
167 ;(add-hook 'rmail-mode-hook 'bbdb-insinuate-rmail) | 156 ;(add-hook 'rmail-mode-hook 'bbdb-insinuate-rmail) |
168 (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus) | 157 (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus) |
169 (add-hook 'mail-setup-hook 'bbdb-insinuate-sendmail) | 158 (add-hook 'mail-setup-hook 'bbdb-insinuate-sendmail) |
172 (if (not (fboundp 'define-mail-abbrev)) | 161 (if (not (fboundp 'define-mail-abbrev)) |
173 ;; fix a bug which crashes occasionally -- see also | 162 ;; fix a bug which crashes occasionally -- see also |
174 ;; bbdb-com | 163 ;; bbdb-com |
175 (progn | 164 (progn |
176 (require 'sendmail) | 165 (require 'sendmail) |
177 (defadvice sendmail-pre-abbrev-expand-hook | 166 ;(defadvice sendmail-pre-abbrev-expand-hook @ |
178 (before bbdb-rebuilt-all-aliases activate) | 167 ; (before bbdb-rebuilt-all-aliases activate) |
179 (bbdb-rebuilt-all-aliases)))) | 168 ; (bbdb-rebuilt-all-aliases)) |
169 )) | |
180 (defun gnuserv-start-maybe () | 170 (defun gnuserv-start-maybe () |
181 (if (not (frame-live-p gnuserv-frame)) | 171 (if (not (frame-live-p gnuserv-frame)) |
182 (gnuserv-start))) | 172 (gnuserv-start))) |
183 ;;; (require 'itimer) | 173 ;;; (require 'itimer) |
184 ;;; (start-itimer "gsr" 'gnuserv-start-maybe | 174 ;;; (start-itimer "gsr" 'gnuserv-start-maybe |
185 ;;; 1200 1200 nil nil) | 175 ;;; 1200 1200 nil nil) |
186 ) | |
187 | 176 |
188 (if window-system | 177 (if window-system |
189 (progn | 178 (progn |
190 ;; DICE comes here 2012-01-13 | 179 ;; DICE comes here 2012-01-13 |
191 (require 'highlight-headers) | 180 (require 'highlight-headers) |
248 (require 'mail-extras) | 237 (require 'mail-extras) |
249 (require 'diary) | 238 (require 'diary) |
250 (let ((scr (selected-frame))) | 239 (let ((scr (selected-frame))) |
251 ; (sit-for 5) | 240 ; (sit-for 5) |
252 (load "ht-rooms.config" nil t) | 241 (load "ht-rooms.config" nil t) |
253 ; Formerly, for troutbeck | 242 ;; for ecclerig viewed from paul |
254 ; (unwind-protect (make-screen-for-room "diary" "0" "+60")) | 243 (if (eq (device-pixel-width (selected-device)) 1920) |
255 ; ; (sit-for 5) | 244 (progn |
256 ; (unwind-protect (make-screen-for-room "elisp" "0" "+73")) | 245 (unwind-protect |
257 ; ; (sit-for 5) | 246 (make-screen-for-room "diary" "+1219" "+68")) |
258 ; (unwind-protect (make-screen-for-room "news" "-50" "+85")) | 247 (unwind-protect |
259 ;; for ecclerig | 248 (make-screen-for-room "elisp" "+1185" "+102")) |
260 (unwind-protect (make-screen-for-room "diary" "+1888" "+0")) | 249 (unwind-protect |
261 ; (sit-for 5) | 250 (make-screen-for-room "news" "+1253" "+34"))) |
262 (unwind-protect (make-screen-for-room "elisp" "+1888" "+0")) | 251 ;; for ecclerig in office |
263 ; (sit-for 5) | 252 (unwind-protect (make-screen-for-room "diary" "+1888" "+0")) |
264 (unwind-protect (make-screen-for-room "news" "+1223" "+0")) | 253 (unwind-protect (make-screen-for-room "elisp" "+1888" "+0")) |
265 ; (sit-for 5) | 254 (unwind-protect (make-screen-for-room "news" "+1223" "+0"))) |
266 ; (unwind-protect (make-screen-for-room "mail" "-75" "+98")) | |
267 (sit-for 1) | 255 (sit-for 1) |
268 (delete-frame scr)) | 256 (delete-frame scr)) |
269 (setq ht-default-config (current-window-configuration)))) | 257 (setq ht-default-config (current-window-configuration))))) |
270 ;; vanilla v19 goes here | 258 ;; vanilla v19 was here |
271 (if window-system | |
272 (progn | |
273 (defvar ht-frame-parameter-mods | |
274 '((font . "-adobe-courier-medium-r-normal--14-*") | |
275 (auto-raise . t) | |
276 (auto-lower . nil) | |
277 (cursor-type . bar))) | |
278 ;; if we have X, we have ISO-Latin-1, so | |
279 ;; set char codes 128--255 to display as themselves. | |
280 (require 'disp-table) | |
281 (standard-display-8bit 161 255) | |
282 (transient-mark-mode t) | |
283 ;; hightlight searching in bold | |
284 (setq search-highlight t) | |
285 (make-face 'isearch) | |
286 (copy-face 'bold 'isearch) | |
287 (set-face-underline-p 'region t) | |
288 (set-face-background 'region "white") | |
289 (set-face-foreground 'region "black") | |
290 (setq c++-font-lock-keywords 'undef) | |
291 (setq c-font-lock-keywords 'undef) | |
292 (modify-frame-parameters | |
293 nil | |
294 ht-frame-parameter-mods) | |
295 (setq default-frame-alist | |
296 (append ht-frame-parameter-mods default-frame-alist)) | |
297 ;; fix cut and paste | |
298 (setq interprogram-paste-function nil | |
299 interprogram-cut-function nil) | |
300 (defun ht-mouse-set-region (click) "set region and primary selection" | |
301 (interactive "e") | |
302 (mouse-set-region click) | |
303 (x-set-selection "PRIMARY" (buffer-substring (point)(mark)))) | |
304 (defun ht-mouse-drag-region (click) | |
305 "drag region and set primary selection" | |
306 (interactive "e") | |
307 (mouse-drag-region click) | |
308 (if mark-active | |
309 (x-set-selection "PRIMARY" (buffer-substring (point)(mark))))) | |
310 (global-set-key [drag-mouse-1] (function ht-mouse-set-region)) | |
311 (global-set-key [down-mouse-1] (function ht-mouse-drag-region)) | |
312 (defun ht-mouse-insert-primary (click) | |
313 "set point and insert primary selection" | |
314 (interactive "e") | |
315 (mouse-set-point click) | |
316 (push-mark nil nil t) | |
317 (insert (x-selection))) | |
318 (global-set-key [mouse-2] (function ht-mouse-insert-primary)) | |
319 (setq dired-mode-hook | |
320 '(lambda () | |
321 (font-lock-mode 1) | |
322 (define-key dired-mode-map | |
323 [mouse-2] '(lambda (click) | |
324 (interactive "e") | |
325 (mouse-set-point click) | |
326 (dired-advertised-find-file))))) | |
327 | |
328 (defun ht-rooms-setup (&optional arg) | |
329 (interactive) | |
330 (require 'mail-extras) | |
331 (require 'diary) | |
332 (require 'my-news) | |
333 ;; override changed default, except in gnus | |
334 (setq mail-use-rfc822 nil) | |
335 (add-hook 'gnus-summary-mode-hook | |
336 (function (lambda () | |
337 (make-local-variable 'mail-use-rfc822) | |
338 (setq mail-use-rfc822 t)))) | |
339 (let ((scr (selected-frame))) | |
340 (load "ht-rooms.config" nil t) | |
341 (unwind-protect (make-frame-for-room "elisp" "-25" "-58")) | |
342 (unwind-protect (progn | |
343 (make-frame-for-room "news" "-50" "-40") | |
344 )) | |
345 (unwind-protect (progn | |
346 (make-frame-for-room "mail" "-75" "-22") | |
347 )) | |
348 (unwind-protect (progn | |
349 (make-frame-for-room | |
350 "diary" | |
351 "-0" | |
352 (concat | |
353 "+" | |
354 (format | |
355 "%d" | |
356 (- | |
357 (cdr | |
358 (assoc | |
359 'top | |
360 (frame-parameters | |
361 (cdr | |
362 (assoc | |
363 "elisp" | |
364 frames-table))))) | |
365 18)))) | |
366 )) | |
367 (make-frame-invisible scr)) | |
368 (setq ht-default-config (current-window-configuration))))) | |
369 (setq load-path | |
370 (append '("/usr/contrib/lib/emacs/lisp/xml" | |
371 "/usr/contrib/lib/emacs/lisp/psgml") | |
372 load-path))) | |
373 (setq sgml-insert-missing-element-comment nil) | 259 (setq sgml-insert-missing-element-comment nil) |
374 (load "psgml" nil t) | 260 (load "psgml" nil t) |
375 (load "psgml-edit" nil t) | 261 (load "psgml-edit" nil t) |
376 (load "xml-hack" nil t) | 262 (load "xml-hack" nil t) |
377 (add-hook 'sgml-mode-hook 'sgml-fix-para) | 263 (add-hook 'sgml-mode-hook 'sgml-fix-para) |
378 ) | |
379 ;; v18 emacs only was here | 264 ;; v18 emacs only was here |
380 ) | |
381 | 265 |
382 (defun ht-rooms-resetup () | 266 (defun ht-rooms-resetup () |
383 (interactive) | 267 (interactive) |
384 (setq rooms-table nil) | 268 (setq rooms-table nil) |
385 (setq frames-table nil) | 269 (setq frames-table nil) |