diff 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
line wrap: on
line diff
--- a/shared/pers-init.el	Mon Feb 08 12:29:18 2021 +0000
+++ b/shared/pers-init.el	Sat Sep 17 11:01:40 2022 +0100
@@ -98,9 +98,6 @@
     (progn
       (require 'lemacs-compat)))
 
-(if (string-match "^\\(19\\|2\\)" emacs-version)
-    (progn
-      ;; common v19 and ater
       (if window-system
 	  (progn
 	    (add-hook 'sh-mode-hook '(lambda ()
@@ -140,14 +137,6 @@
       (if (string-match "Lucid" emacs-version)
 	  ;; lemacs only goes here
 	  (progn
-	    (if (< emacs-major-version 21)
-		(setq load-path
-		      (append '("/usr/contrib/lib/xemacs/site-lisp/xml"
-				"/usr/contrib/lib/xemacs/site-lisp/psgml")
-			      load-path))
-;	      (pui-add-install-directory
-;	       "/net/sunsite.doc.ic.ac.uk/public/pub/Mirrors/ftp.xemacs.org/pub/xemacs/packages")
-;	      (setq load-path (remove "/usr/contrib/lib/xemacs/xemacs-packages/lisp/gnus/" load-path))
 	      ;; DICE comes here 2012-01-13
 	      (setq package-get-remove-copy nil)
 	      (setq bbdb-north-american-phone-numbers-p nil)
@@ -159,9 +148,9 @@
 	      (setq bbdb-new-nets-always-primary t)
 	      (setq bbdb-file "/disk/scratch/mail/.bbdb")
 	      (setq bbdb-hashtable-size 24203)
-	      (require 'bbdb)
+	      ;(require 'bbdb) @
 	      ;(require 'bbdb-rmail)
-	      (require 'bbdb-com)	; to fix auto-fill
+	      ;(require 'bbdb-com) @	; to fix auto-fill
 	      (fset 'bbdb-auto-fill-function (lambda () t)) ; ditto
 	      (fmakunbound 'bbdb-orig-rmail-expunge)
 	      ;(add-hook 'rmail-mode-hook 'bbdb-insinuate-rmail)
@@ -174,16 +163,16 @@
 		  ;; bbdb-com
 		  (progn
 		    (require 'sendmail)
-		    (defadvice sendmail-pre-abbrev-expand-hook
-		      (before bbdb-rebuilt-all-aliases activate)
-		      (bbdb-rebuilt-all-aliases))))
+		    ;(defadvice sendmail-pre-abbrev-expand-hook @
+		     ; (before bbdb-rebuilt-all-aliases activate)
+		     ; (bbdb-rebuilt-all-aliases))
+                    ))
 	      (defun gnuserv-start-maybe ()
 		(if (not (frame-live-p gnuserv-frame))
 		    (gnuserv-start)))
 ;;;	      (require 'itimer)
 ;;;	      (start-itimer "gsr" 'gnuserv-start-maybe
 ;;;			    1200 1200 nil nil)
-	      )
 
 	    (if window-system
 		(progn
@@ -250,134 +239,29 @@
 	      (let ((scr (selected-frame)))
 					;	    (sit-for 5)
 		(load "ht-rooms.config" nil t)
-;               Formerly, for troutbeck
-; 		(unwind-protect (make-screen-for-room "diary" "0" "+60"))
-; 					;           (sit-for 5)
-; 		(unwind-protect (make-screen-for-room "elisp" "0" "+73"))
-; 					;	    (sit-for 5)
-; 		(unwind-protect (make-screen-for-room "news" "-50" "+85"))
-		;; for ecclerig
-		(unwind-protect (make-screen-for-room "diary" "+1888" "+0"))
-					;           (sit-for 5)
-		(unwind-protect (make-screen-for-room "elisp" "+1888" "+0"))
-					;	    (sit-for 5)
-		(unwind-protect (make-screen-for-room "news" "+1223" "+0"))
-					;           (sit-for 5)
-;		(unwind-protect (make-screen-for-room "mail" "-75" "+98"))
+		;; for ecclerig viewed from paul
+		(if (eq (device-pixel-width (selected-device)) 1920)
+		    (progn
+		      (unwind-protect
+			  (make-screen-for-room "diary" "+1219" "+68"))
+		      (unwind-protect
+			  (make-screen-for-room "elisp" "+1185" "+102"))
+		      (unwind-protect
+			  (make-screen-for-room "news" "+1253" "+34")))
+		  ;; for ecclerig in office
+		  (unwind-protect (make-screen-for-room "diary" "+1888" "+0"))
+		  (unwind-protect (make-screen-for-room "elisp" "+1888" "+0"))
+		  (unwind-protect (make-screen-for-room "news" "+1223" "+0")))
 		(sit-for 1)
 		(delete-frame scr))
-	      (setq ht-default-config (current-window-configuration))))
-	;; vanilla v19 goes here
-	(if window-system
-	    (progn
-	      (defvar ht-frame-parameter-mods 
-		'((font . "-adobe-courier-medium-r-normal--14-*")
-		  (auto-raise . t)
-		  (auto-lower . nil)
-		  (cursor-type . bar)))
-	      ;; if we have X, we have ISO-Latin-1, so
-	      ;; set char codes 128--255 to display as themselves.
-	      (require 'disp-table)
-	      (standard-display-8bit 161 255)
-	      (transient-mark-mode t)
-	      ;; hightlight searching in bold
-	      (setq search-highlight t)
-	      (make-face 'isearch)
-	      (copy-face 'bold 'isearch)
-	      (set-face-underline-p 'region t)
-	      (set-face-background 'region "white")
-	      (set-face-foreground 'region "black")
-	    (setq c++-font-lock-keywords 'undef)
-	    (setq c-font-lock-keywords 'undef)
-	      (modify-frame-parameters
-	       nil
-	       ht-frame-parameter-mods)
-	      (setq default-frame-alist
-		    (append ht-frame-parameter-mods default-frame-alist))
-	      ;; fix cut and paste
-	      (setq interprogram-paste-function nil
-		    interprogram-cut-function nil)
-	      (defun ht-mouse-set-region (click) "set region and primary selection"
-		(interactive "e")
-		(mouse-set-region click)
-		(x-set-selection "PRIMARY" (buffer-substring (point)(mark))))
-	      (defun ht-mouse-drag-region (click)
-		"drag region and set primary selection"
-		(interactive "e")
-		(mouse-drag-region click)
-		(if mark-active
-		    (x-set-selection "PRIMARY" (buffer-substring (point)(mark)))))
-	      (global-set-key [drag-mouse-1] (function ht-mouse-set-region))
-	      (global-set-key [down-mouse-1] (function ht-mouse-drag-region))
-	      (defun ht-mouse-insert-primary (click)
-		"set point and insert primary selection"
-		(interactive "e")
-		(mouse-set-point click)
-		(push-mark nil nil t)
-		(insert (x-selection)))
-	      (global-set-key [mouse-2] (function ht-mouse-insert-primary))
-	      (setq dired-mode-hook
-		  '(lambda ()
-		     (font-lock-mode 1)
-		     (define-key dired-mode-map
-		       [mouse-2] '(lambda (click)
-				    (interactive "e")
-				    (mouse-set-point click)
-				    (dired-advertised-find-file)))))
-
-	      (defun ht-rooms-setup (&optional arg)
-		(interactive)
-		(require 'mail-extras)
-		(require 'diary)
-		(require 'my-news)
-		;; override changed default, except in gnus
-		(setq mail-use-rfc822 nil)
-		(add-hook 'gnus-summary-mode-hook
-			  (function (lambda ()
-				      (make-local-variable 'mail-use-rfc822)
-				      (setq mail-use-rfc822 t))))
-		(let ((scr (selected-frame)))
-		  (load "ht-rooms.config" nil t)
-		  (unwind-protect (make-frame-for-room "elisp" "-25" "-58"))
-		  (unwind-protect (progn
-				    (make-frame-for-room "news" "-50" "-40")
-				    ))
-		  (unwind-protect (progn
-				    (make-frame-for-room "mail" "-75" "-22")
-				    ))
-		  (unwind-protect (progn
-				    (make-frame-for-room
-				     "diary"
-				     "-0"
-				     (concat
-				      "+"
-				      (format
-				       "%d"
-				       (-
-					(cdr
-					 (assoc
-					  'top
-					  (frame-parameters
-					   (cdr
-					    (assoc
-					     "elisp"
-					     frames-table)))))
-					18))))
-				    ))
-		  (make-frame-invisible scr))
-		(setq ht-default-config (current-window-configuration)))))
-	(setq load-path
-		  (append '("/usr/contrib/lib/emacs/lisp/xml"
-			    "/usr/contrib/lib/emacs/lisp/psgml")
-			    load-path)))
+	      (setq ht-default-config (current-window-configuration)))))
+	;; vanilla v19 was here
       (setq sgml-insert-missing-element-comment nil)
       (load "psgml" nil t)
       (load "psgml-edit" nil t)
       (load "xml-hack" nil t)
       (add-hook 'sgml-mode-hook 'sgml-fix-para)
-)
   ;; v18 emacs only was here
-)
 
 (defun ht-rooms-resetup ()
   (interactive)