Merge commit 'metalzone/master'
authorMark Wooding <mdw@distorted.org.uk>
Mon, 7 Apr 2008 14:00:13 +0000 (15:00 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 7 Apr 2008 14:00:13 +0000 (15:00 +0100)
* commit 'metalzone/master':
  emacs, dot-emacs: Fix WoMan configuration.
  dot-emacs: Fix mdw-check-autorevert.
  dot-emacs: Fix calls to mdw-regexps.
  dot-emacs: Fix divvy-window for Emacs 21.
  dot-emacs: Fix the eval-when-compile stanza.
  dot-emacs: Squash complaints about use of interactive commands.
  dot-emacs: Flush stray close-paren.
  Now that Emacs starts up pretty quick, favour it over lesser editors.
  emacs: Stuff for fast startup.
  emacs: Keep the bookmarks file up to date.
  dot-emacs, gitconfig, colordiffrc: Fix fontification for diffs.
  Emacs, aspell: Make Emacs use aspell; configure aspell for use.
  Fix pstree output.

Conflicts:

dot-emacs.el: Python keywords: add `with'; use mdw-regexps.

aspell.conf [new file with mode: 0644]
bash_profile
bashrc
colordiffrc
dot-emacs.el
emacs
gitconfig
setup

diff --git a/aspell.conf b/aspell.conf
new file mode 100644 (file)
index 0000000..3efa9c3
--- /dev/null
@@ -0,0 +1,11 @@
+### aspell configuration
+
+## Dictionaries.
+master en_GB-ize-w_accents
+lang en
+
+## Other tweaks.
+sug-mode fast
+run-together true
+run-together-limit 3
+run-together-min 3
index 383acab..af9021f 100644 (file)
@@ -92,7 +92,13 @@ export QMAILINJECT=c
 # --- Find a text editor ---
 
 export MDW_EDITOR=ed
-for ed in mg "emacs22 -nw" "emacs21 -nw" "emacs -nw" vi pico nano ae; do
+emacs_startup_args="--no-site-file --mdw-fast-startup -nw"
+for ed in \
+       "emacs22 $emacs_startup_args" \
+       "emacs21 $emacs_startup_args" \
+       mg \
+       "emacs -nw" \
+       vi pico nano ae; do
   name=`echo $ed | sed 's/ .*$//'`
   if __mdw_programp "$name"; then
     MDW_EDITOR=$ed
diff --git a/bashrc b/bashrc
index e7eb9c3..5ce148f 100644 (file)
--- a/bashrc
+++ b/bashrc
@@ -124,7 +124,7 @@ alias ssync="rsync -e ssh"
 alias rootly=$__MDW_ROOTLY
 alias r=rootly
 alias re="rootly $EDITOR"
-alias pstree="pstree -Ghl"
+alias pstree="pstree -hl"
 alias cdtmp='cd ${TMPDIR-/tmp}'
 alias pushtmp='pushd ${TMPDIR-/tmp}'
 alias e="$EDITOR"
index 7922f97..40d1e44 100644 (file)
@@ -5,5 +5,5 @@ color_patches=no
 
 cvsstuff=white
 diffstuff=darkcyan
-newtext=green
-oldtext=red
+newtext=darkgreen
+oldtext=darkred
index 7dd4743..cb2047d 100644 (file)
 ;;; along with this program; if not, write to the Free Software Foundation,
 ;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+;;;----- Check command-line -------------------------------------------------
+
+(defvar mdw-fast-startup nil
+  "Whether .emacs should optimize for rapid startup.
+This may be at the expense of cool features.")
+(let ((probe nil) (next command-line-args))
+  (message "probe = %s" probe)
+  (message "next = %s" next)
+  (while next
+    (cond ((string= (car next) "--mdw-fast-startup")
+          (setq mdw-fast-startup t)
+          (if probe
+              (rplacd probe (cdr next))
+            (setq command-line-args (cdr next))))
+         (t
+          (setq probe next)))
+    (setq next (cdr next))))
+
 ;;;----- Some general utilities ---------------------------------------------
 
+(eval-when-compile
+  (unless (fboundp 'make-regexp)
+    (load "make-regexp"))
+  (require 'cl))
+
+(defmacro mdw-regexps (&rest list)
+  "Turn a LIST of strings into a single regular expression at compile-time."
+  `',(make-regexp list))
+
 ;; --- Some error trapping ---
 ;;
 ;; If individual bits of this file go tits-up, we don't particularly want
 (defun mdw-config (sym)
   "Read the configuration variable named SYM."
   (unless mdw-config
-    (setq mdw-config (with-temp-buffer
-                      (insert-file-contents "~/.mdw.conf")
-                      (replace-regexp "^[ \t]*\\(#.*\\|\\)\n" ""
-                                      nil (point-min) (point-max))
-                      (replace-regexp (concat "^[ \t]*"
-                                              "\\([-a-zA-Z0-9_.]*\\)"
-                                              "[ \t]*=[ \t]*"
-                                              "\\(.*[^ \t\n]\\|\\)"
-                                              "[ \t]**\\(\n\\|$\\)")
-                                      "(\\1 . \"\\2\") "
-                                      nil (point-min) (point-max))
-                      (car (read-from-string
-                            (concat "(" (buffer-string) ")"))))))
+    (setq mdw-config
+         (flet ((replace (what with)
+                  (goto-char (point-min))
+                  (while (re-search-forward what nil t)
+                    (replace-match with t))))
+           (with-temp-buffer
+             (insert-file-contents "~/.mdw.conf")
+             (replace  "^[ \t]*\\(#.*\\|\\)\n" "")
+             (replace (concat "^[ \t]*"
+                              "\\([-a-zA-Z0-9_.]*\\)"
+                              "[ \t]*=[ \t]*"
+                              "\\(.*[^ \t\n]\\|\\)"
+                              "[ \t]**\\(\n\\|$\\)")
+                      "(\\1 . \"\\2\")\n")
+             (car (read-from-string
+                   (concat "(" (buffer-string) ")")))))))
   (cdr (assq sym mdw-config)))
 
 ;; --- Is an Emacs library available? ---
@@ -81,37 +111,41 @@ path.  The non-nil value is the filename we found for the library."
 
 ;; --- Splitting windows ---
 
-(or (and (fboundp 'scroll-bar-columns)
-        (fboundp 'fringe-columns))
-    (progn
-      (defun scroll-bar-columns (side)
-       (cond ((eq side 'left) 0)
-             (window-system 3)
-             (t 1)))
-      (defun fringe-columns (side)
-       (cond ((not window-system) 0)
-             ((eq side 'left) 1)
-             (t 2)))))
-
-(defun mdw-divvy-window (&optional w)
+(unless (fboundp 'scroll-bar-columns)
+  (defun scroll-bar-columns (side)
+    (cond ((eq side 'left) 0)
+         (window-system 3)
+         (t 1))))
+(unless (fboundp 'fringe-columns)
+  (defun fringe-columns (side)
+    (cond ((not window-system) 0)
+         ((eq side 'left) 1)
+         (t 2))))
+
+(defun mdw-divvy-window (&optional width)
   "Split a wide window into appropriate widths."
-  (interactive)
-  (or w (setq w (if (and window-system
-                        (>= emacs-major-version 22))
-                   77
-                 78)))
+  (interactive "P")
+  (setq width (cond (width (prefix-numeric-value width))
+                   ((and window-system
+                         (>= emacs-major-version 22))
+                    77)
+                   (t 78)))
   (let* ((win (selected-window))
         (sb-width (if (not window-system)
                       1
-                    (+ (scroll-bar-columns 'left)
-                       (scroll-bar-columns 'right)
-                       (fringe-columns 'left)
-                       (fringe-columns 'right))))
+                    (let ((tot 0))
+                      (dolist (what '(scroll-bar fringe))
+                        (dolist (side '(left right))
+                          (incf tot
+                                (funcall (intern (concat (symbol-name what)
+                                                         "-columns"))
+                                         side))))
+                      tot)))
         (c (/ (+ (window-width) sb-width)
-              (+ w sb-width))))
+              (+ width sb-width))))
     (while (> c 1)
       (setq c (1- c))
-      (split-window-horizontally (+ w sb-width))
+      (split-window-horizontally (+ width sb-width))
       (other-window 1))
     (select-window win)))
 
@@ -262,22 +296,26 @@ input lists are not modified, although they'll probably become garbage."
     (or arg (progn
              (goto-char (point-max))
              (insert "\nNP: ")
-             (insert-file np-file)))))
-
-(trap
-  (require 'tramp)
-  (require 'autorevert)
-  (defun mdw-check-autorevert ()
-    (if (and (buffer-file-name)
-            (tramp-tramp-file-p (buffer-file-name)))
-       (unless global-auto-revert-ignore-buffer
-         (setq global-auto-revert-ignore-buffer 'tramp))
-       (if (eq global-auto-revert-ignore-buffer 'tramp)
-           (setq global-auto-revert-ignore-buffer nil))))
-  (defadvice find-file (after mdw-autorevert activate)
-    (mdw-check-autorevert))
-  (defadvice write-file (after mdw-autorevert activate)
-    (mdw-check-autorevert)))
+             (insert-file-contents np-file)))))
+
+(defun mdw-check-autorevert ()
+  "Sets global-auto-revert-ignore-buffer appropriately for this buffer,
+taking into consideration whether it's been found using tramp, which seems to
+get itself into a twist."
+  (cond ((not (boundp 'global-auto-revert-ignore-buffer))
+        nil)
+       ((and (buffer-file-name)
+             (fboundp 'tramp-tramp-file-p)
+             (tramp-tramp-file-p (buffer-file-name)))
+        (unless global-auto-revert-ignore-buffer
+          (setq global-auto-revert-ignore-buffer 'tramp)))
+       ((eq global-auto-revert-ignore-buffer 'tramp)
+        (setq global-auto-revert-ignore-buffer nil))))
+
+(defadvice find-file (after mdw-autorevert activate)
+  (mdw-check-autorevert))
+(defadvice write-file (after mdw-autorevert activate)
+  (mdw-check-autorevert))
 
 (defun mdwmail-mode ()
   "Major mode for editing news and mail messages from external programs
@@ -615,14 +653,16 @@ doesn't cope with anything approximating a complicated case."
     (font-lock-keyword-face :weight bold)
     (font-lock-constant-face :weight bold)
     (font-lock-reference-face :weight bold)
-    (woman-bold-face :weight bold)
-    (woman-italic-face :slant italic)
-    (diff-header-face :foreground "skyblue1")
-    (diff-index-face :weight bold)
-    (diff-file-header-face)
-    (diff-context-face :foreground "grey70")
-    (diff-added-face :foreground "white")
-    (diff-removed-face :foreground "white" :slant italic)
+    (woman-bold :weight bold)
+    (woman-italic :slant italic)
+    (diff-index :weight bold)
+    (diff-file-header :weight bold)
+    (diff-hunk-header :foreground "SkyBlue1")
+    (diff-function :foreground "SkyBlue1" :weight bold)
+    (diff-header :background "grey10")
+    (diff-added :foreground "green")
+    (diff-removed :foreground "red")
+    (diff-context)
     (whizzy-slice-face :background "grey10")
     (whizzy-error-face :background "darkred")
     (trailing-whitespace :background "red")
@@ -693,113 +733,112 @@ doesn't cope with anything approximating a complicated case."
 
   (make-local-variable 'font-lock-keywords)
   (let ((c-keywords
-        (make-regexp '(
-                       "and"           ;C++
-                       "and_eq"        ;C++
-                       "asm"           ;K&R, GCC
-                       "auto"          ;K&R, C89
-                       "bitand"        ;C++
-                       "bitor"         ;C++
-                       "bool"          ;C++, C9X macro
-                       "break"         ;K&R, C89
-                       "case"          ;K&R, C89
-                       "catch"         ;C++
-                       "char"          ;K&R, C89
-                       "class"         ;C++
-                       "complex"       ;C9X macro, C++ template type
-                       "compl"         ;C++
-                       "const"         ;C89
-                       "const_cast"    ;C++
-                       "continue"      ;K&R, C89
-                       "defined"       ;C89 preprocessor
-                       "default"       ;K&R, C89
-                       "delete"        ;C++
-                       "do"            ;K&R, C89
-                       "double"        ;K&R, C89
-                       "dynamic_cast"  ;C++
-                       "else"          ;K&R, C89
-                       ;; "entry"      ;K&R -- never used
-                       "enum"          ;C89
-                       "explicit"      ;C++
-                       "export"        ;C++
-                       "extern"        ;K&R, C89
-                       "false"         ;C++, C9X macro
-                       "float"         ;K&R, C89
-                       "for"           ;K&R, C89
-                       ;; "fortran"    ;K&R
-                       "friend"        ;C++
-                       "goto"          ;K&R, C89
-                       "if"            ;K&R, C89
-                       "imaginary"     ;C9X macro
-                       "inline"        ;C++, C9X, GCC
-                       "int"           ;K&R, C89
-                       "long"          ;K&R, C89
-                       "mutable"       ;C++
-                       "namespace"     ;C++
-                       "new"           ;C++
-                       "operator"      ;C++
-                       "or"            ;C++
-                       "or_eq"         ;C++
-                       "private"       ;C++
-                       "protected"     ;C++
-                       "public"        ;C++
-                       "register"      ;K&R, C89
-                       "reinterpret_cast" ;C++
-                       "restrict"      ;C9X
-                       "return"        ;K&R, C89
-                       "short"         ;K&R, C89
-                       "signed"        ;C89
-                       "sizeof"        ;K&R, C89
-                       "static"        ;K&R, C89
-                       "static_cast"   ;C++
-                       "struct"        ;K&R, C89
-                       "switch"        ;K&R, C89
-                       "template"      ;C++
-                       "this"          ;C++
-                       "throw"         ;C++
-                       "true"          ;C++, C9X macro
-                       "try"           ;C++
-                       "this"          ;C++
-                       "typedef"       ;C89
-                       "typeid"        ;C++
-                       "typeof"        ;GCC
-                       "typename"      ;C++
-                       "union"         ;K&R, C89
-                       "unsigned"      ;K&R, C89
-                       "using"         ;C++
-                       "virtual"       ;C++
-                       "void"          ;C89
-                       "volatile"      ;C89
-                       "wchar_t"       ;C++, C89 library type
-                       "while"         ;K&R, C89
-                       "xor"           ;C++
-                       "xor_eq"        ;C++
-                       "_Bool"         ;C9X
-                       "_Complex"      ;C9X
-                       "_Imaginary"    ;C9X
-                       "_Pragma"       ;C9X preprocessor
-                       "__alignof__"   ;GCC
-                       "__asm__"       ;GCC
-                       "__attribute__" ;GCC
-                       "__complex__"   ;GCC
-                       "__const__"     ;GCC
-                       "__extension__" ;GCC
-                       "__imag__"      ;GCC
-                       "__inline__"    ;GCC
-                       "__label__"     ;GCC
-                       "__real__"      ;GCC
-                       "__signed__"    ;GCC
-                       "__typeof__"    ;GCC
-                       "__volatile__"  ;GCC
-                       )))
+        (mdw-regexps "and"             ;C++
+                     "and_eq"          ;C++
+                     "asm"             ;K&R, GCC
+                     "auto"            ;K&R, C89
+                     "bitand"          ;C++
+                     "bitor"           ;C++
+                     "bool"            ;C++, C9X macro
+                     "break"           ;K&R, C89
+                     "case"            ;K&R, C89
+                     "catch"           ;C++
+                     "char"            ;K&R, C89
+                     "class"           ;C++
+                     "complex"         ;C9X macro, C++ template type
+                     "compl"           ;C++
+                     "const"           ;C89
+                     "const_cast"      ;C++
+                     "continue"        ;K&R, C89
+                     "defined"         ;C89 preprocessor
+                     "default"         ;K&R, C89
+                     "delete"          ;C++
+                     "do"              ;K&R, C89
+                     "double"          ;K&R, C89
+                     "dynamic_cast"    ;C++
+                     "else"            ;K&R, C89
+                     ;; "entry"        ;K&R -- never used
+                     "enum"            ;C89
+                     "explicit"        ;C++
+                     "export"          ;C++
+                     "extern"          ;K&R, C89
+                     "false"           ;C++, C9X macro
+                     "float"           ;K&R, C89
+                     "for"             ;K&R, C89
+                     ;; "fortran"      ;K&R
+                     "friend"          ;C++
+                     "goto"            ;K&R, C89
+                     "if"              ;K&R, C89
+                     "imaginary"       ;C9X macro
+                     "inline"          ;C++, C9X, GCC
+                     "int"             ;K&R, C89
+                     "long"            ;K&R, C89
+                     "mutable"         ;C++
+                     "namespace"       ;C++
+                     "new"             ;C++
+                     "operator"        ;C++
+                     "or"              ;C++
+                     "or_eq"           ;C++
+                     "private"         ;C++
+                     "protected"       ;C++
+                     "public"          ;C++
+                     "register"        ;K&R, C89
+                     "reinterpret_cast" ;C++
+                     "restrict"         ;C9X
+                     "return"           ;K&R, C89
+                     "short"            ;K&R, C89
+                     "signed"           ;C89
+                     "sizeof"           ;K&R, C89
+                     "static"           ;K&R, C89
+                     "static_cast"      ;C++
+                     "struct"           ;K&R, C89
+                     "switch"           ;K&R, C89
+                     "template"         ;C++
+                     "this"             ;C++
+                     "throw"            ;C++
+                     "true"             ;C++, C9X macro
+                     "try"              ;C++
+                     "this"             ;C++
+                     "typedef"          ;C89
+                     "typeid"           ;C++
+                     "typeof"           ;GCC
+                     "typename"         ;C++
+                     "union"            ;K&R, C89
+                     "unsigned"         ;K&R, C89
+                     "using"            ;C++
+                     "virtual"          ;C++
+                     "void"             ;C89
+                     "volatile"         ;C89
+                     "wchar_t"          ;C++, C89 library type
+                     "while"            ;K&R, C89
+                     "xor"              ;C++
+                     "xor_eq"           ;C++
+                     "_Bool"            ;C9X
+                     "_Complex"         ;C9X
+                     "_Imaginary"       ;C9X
+                     "_Pragma"          ;C9X preprocessor
+                     "__alignof__"      ;GCC
+                     "__asm__"          ;GCC
+                     "__attribute__"    ;GCC
+                     "__complex__"      ;GCC
+                     "__const__"        ;GCC
+                     "__extension__"    ;GCC
+                     "__imag__"         ;GCC
+                     "__inline__"       ;GCC
+                     "__label__"        ;GCC
+                     "__real__"         ;GCC
+                     "__signed__"       ;GCC
+                     "__typeof__"       ;GCC
+                     "__volatile__"     ;GCC
+                     ))
        (preprocessor-keywords
-        (make-regexp '("assert" "define" "elif" "else" "endif" "error"
-                       "ident" "if" "ifdef" "ifndef" "import" "include"
-                       "line" "pragma" "unassert" "undef" "warning")))
+        (mdw-regexps "assert" "define" "elif" "else" "endif" "error"
+                     "ident" "if" "ifdef" "ifndef" "import" "include"
+                     "line" "pragma" "unassert" "undef" "warning"))
        (objc-keywords
-        (make-regexp '("class" "defs" "encode" "end" "implementation"
-                       "interface" "private" "protected" "protocol" "public"
-                       "selector"))))
+        (mdw-regexps "class" "defs" "encode" "end" "implementation"
+                     "interface" "private" "protected" "protocol" "public"
+                     "selector")))
 
     (setq font-lock-keywords
          (list
@@ -876,10 +915,10 @@ doesn't cope with anything approximating a complicated case."
 
   (make-local-variable 'font-lock-keywords)
   (let ((c-keywords
-        (make-regexp '("break" "case" "cd" "continue" "define" "default"
-                       "do" "else" "exit" "for" "global" "goto" "help" "if"
-                       "local" "mat" "obj" "print" "quit" "read" "return"
-                       "show" "static" "switch" "while" "write"))))
+        (mdw-regexps "break" "case" "cd" "continue" "define" "default"
+                     "do" "else" "exit" "for" "global" "goto" "help" "if"
+                     "local" "mat" "obj" "print" "quit" "read" "return"
+                     "show" "static" "switch" "while" "write")))
 
     (setq font-lock-keywords
          (list
@@ -943,17 +982,17 @@ doesn't cope with anything approximating a complicated case."
 
   (make-local-variable 'font-lock-keywords)
   (let ((java-keywords
-        (make-regexp '("abstract" "boolean" "break" "byte" "case" "catch"
-                       "char" "class" "const" "continue" "default" "do"
-                       "double" "else" "extends" "final" "finally" "float"
-                       "for" "goto" "if" "implements" "import" "instanceof"
-                       "int" "interface" "long" "native" "new" "package"
-                       "private" "protected" "public" "return" "short"
-                       "static" "super" "switch" "synchronized" "this"
-                       "throw" "throws" "transient" "try" "void" "volatile"
-                       "while"
-
-                       "false" "null" "true"))))
+        (mdw-regexps "abstract" "boolean" "break" "byte" "case" "catch"
+                     "char" "class" "const" "continue" "default" "do"
+                     "double" "else" "extends" "final" "finally" "float"
+                     "for" "goto" "if" "implements" "import" "instanceof"
+                     "int" "interface" "long" "native" "new" "package"
+                     "private" "protected" "public" "return" "short"
+                     "static" "super" "switch" "synchronized" "this"
+                     "throw" "throws" "transient" "try" "void" "volatile"
+                     "while"
+
+                     "false" "null" "true")))
 
     (setq font-lock-keywords
          (list
@@ -1018,22 +1057,22 @@ doesn't cope with anything approximating a complicated case."
 
   (make-local-variable 'font-lock-keywords)
   (let ((csharp-keywords
-        (make-regexp '("abstract" "as" "base" "bool" "break"
-                       "byte" "case" "catch" "char" "checked"
-                       "class" "const" "continue" "decimal" "default"
-                       "delegate" "do" "double" "else" "enum"
-                       "event" "explicit" "extern" "false" "finally"
-                       "fixed" "float" "for" "foreach" "goto"
-                       "if" "implicit" "in" "int" "interface"
-                       "internal" "is" "lock" "long" "namespace"
-                       "new" "null" "object" "operator" "out"
-                       "override" "params" "private" "protected" "public"
-                       "readonly" "ref" "return" "sbyte" "sealed"
-                       "short" "sizeof" "stackalloc" "static" "string"
-                       "struct" "switch" "this" "throw" "true"
-                       "try" "typeof" "uint" "ulong" "unchecked"
-                       "unsafe" "ushort" "using" "virtual" "void"
-                       "volatile" "while" "yield"))))
+        (mdw-regexps "abstract" "as" "base" "bool" "break"
+                     "byte" "case" "catch" "char" "checked"
+                     "class" "const" "continue" "decimal" "default"
+                     "delegate" "do" "double" "else" "enum"
+                     "event" "explicit" "extern" "false" "finally"
+                     "fixed" "float" "for" "foreach" "goto"
+                     "if" "implicit" "in" "int" "interface"
+                     "internal" "is" "lock" "long" "namespace"
+                     "new" "null" "object" "operator" "out"
+                     "override" "params" "private" "protected" "public"
+                     "readonly" "ref" "return" "sbyte" "sealed"
+                     "short" "sizeof" "stackalloc" "static" "string"
+                     "struct" "switch" "this" "throw" "true"
+                     "try" "typeof" "uint" "ulong" "unchecked"
+                     "unsafe" "ushort" "using" "virtual" "void"
+                     "volatile" "while" "yield")))
 
     (setq font-lock-keywords
          (list
@@ -1095,17 +1134,17 @@ doesn't cope with anything approximating a complicated case."
 
   (make-local-variable 'font-lock-keywords)
   (let ((c-keywords
-        (make-regexp '("BEGIN" "END" "ARGC" "ARGIND" "ARGV" "CONVFMT"
-                       "ENVIRON" "ERRNO" "FIELDWIDTHS" "FILENAME" "FNR"
-                       "FS" "IGNORECASE" "NF" "NR" "OFMT" "OFS" "ORS" "RS"
-                       "RSTART" "RLENGTH" "RT" "SUBSEP"
-                       "atan2" "break" "close" "continue" "cos" "delete"
-                       "do" "else" "exit" "exp" "fflush" "file" "for" "func"
-                       "function" "gensub" "getline" "gsub" "if" "in"
-                       "index" "int" "length" "log" "match" "next" "rand"
-                       "return" "print" "printf" "sin" "split" "sprintf"
-                       "sqrt" "srand" "strftime" "sub" "substr" "system"
-                       "systime" "tolower" "toupper" "while"))))
+        (mdw-regexps "BEGIN" "END" "ARGC" "ARGIND" "ARGV" "CONVFMT"
+                     "ENVIRON" "ERRNO" "FIELDWIDTHS" "FILENAME" "FNR"
+                     "FS" "IGNORECASE" "NF" "NR" "OFMT" "OFS" "ORS" "RS"
+                     "RSTART" "RLENGTH" "RT"   "SUBSEP"
+                     "atan2" "break" "close" "continue" "cos" "delete"
+                     "do" "else" "exit" "exp" "fflush" "file" "for" "func"
+                     "function" "gensub" "getline" "gsub" "if" "in"
+                     "index" "int" "length" "log" "match" "next" "rand"
+                     "return" "print" "printf" "sin" "split" "sprintf"
+                     "sqrt" "srand" "strftime" "sub" "substr" "system"
+                     "systime" "tolower" "toupper" "while")))
 
     (setq font-lock-keywords
          (list
@@ -1159,11 +1198,11 @@ doesn't cope with anything approximating a complicated case."
 
   (make-local-variable 'font-lock-keywords)
   (let ((perl-keywords
-        (make-regexp '("and" "cmp" "continue" "do" "else" "elsif" "eq"
-                       "for" "foreach" "ge" "gt" "goto" "if"
-                       "last" "le" "lt" "local" "my" "ne" "next" "or"
-                       "package" "redo" "require" "return" "sub"
-                       "undef" "unless" "until" "use" "while"))))
+        (mdw-regexps "and" "cmp" "continue" "do" "else" "elsif" "eq"
+                     "for" "foreach" "ge" "gt" "goto" "if"
+                     "last" "le" "lt" "local" "my" "ne" "next" "or"
+                     "package" "redo" "require" "return" "sub"
+                     "undef" "unless" "until" "use" "while")))
 
     (setq font-lock-keywords
          (list
@@ -1204,7 +1243,6 @@ strip numbers instead."
 
 ;; --- Define Python fontification style ---
 
-(trap (require 'pyrex-mode))
 (defun mdw-fontify-python ()
 
   ;; --- Miscellaneous fiddling ---
@@ -1216,11 +1254,11 @@ strip numbers instead."
 
   (make-local-variable 'font-lock-keywords)
   (let ((python-keywords
-        (make-regexp '("and" "as" "assert" "break" "class" "continue" "def"
-                       "del" "elif" "else" "except" "exec" "finally" "for"
-                       "from" "global" "if" "import" "in" "is" "lambda"
-                       "not" "or" "pass" "print" "raise" "return" "try"
-                       "with" "while" "yield"))))
+        (mdw-regexps "and" "as" "assert" "break" "class" "continue" "def"
+                     "del" "elif" "else" "except" "exec" "finally" "for"
+                     "from" "global" "if" "import" "in" "is" "lambda"
+                     "not" "or" "pass" "print" "raise" "return" "try"
+                     "while" "with" "yield")))
     (setq font-lock-keywords
          (list
 
@@ -1391,28 +1429,28 @@ strip numbers instead."
 
   (make-local-variable 'font-lock-keywords)
   (let ((rexx-keywords
-        (make-regexp '("address" "arg" "by" "call" "digits" "do" "drop"
-                       "else" "end" "engineering" "exit" "expose" "for"
-                       "forever" "form" "fuzz" "if" "interpret" "iterate"
-                       "leave" "linein" "name" "nop" "numeric" "off" "on"
-                       "options" "otherwise" "parse" "procedure" "pull"
-                       "push" "queue" "return" "say" "select" "signal"
-                       "scientific" "source" "then" "trace" "to" "until"
-                       "upper" "value" "var" "version" "when" "while"
-                       "with"
-
-                       "abbrev" "abs" "bitand" "bitor" "bitxor" "b2x"
-                       "center" "center" "charin" "charout" "chars"
-                       "compare" "condition" "copies" "c2d" "c2x"
-                       "datatype" "date" "delstr" "delword" "d2c" "d2x"
-                       "errortext" "format" "fuzz" "insert" "lastpos"
-                       "left" "length" "lineout" "lines" "max" "min"
-                       "overlay" "pos" "queued" "random" "reverse" "right"
-                       "sign" "sourceline" "space" "stream" "strip"
-                       "substr" "subword" "symbol" "time" "translate"
-                       "trunc" "value" "verify" "word" "wordindex"
-                       "wordlength" "wordpos" "words" "xrange" "x2b" "x2c"
-                       "x2d"))))
+        (mdw-regexps "address" "arg" "by" "call" "digits" "do" "drop"
+                     "else" "end" "engineering" "exit" "expose" "for"
+                     "forever" "form" "fuzz" "if" "interpret" "iterate"
+                     "leave" "linein" "name" "nop" "numeric" "off" "on"
+                     "options" "otherwise" "parse" "procedure" "pull"
+                     "push" "queue" "return" "say" "select" "signal"
+                     "scientific" "source" "then" "trace" "to" "until"
+                     "upper" "value" "var" "version" "when" "while"
+                     "with"
+
+                     "abbrev" "abs" "bitand" "bitor" "bitxor" "b2x"
+                     "center" "center" "charin" "charout" "chars"
+                     "compare" "condition" "copies" "c2d" "c2x"
+                     "datatype" "date" "delstr" "delword" "d2c" "d2x"
+                     "errortext" "format" "fuzz" "insert" "lastpos"
+                     "left" "length" "lineout" "lines" "max" "min"
+                     "overlay" "pos" "queued" "random" "reverse" "right"
+                     "sign" "sourceline" "space" "stream" "strip"
+                     "substr" "subword" "symbol" "time" "translate"
+                     "trunc" "value" "verify" "word" "wordindex"
+                     "wordlength" "wordpos" "words" "xrange" "x2b" "x2c"
+                     "x2d")))
 
     (setq font-lock-keywords
          (list
@@ -1450,21 +1488,21 @@ strip numbers instead."
 
   (make-local-variable 'font-lock-keywords)
   (let ((sml-keywords
-        (make-regexp '("abstype" "and" "andalso" "as"
-                       "case"
-                       "datatype" "do"
-                       "else" "end" "eqtype" "exception"
-                       "fn" "fun" "functor"
-                       "handle"
-                       "if" "in" "include" "infix" "infixr"
-                       "let" "local"
-                       "nonfix"
-                       "of" "op" "open" "orelse"
-                       "raise" "rec"
-                       "sharing" "sig" "signature" "struct" "structure"
-                       "then" "type"
-                       "val"
-                       "where" "while" "with" "withtype"))))
+        (mdw-regexps "abstype" "and" "andalso" "as"
+                     "case"
+                     "datatype" "do"
+                     "else" "end" "eqtype" "exception"
+                     "fn" "fun" "functor"
+                     "handle"
+                     "if" "in" "include" "infix" "infixr"
+                     "let" "local"
+                     "nonfix"
+                     "of" "op" "open" "orelse"
+                     "raise" "rec"
+                     "sharing" "sig" "signature" "struct" "structure"
+                     "then" "type"
+                     "val"
+                     "where" "while" "with" "withtype")))
 
     (setq font-lock-keywords
          (list
@@ -1510,11 +1548,11 @@ strip numbers instead."
 
   (make-local-variable 'font-lock-keywords)
   (let ((haskell-keywords
-        (make-regexp '("as" "case" "ccall" "class" "data" "default"
-                       "deriving" "do" "else" "foreign" "hiding" "if"
-                       "import" "in" "infix" "infixl" "infixr" "instance"
-                       "let" "module" "newtype" "of" "qualified" "safe"
-                       "stdcall" "then" "type" "unsafe" "where"))))
+        (mdw-regexps "as" "case" "ccall" "class" "data" "default"
+                     "deriving" "do" "else" "foreign" "hiding" "if"
+                     "import" "in" "infix" "infixl" "infixr" "instance"
+                     "let" "module" "newtype" "of" "qualified" "safe"
+                     "stdcall" "then" "type" "unsafe" "where")))
 
     (setq font-lock-keywords
          (list
@@ -1722,13 +1760,13 @@ strip numbers instead."
   (make-local-variable 'font-lock-defaults)
   (make-local-variable 'message-mode-keywords)
   (let ((keywords
-        (make-regexp '("array" "bitmap" "callback" "docs[ \t]+enum"
-                       "export" "enum" "fixed-octetstring" "flags"
-                       "harmless" "map" "nested" "optional"
-                       "optional-tagged" "package" "primitive"
-                       "primitive-nullfree" "relaxed[ \t]+enum"
-                       "set" "table" "tagged-optional" "union"
-                       "variadic" "vector" "version" "version-tag"))))
+        (mdw-regexps "array" "bitmap" "callback" "docs[ \t]+enum"
+                     "export" "enum" "fixed-octetstring" "flags"
+                     "harmless" "map" "nested" "optional"
+                     "optional-tagged" "package" "primitive"
+                     "primitive-nullfree" "relaxed[ \t]+enum"
+                     "set" "table" "tagged-optional"   "union"
+                     "variadic" "vector" "version" "version-tag")))
     (setq message-mode-keywords
          (list
           (list (concat "\\<\\(" keywords "\\)\\>:")
@@ -1767,9 +1805,9 @@ strip numbers instead."
   (setq comment-start "/* ")
   (setq comment-end " */")
   (let ((preprocessor-keywords
-        (make-regexp '("assert" "define" "elif" "else" "endif" "error"
-                      "ident" "if" "ifdef" "ifndef" "import" "include"
-                      "line" "pragma" "unassert" "undef" "warning"))))
+        (mdw-regexps "assert" "define" "elif" "else" "endif" "error"
+                     "ident" "if" "ifdef" "ifndef" "import" "include"
+                     "line" "pragma" "unassert" "undef" "warning")))
     (setq message-mode-keywords
          (append (list (list (concat "^[ \t]*\\#[ \t]*"
                                      "\\(include\\|import\\)"
@@ -1811,8 +1849,8 @@ strip numbers instead."
   (make-local-variable 'font-lock-defaults)
   (make-local-variable 'mallow-driver-mode-keywords)
   (let ((keywords
-        (make-regexp '("each" "divert" "file" "if"
-                       "perl" "set" "string" "type" "write"))))
+        (mdw-regexps "each" "divert" "file" "if"
+                     "perl" "set" "string" "type" "write")))
     (setq mallow-driver-mode-keywords
          (list
           (list (concat "^%\\s *\\(}\\|\\(" keywords "\\)\\>\\).*$")
@@ -1948,7 +1986,7 @@ strip numbers instead."
   (setq fill-column 72)
   (flyspell-mode t)
   (mdw-standard-fill-prefix
-   "\\([ \t]*\\([A-Za-z0-9]*[>#|:] ?\\)*[ \t]*\\)" 3)
+   "\\([ \t]*\\([>#|:] ?\\)*[ \t]*\\)" 3)
   (auto-fill-mode 1))
 
 ;;;----- Shell mode ---------------------------------------------------------
diff --git a/emacs b/emacs
index ab0fed7..43b427f 100644 (file)
--- a/emacs
+++ b/emacs
      (not (memq 'GIT vc-handled-backends))
      (setq vc-handled-backends (cons 'GIT vc-handled-backends)))
 (and (library-exists-p "quilt")
+     (not mdw-fast-startup)
      (load "quilt"))
 
-(trap
-  (or (fboundp 'make-regexp)
-      (load "make-regexp")))
-
-(trap (require 'tex-site))
+(trap (or mdw-fast-startup (require 'tex-site)))
 
 ;; --- Skeleton stuff ---
 
-(trap (require 'skel-init))
+(trap (or mdw-fast-startup (require 'skel-init)))
 
 ;; --- Window system-dependent things ---
 
 (setq dired-deletion-confirmer         ;Make deletion easier in dired
       (symbol-function 'y-or-n-p))
 (setq dired-listing-switches "-alF")   ;Do `ls -F' things in dired windows
+(setq wdired-allow-to-change-permissions t)
 (setq case-fold-file-names nil)                ;Don't translate file names (grr...)
 (setq scroll-step 5)                   ;Don't scroll too much at a time
 (setq-default fill-column 77)          ;I use rather narrow windows
 (setq-default comment-column 40)       ;Set a standard comment column
 (setq-default truncate-partial-width-windows nil)
+(setq woman-use-own-frame nil)         ;Keep man pages somewhere sensible
 (setq diff-switches "-u"               ;I like reading unified diffs
       cvs-diff-flags (list diff-switches))
 (setq echo-keystrokes 10)              ;Long delay before keystrokes echo
 (setq ange-ftp-ftp-program-name "pftp")        ;Use passive FTP
 (setq find-ls-option                   ;Build file lists efficiently
       '("-print0 | xargs -0r ls -ld" . "ld"))
+(setq bookmark-save-flag 0)            ;Save bookmarks automatically
 (setq Info-fontify-maximum-menu-size 60000)
-(setq ispell-dictionary "british"
-      flyspell-default-dictionary "british"
+(setq ispell-program-name "aspell"
+      ispell-local-dictionary "en_GB-ize-w_accents"
+      flyspell-default-dictionary "en_GB-ize-w_accents"
       ispell-silently-savep t)
 (trap
   (require 'uniquify)
 
 (trap
   (and (string-match "linux" (symbol-name system-type))
+       (not mdw-fast-startup)
        (progn (require 'mailcrypt-init)
              (require 'mailcrypt)
              (setq mc-default-scheme 'mc-scheme-gpg)
 (add-hook 'slime-repl-mode-hook 'mdw-fontify-lispy t)
 (add-hook 'lisp-mode-hook 'mdw-common-lisp-indent t)
 (trap
 (require 'slime-autoloads)
-  (slime-setup '(slime-autodoc)))
-;;(trap (require 'xscheme))
-;;(setq-default xscheme-process-command-line "scheme -large -emacs")
(if (not mdw-fast-startup)
+     (progn
+       (require 'slime-autoloads)
+       (slime-setup '(slime-autodoc)))))
 (add-hook 'inferior-lisp-mode-hook
          #'(lambda ()
              (local-set-key "\C-m" 'comint-send-and-indent)) t)
index 62b90de..2f147d7 100644 (file)
--- a/gitconfig
+++ b/gitconfig
@@ -28,8 +28,8 @@
 [color "diff"]
        plain = normal
        meta = bold
-       new = bold green
-       old = bold red
+       new = green
+       old = red
        commit = bold yellow
        whitespace = reverse red
 
diff --git a/setup b/setup
index 38f5fd8..856c50b 100755 (executable)
--- a/setup
+++ b/setup
@@ -162,6 +162,7 @@ dotfiles="
   cgrc tigrc
   gdbinit
   guile
+  aspell.conf
   lisp-init.lisp:.cmucl-init.lisp
     lisp-init.lisp:.sbclrc
     lisp-init.lisp:.clisprc.lisp