Mercurial > hg > xemacs
changeset 19:cc9c7bc8194a
custom-size
author | ht |
---|---|
date | Wed, 08 Aug 2018 10:19:09 +0100 |
parents | 2a3055313d1e |
children | 06827fc8ae79 |
files | pers-init.el |
diffstat | 1 files changed, 73 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/pers-init.el Sat Apr 19 19:10:28 2008 +0100 +++ b/pers-init.el Wed Aug 08 10:19:09 2018 +0100 @@ -59,9 +59,9 @@ (require 'mdn-extras) (setq auto-mode-alist (append '(("/perl/" . perl-mode) - ("\\.scm$" . lisp-mode)) + ("\\.scm$" . scheme-mode)) auto-mode-alist)) -(setq inferior-lisp-program "scheme") +(setq inferior-lisp-program "/c/Progra~1/ChezSc~1.4/bin/i3nt/petite") ;;; for scheme (put 'letrec 'lisp-indent-function 1) (put 'case 'lisp-indent-function 1) @@ -87,7 +87,7 @@ (parc "prolog")))) (inferior-prolog-mode)) -(site-caseq (laptop) +(site-caseq ((laptop maritain)) (t(require 'hist) (rplacd (assoc "*shell*" hk-pat-table) "[a-z]+<[0-9]+>: "))) @@ -103,7 +103,7 @@ ;(require 'compress) (if (string-match "Lucid" emacs-version) - (site-caseq (laptop) + (site-caseq ((laptop maritain)) (t(require 'lemacs-compat)))) (if (boundp 'epoch::version) @@ -140,26 +140,26 @@ (progn (add-hook 'sh-mode-hook '(lambda () (font-lock-mode 1))) - (setq lsl-mode-hook '(lambda () + (add-hook 'lsl-mode-hook '(lambda () (font-lock-mode 1))) - (setq perl-mode-hook '(lambda () + (add-hook 'perl-mode-hook '(lambda () (font-lock-mode 1))) - (setq emacs-lisp-mode-hook '(lambda () + (add-hook 'emacs-lisp-mode-hook '(lambda () (font-lock-mode 1))) - (setq lisp-mode-hook '(lambda () + (add-hook 'lisp-mode-hook '(lambda () (font-lock-mode 1))) - (setq sgml-mode-hook '(lambda () + (add-hook 'sgml-mode-hook '(lambda () (if (not (boundp 'sgml-font-lock-keywords)) (load "sgml-font-lock-keywords" t t)) (setq adaptive-fill-mode nil) (font-lock-mode 1) )) - (setq c-mode-hook '(lambda () + (add-hook 'c-mode-hook '(lambda () (font-lock-mode 1))) - (setq c++-mode-hook '(lambda () + (add-hook 'c++-mode-hook '(lambda () (font-lock-mode 1))) - (setq scheme-mode-hook + (add-hook 'scheme-mode-hook '(lambda () (setq scheme-font-lock-keywords @@ -168,7 +168,7 @@ (load "lisp-font-lock-keywords" t t)) lisp-font-lock-keywords)) (font-lock-mode 1))) - (setq python-mode-hook '(lambda () + (add-hook 'python-mode-hook '(lambda () (font-lock-mode 1))) (setq py-python-command "//c/Program Files/Python22/python") (setq sgml-insert-missing-element-comment nil) @@ -182,14 +182,9 @@ (global-set-key "\C-x\C-y" 'win32-get-clipboard-data-cmd))) ;; gnus - (setq nnml-directory (expand-file-name "/home/ht/MT/ht/mail/Mail")) ; (setq mail-signature t) - (setq gnus-message-archive-method - '(nnfolder "archive" - (nnfolder-directory "/home/ht/MT/ht/mail/cpy") - (nnfolder-active-file "/home/ht/MT/ht/mail/cpy/active") - (nnfolder-get-new-mail nil) - (nnfolder-inhibit-expiry t))) + (load "gnus-init" nil t) + ;; loading gnus postponed to e.g. mail-from-delphix, q.v. ; (require 'gnus-min) @@ -273,7 +268,7 @@ (auto-lower . nil) (cursor-type . bar))) (nconc - (site-caseq (laptop (list '(height . 35))) + (site-caseq ((laptop maritain) (list '(height . 35))) (t (list '(font . @@ -409,14 +404,60 @@ (site-caseq (laptop (defun system-name () "francis.markup.co.uk"))) (cd (user-home-directory)) -(site-caseq (laptop - (let ((pw (device-pixel-width (selected-device)))) - (if (= pw 1600) - ;; we're on a big external monitor - (progn - (set-frame-pixel-size (selected-frame) 900 1140) - (set-frame-position (selected-frame) -3 -20)) - (if (= pw 1280) - (progn - (set-frame-pixel-size (selected-frame) 640 740) - (set-frame-position (selected-frame) -3 -20))))))) + +(defun ht-custom-size () + (interactive) + (site-caseq ((laptop maritain) + (message (format "pw: %s" (device-pixel-width (selected-device)))))) + (if (fboundp 'device-pixel-width) + (let ((pw (device-pixel-width (selected-device))) + (ph (device-pixel-height (selected-device)))) + (cond ((= pw 2048) + ;; we're on a _really_ big external monitor + (set-frame-pixel-size (selected-frame) 900 1050) + (set-frame-position (selected-frame) 0 0)) + ((= pw 1680) + ;; we're on a big external monitor + (font-menu-set-font nil nil 10) + (set-frame-pixel-size (selected-frame) 900 1000) + (set-frame-position (selected-frame) -3 -20)) + ((= pw 1097) + ;; we're on an XPS 13, mag. 300% + (require 'font-menu) + (font-menu-set-font nil nil 9) + (set-frame-pixel-size (selected-frame) 583 583); 80 x 39 + (set-frame-position (selected-frame) -5 -26)) + ((= pw 1536) + ;; we're on an XPS 13, mag. 250% + (require 'font-menu) + (font-menu-set-font nil nil 10) + (set-frame-pixel-size (selected-frame) 670 782); 81 x 49 + (set-frame-position (selected-frame) -5 -26)) + ((= ph 768) + ;; we're on a narrow cinema-ratio laptop + (set-frame-pixel-size (selected-frame) 690 710) + (set-frame-position (selected-frame) -5 -26)) + ((= ph 900) + ;; we're on a cinema-ratio laptop + (set-frame-pixel-size (selected-frame) 800 820) + (set-frame-position (selected-frame) -3 -20)) + ((= pw 1600) + ;; we're on a big external monitor + (set-frame-pixel-size (selected-frame) 900 1120) + (set-frame-position (selected-frame) -3 -20)) + ((= pw 1280) + (cond ((= ph 720) + (set-frame-pixel-size (selected-frame) 700 655) + (set-frame-position (selected-frame) -3 -30)) + (t + (set-frame-pixel-size (selected-frame) 700 960) + (set-frame-position (selected-frame) -3 -20)))))))) + +(ht-custom-size) + +;;; make dired list directories first +(defadvice dired-insert-directory (before my-dired-insert-directory + (dir-or-list switches &optional wildcard full-p)) + (setq switches (concat switches " --group-directories-first"))) + +(ad-activate 'dired-insert-directory)