diff pers-init.el @ 25:0e4eb9db8a93 laptop

after debugging use with GNU Emacs
author ht
date Thu, 22 Oct 2015 14:28:54 +0100
parents dccf9e53f179
children 5d2492e352cc
line wrap: on
line diff
--- a/pers-init.el	Mon Aug 29 08:51:09 2005 +0100
+++ b/pers-init.el	Thu Oct 22 14:28:54 2015 +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)
@@ -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,28 +168,33 @@
 			   (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)
-	    (load "psgml" nil t)
-	    (load "psgml-edit" nil t)
-	    ;; (load "xml-hack" nil t)
-;	    (setq sgml-catalog-files '("CATALOG" "f:/lib/sgml/catalog"))
+            (condition-case nil
+		(progn
+		  (load "psgml" nil t)
+		  (load "psgml-edit" nil t)
+		  ;; (load "xml-hack" nil t)
+		  ;;(setq sgml-catalog-files '("CATALOG" "f:/lib/sgml/catalog"
+		  )
+(error nil))
 	    (if (string-match "i386" (emacs-version))
 		(progn (defun win32-get-clipboard-data-cmd ()
 			 (interactive)(insert (win32-get-clipboard-data)))
 		       (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 nnml-directory (expand-file-name "/home/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-directory "/home/ht/mail/cpy")
+			     (nnfolder-active-file "/home/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)
 	    ))
@@ -407,9 +412,114 @@
 
 (site-caseq (laptop (defun system-name () "francis.markup.co.uk")))
 
-(cd (user-home-directory))
-(site-caseq (laptop (if (= (device-pixel-width (selected-device)) 1600)
-			;; we're on a big external monitor
-			(progn
-			  (set-frame-pixel-size (selected-frame) 900 1140)
-			  (set-frame-position (selected-frame) -3 -20)))))
+(cd (if (fboundp 'user-home-directory)
+	(user-home-directory)
+      (getenv "HOME")))
+(site-caseq (laptop
+	     (if (fboundp 'device-pixel-width)
+		 (let ((pw (device-pixel-width (selected-device))))
+		   (cond ((= pw 1680)
+			  ;; we're on a big external monitor
+			  (set-frame-pixel-size (selected-frame) 900 960)
+			  (set-frame-position (selected-frame) -3 -20))
+			 ((= (device-pixel-height (selected-device)) 768)
+			  ;; we're on a narrow cinema-ratio laptop
+			  (set-frame-pixel-size (selected-frame) 690 710)
+			  (set-frame-position (selected-frame) -5 -26))
+			 ((= (device-pixel-height (selected-device)) 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)
+			  (set-frame-pixel-size (selected-frame) 700 960)
+			  (set-frame-position (selected-frame) -3 -20)))))))
+
+;;; 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) 
+
+;;; moved from custom.el, where they don't work
+(setq
+ ecb-layout-name "leftright1"
+ ecb-layout-window-sizes '(("leftright1"
+			    (ecb-directories-buffer-name 0.1474358974358974 . 0.3620689655172414)
+			    (ecb-sources-buffer-name 0.1474358974358974 . 0.3275862068965517)
+			    (ecb-history-buffer-name 0.1474358974358974 . 0.3103448275862069)
+			    (ecb-methods-buffer-name 0.2051282051282051 . 1.0)))
+ ecb-options-version "2.40"
+ ecb-show-tags '((default
+		   (include collapsed nil)
+		   (parent collapsed nil)
+		   (type flattened nil)
+		   (variable collapsed name)
+		   (function flattened name)
+		   (label hidden nil)
+		   (t collapsed nil))
+		 (c++-mode
+		  (include collapsed nil)
+		  (parent collapsed nil)
+		  (type flattened nil)
+		  (variable collapsed access)
+		  (function flattened access)
+		  (function collapsed access)
+		  (label hidden nil)
+		  (t collapsed nil))
+		 (c-mode
+		  (include collapsed nil)
+		  (parent collapsed nil)
+		  (type flattened nil)
+		  (variable collapsed access)
+		  (function flattened access)
+		  (function collapsed access)
+		  (label hidden nil)
+		  (t collapsed nil))
+		 (bovine-grammar-mode
+		  (keyword collapsed name)
+		  (token collapsed name)
+		  (nonterminal flattened name)
+		  (rule flattened name)
+		  (t collapsed nil))
+		 (wisent-grammar-mode
+		  (keyword collapsed name)
+		  (token collapsed name)
+		  (nonterminal flattened name)
+		  (rule flattened name)
+		  (t collapsed nil))
+		 (texinfo-mode
+		  (section flattened nil)
+		  (def collapsed name)
+		  (t collapsed nil)))
+ ecb-source-file-regexps '((".*"
+			    ("\\(^\\(\\.\\|#\\)\\|\\(~$\\|\\.\\(elc\\|obj\\|o\\|class\\|lib\\|dll\\|a\\|so\\|cache\\|pyc\\)$\\)\\)")
+			    ("^\\.\\(emacs\\|gnus\\)$")))
+ ecb-sources-exclude-cvsignore '(".*")
+ ediff-diff-options "--binary -b -w -B "
+ efs-ftp-program-name "/c/Windows/System32/ftp"
+ efs-ftp-flush-command "help help"
+ efs-tmp-name-template "C:\\Cygwin\\tmp\\efs"
+; efs-ftp-program-name "/usr/bin/ftp"
+ efs-use-passive-mode nil
+ gnus-treat-display-picons nil
+ ispell-local-dictionary "british"
+ ispell-program-name "aspell"
+ jde-ant-buildfile "build.xml"
+ jde-ant-enable-find t
+ jde-ant-read-target t
+ jde-auto-parse-buffer-interval 60
+ jde-db-option-application-args '("-err" "err.xml" "id.xpdl")
+ jde-enable-abbrev-mode t
+ jde-gen-cflow-if '("(if (jde-parse-comment-or-quoted-p)" " '(l \"if\")" " '(l '> \"if\" jde-gen-conditional-padding-1 " "  \"(\" jde-gen-conditional-padding-2 (p \"if-clause: \" clause)" "        jde-gen-conditional-padding-2 \")\"" " (if jde-gen-k&r " "   jde-gen-conditional-padding-3 " "  '>'n)" " \"{\"'>'n'>'r'n" " \"}\"" " (if jde-gen-comments " " '(l \" // end of if (\" (s clause) \")\"))" " '>'n'> )" " )")
+ jde-gen-cflow-try-catch '("(if (jde-parse-comment-or-quoted-p)" " '(l \"try\")" " '(l '> \"try \"" " (if jde-gen-k&r " "  ()" "  'n)" " \"{\"'>'n'>'r'n" " \"}\" '>" " (if jde-gen-k&r " "   jde-gen-conditional-padding-3 " "  'n)" " \"catch\" jde-gen-conditional-padding-1 " " \"(\" jde-gen-conditional-padding-2 (p \"catch what: \" clause) \" e\"" "       jde-gen-conditional-padding-2 \")\" '>" " (if jde-gen-k&r " "   jde-gen-conditional-padding-3 " "  'n)" " \"{\"'>'n'>'p'n" " \"}\"" "  (if jde-gen-comments " " 	'(l \" // end of try-catch\"))" " '>'n'> )" " )")
+ jde-global-classpath '("/home/ht/MT/source/debug:/home/ht/MT/source/3rdparty/jh.jar:/home/ht/MT/source/3rdparty/jsearch.jar")
+ jde-jdk '("1.6.0")
+ jde-jdk-registry '(("1.6.0" . "/c/Program Files/Java/jdk1.6.0_23")
+		    ("1.5.0" . "/c/Program Files/j2sdk1.5.0"))
+ fill-indent-according-to-mode t
+ )