comparison pers-init.el @ 19:cc9c7bc8194a

custom-size
author ht
date Wed, 08 Aug 2018 10:19:09 +0100
parents ee87d53174b1
children 7b2c4ed36302
comparison
equal deleted inserted replaced
18:2a3055313d1e 19:cc9c7bc8194a
57 (inferior-lisp-mode)) 57 (inferior-lisp-mode))
58 58
59 (require 'mdn-extras) 59 (require 'mdn-extras)
60 (setq auto-mode-alist 60 (setq auto-mode-alist
61 (append '(("/perl/" . perl-mode) 61 (append '(("/perl/" . perl-mode)
62 ("\\.scm$" . lisp-mode)) 62 ("\\.scm$" . scheme-mode))
63 auto-mode-alist)) 63 auto-mode-alist))
64 (setq inferior-lisp-program "scheme") 64 (setq inferior-lisp-program "/c/Progra~1/ChezSc~1.4/bin/i3nt/petite")
65 ;;; for scheme 65 ;;; for scheme
66 (put 'letrec 'lisp-indent-function 1) 66 (put 'letrec 'lisp-indent-function 1)
67 (put 'case 'lisp-indent-function 1) 67 (put 'case 'lisp-indent-function 1)
68 68
69 (site-caseq (parc (nconc load-path '("/import/local/emacs/gnus-3.13/")) 69 (site-caseq (parc (nconc load-path '("/import/local/emacs/gnus-3.13/"))
85 (require 'shell) 85 (require 'shell)
86 (switch-to-buffer (make-shell "prolog" (site-caseq (edin "sicstus") 86 (switch-to-buffer (make-shell "prolog" (site-caseq (edin "sicstus")
87 (parc "prolog")))) 87 (parc "prolog"))))
88 (inferior-prolog-mode)) 88 (inferior-prolog-mode))
89 89
90 (site-caseq (laptop) 90 (site-caseq ((laptop maritain))
91 (t(require 'hist) 91 (t(require 'hist)
92 (rplacd (assoc "*shell*" hk-pat-table) 92 (rplacd (assoc "*shell*" hk-pat-table)
93 "[a-z]+<[0-9]+>: "))) 93 "[a-z]+<[0-9]+>: ")))
94 94
95 ;; turn off suspend-emacs -- use pause-emacs (^X.) instead 95 ;; turn off suspend-emacs -- use pause-emacs (^X.) instead
101 ;(require 'repl-comment) 101 ;(require 'repl-comment)
102 102
103 ;(require 'compress) 103 ;(require 'compress)
104 104
105 (if (string-match "Lucid" emacs-version) 105 (if (string-match "Lucid" emacs-version)
106 (site-caseq (laptop) 106 (site-caseq ((laptop maritain))
107 (t(require 'lemacs-compat)))) 107 (t(require 'lemacs-compat))))
108 108
109 (if (boundp 'epoch::version) 109 (if (boundp 'epoch::version)
110 ;; epoch only goes here 110 ;; epoch only goes here
111 (progn 111 (progn
138 ;; common v19 138 ;; common v19
139 (if window-system 139 (if window-system
140 (progn 140 (progn
141 (add-hook 'sh-mode-hook '(lambda () 141 (add-hook 'sh-mode-hook '(lambda ()
142 (font-lock-mode 1))) 142 (font-lock-mode 1)))
143 (setq lsl-mode-hook '(lambda () 143 (add-hook 'lsl-mode-hook '(lambda ()
144 (font-lock-mode 1))) 144 (font-lock-mode 1)))
145 (setq perl-mode-hook '(lambda () 145 (add-hook 'perl-mode-hook '(lambda ()
146 (font-lock-mode 1))) 146 (font-lock-mode 1)))
147 (setq emacs-lisp-mode-hook '(lambda () 147 (add-hook 'emacs-lisp-mode-hook '(lambda ()
148 (font-lock-mode 1))) 148 (font-lock-mode 1)))
149 (setq lisp-mode-hook '(lambda () 149 (add-hook 'lisp-mode-hook '(lambda ()
150 (font-lock-mode 1))) 150 (font-lock-mode 1)))
151 (setq sgml-mode-hook '(lambda () 151 (add-hook 'sgml-mode-hook '(lambda ()
152 (if (not 152 (if (not
153 (boundp 'sgml-font-lock-keywords)) 153 (boundp 'sgml-font-lock-keywords))
154 (load "sgml-font-lock-keywords" t t)) 154 (load "sgml-font-lock-keywords" t t))
155 (setq adaptive-fill-mode nil) 155 (setq adaptive-fill-mode nil)
156 (font-lock-mode 1) 156 (font-lock-mode 1)
157 )) 157 ))
158 (setq c-mode-hook '(lambda () 158 (add-hook 'c-mode-hook '(lambda ()
159 (font-lock-mode 1))) 159 (font-lock-mode 1)))
160 (setq c++-mode-hook '(lambda () 160 (add-hook 'c++-mode-hook '(lambda ()
161 (font-lock-mode 1))) 161 (font-lock-mode 1)))
162 (setq scheme-mode-hook 162 (add-hook 'scheme-mode-hook
163 '(lambda () 163 '(lambda ()
164 (setq 164 (setq
165 scheme-font-lock-keywords 165 scheme-font-lock-keywords
166 (if (or 166 (if (or
167 (boundp 'lisp-font-lock-keywords) 167 (boundp 'lisp-font-lock-keywords)
168 (load "lisp-font-lock-keywords" t t)) 168 (load "lisp-font-lock-keywords" t t))
169 lisp-font-lock-keywords)) 169 lisp-font-lock-keywords))
170 (font-lock-mode 1))) 170 (font-lock-mode 1)))
171 (setq python-mode-hook '(lambda () 171 (add-hook 'python-mode-hook '(lambda ()
172 (font-lock-mode 1))) 172 (font-lock-mode 1)))
173 (setq py-python-command "//c/Program Files/Python22/python") 173 (setq py-python-command "//c/Program Files/Python22/python")
174 (setq sgml-insert-missing-element-comment nil) 174 (setq sgml-insert-missing-element-comment nil)
175 (load "psgml" nil t) 175 (load "psgml" nil t)
176 (load "psgml-edit" nil t) 176 (load "psgml-edit" nil t)
180 (progn (defun win32-get-clipboard-data-cmd () 180 (progn (defun win32-get-clipboard-data-cmd ()
181 (interactive)(insert (win32-get-clipboard-data))) 181 (interactive)(insert (win32-get-clipboard-data)))
182 (global-set-key 182 (global-set-key
183 "\C-x\C-y" 'win32-get-clipboard-data-cmd))) 183 "\C-x\C-y" 'win32-get-clipboard-data-cmd)))
184 ;; gnus 184 ;; gnus
185 (setq nnml-directory (expand-file-name "/home/ht/MT/ht/mail/Mail"))
186 ; (setq mail-signature t) 185 ; (setq mail-signature t)
187 (setq gnus-message-archive-method 186 (load "gnus-init" nil t)
188 '(nnfolder "archive" 187
189 (nnfolder-directory "/home/ht/MT/ht/mail/cpy")
190 (nnfolder-active-file "/home/ht/MT/ht/mail/cpy/active")
191 (nnfolder-get-new-mail nil)
192 (nnfolder-inhibit-expiry t)))
193 ;; loading gnus postponed to e.g. mail-from-delphix, q.v. 188 ;; loading gnus postponed to e.g. mail-from-delphix, q.v.
194 189
195 ; (require 'gnus-min) 190 ; (require 'gnus-min)
196 )) 191 ))
197 192
271 (defvar ht-frame-parameter-mods 266 (defvar ht-frame-parameter-mods
272 '((auto-raise . t) 267 '((auto-raise . t)
273 (auto-lower . nil) 268 (auto-lower . nil)
274 (cursor-type . bar))) 269 (cursor-type . bar)))
275 (nconc 270 (nconc
276 (site-caseq (laptop (list '(height . 35))) 271 (site-caseq ((laptop maritain) (list '(height . 35)))
277 (t 272 (t
278 (list 273 (list
279 '(font . 274 '(font .
280 "-adobe-courier-medium-r-normal--14-*")))) 275 "-adobe-courier-medium-r-normal--14-*"))))
281 ht-frame-parameter-mods 276 ht-frame-parameter-mods
407 (message "Sending URL to Netscape... done")) 402 (message "Sending URL to Netscape... done"))
408 403
409 (site-caseq (laptop (defun system-name () "francis.markup.co.uk"))) 404 (site-caseq (laptop (defun system-name () "francis.markup.co.uk")))
410 405
411 (cd (user-home-directory)) 406 (cd (user-home-directory))
412 (site-caseq (laptop 407
413 (let ((pw (device-pixel-width (selected-device)))) 408 (defun ht-custom-size ()
414 (if (= pw 1600) 409 (interactive)
415 ;; we're on a big external monitor 410 (site-caseq ((laptop maritain)
416 (progn 411 (message (format "pw: %s" (device-pixel-width (selected-device))))))
417 (set-frame-pixel-size (selected-frame) 900 1140) 412 (if (fboundp 'device-pixel-width)
418 (set-frame-position (selected-frame) -3 -20)) 413 (let ((pw (device-pixel-width (selected-device)))
419 (if (= pw 1280) 414 (ph (device-pixel-height (selected-device))))
420 (progn 415 (cond ((= pw 2048)
421 (set-frame-pixel-size (selected-frame) 640 740) 416 ;; we're on a _really_ big external monitor
422 (set-frame-position (selected-frame) -3 -20))))))) 417 (set-frame-pixel-size (selected-frame) 900 1050)
418 (set-frame-position (selected-frame) 0 0))
419 ((= pw 1680)
420 ;; we're on a big external monitor
421 (font-menu-set-font nil nil 10)
422 (set-frame-pixel-size (selected-frame) 900 1000)
423 (set-frame-position (selected-frame) -3 -20))
424 ((= pw 1097)
425 ;; we're on an XPS 13, mag. 300%
426 (require 'font-menu)
427 (font-menu-set-font nil nil 9)
428 (set-frame-pixel-size (selected-frame) 583 583); 80 x 39
429 (set-frame-position (selected-frame) -5 -26))
430 ((= pw 1536)
431 ;; we're on an XPS 13, mag. 250%
432 (require 'font-menu)
433 (font-menu-set-font nil nil 10)
434 (set-frame-pixel-size (selected-frame) 670 782); 81 x 49
435 (set-frame-position (selected-frame) -5 -26))
436 ((= ph 768)
437 ;; we're on a narrow cinema-ratio laptop
438 (set-frame-pixel-size (selected-frame) 690 710)
439 (set-frame-position (selected-frame) -5 -26))
440 ((= ph 900)
441 ;; we're on a cinema-ratio laptop
442 (set-frame-pixel-size (selected-frame) 800 820)
443 (set-frame-position (selected-frame) -3 -20))
444 ((= pw 1600)
445 ;; we're on a big external monitor
446 (set-frame-pixel-size (selected-frame) 900 1120)
447 (set-frame-position (selected-frame) -3 -20))
448 ((= pw 1280)
449 (cond ((= ph 720)
450 (set-frame-pixel-size (selected-frame) 700 655)
451 (set-frame-position (selected-frame) -3 -30))
452 (t
453 (set-frame-pixel-size (selected-frame) 700 960)
454 (set-frame-position (selected-frame) -3 -20))))))))
455
456 (ht-custom-size)
457
458 ;;; make dired list directories first
459 (defadvice dired-insert-directory (before my-dired-insert-directory
460 (dir-or-list switches &optional wildcard full-p))
461 (setq switches (concat switches " --group-directories-first")))
462
463 (ad-activate 'dired-insert-directory)