chiark / gitweb /
Merge remote branch 'crybaby'
authorMark Wooding <mdw@distorted.org.uk>
Thu, 18 Feb 2010 15:33:26 +0000 (15:33 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 18 Feb 2010 15:33:26 +0000 (15:33 +0000)
* crybaby:
  dot/emacs: Support the Chrome edit server.
  dot/vimrc: Use the right font and colours.  Turn on autoindent.
  el/dot-emacs.el: Twiddle `variable-pitch' face size for Emacs 22.

.gitattributes [new file with mode: 0644]
dot/Xdefaults
dot/bash_profile
dot/emacs
dot/xinitrc
el/dot-emacs.el

diff --git a/.gitattributes b/.gitattributes
new file mode 100644 (file)
index 0000000..87ee1a5
--- /dev/null
@@ -0,0 +1,2 @@
+*.el           diff=lisp
+dot/emacs      diff=lisp
index a6f060d38062dcc47bc556579cc57f53e4b6338d..87c40ba8b42133397d8294406dd54e10bad2d283 100644 (file)
@@ -73,6 +73,7 @@ emacs.geometry:                       77x33
 Emacs.pane.menubar.font:       NICEFONT
 Emacs.menu*.font:              NICEFONT
 Emacs.font:                    FIXED
+Emacs.fontBackend:             x,xft
 Emacs.cursorColor:             red
 Emacs.bitmapIcon:              true
 Emacs*foreground:              white
index a6015e97167cdfc827c770cdc57d7224e2aa1441..abd34633a63c64800efa9d759c01eba6448b2a3e 100644 (file)
@@ -19,7 +19,7 @@ cd $HOME
 # --- Add elements to a path string ---
 
 __mdw_addto () {
-  local var=$1 val dir=$2 new=""
+  local var=$1 val dir=$2 new="" change=nil
   eval "val=\$$var"
   shift 2
   for i in "$@"; do
@@ -27,7 +27,7 @@ __mdw_addto () {
     [ -d $i ] || continue
     case "X$val" in
       X)
-       val=$i
+       val=$i change=t
        continue
        ;;
       X$i)
@@ -43,13 +43,13 @@ __mdw_addto () {
        val=${val%:$i}
        ;;
     esac
-    new=$new:$i
+    new=$new:$i change=t
   done
   case $dir in
     l) val=${new#:}:$val;;
     r) val=$val$new;;
   esac
-  export $var=$val
+  case $change in t) export $var=$val ;; esac
 }
 
 # --- Set the path variable ---
index 6fe3a05c679f7b5782e4be8513dd1452d42e0c4c..ed2d4d1cd7034aba1bd8161f2d03fe255a7d9d86 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
 
 (trap (or mdw-fast-startup (require 'tex-site)))
 
-(trap (or mdw-fast-startup (semantic-load-enable-minimum-features)))
+(trap (or mdw-fast-startup (semantic-load-enable-excessive-code-helpers)))
 (setq semanticdb-default-save-directory "~/.emacs.d/semanticdb/")
+(eval-after-load "senator"
+  '(setq isearch-mode-hook
+        (remq 'senator-isearch-mode-hook isearch-mode-hook)
+        isearch-mode-end-hook
+        (remq 'senator-isearch-mode-hook isearch-mode-end-hook)))
 
 ;; Skeleton stuff.
 
 
 (setq sendmail-program "~/bin/sendmail-hack")
 
-(setq mail-user-agent 'message-user-agent)
+(setq mail-user-agent 'message-user-agent
+      read-mail-command 'gnus)
 (setq message-signature-separator "^-- \\(\\|\\[mdw\\]\\)$"
       message-yank-prefix "> "
       message-yank-cited-prefix "> "
 (setq display-buffer-reuse-frames nil  ;Don't confuse me by showing buffers
       iswitchb-default-method 'samewindow) ;in other random frames
 (setq dired-deletion-confirmer         ;Make deletion easier in dired
-      (symbol-function 'y-or-n-p))
+      (symbol-function 'y-or-n-p)
+      dired-listing-switches "-alF"    ;Do `ls -F' things in dired windows
+      wdired-allow-to-change-permissions 'advanced)
 (setq read-quoted-char-radix 16)       ;C-q HEX-STUFF [RET]
-(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 w3m-default-display-inline-images t)
 
+(eval-after-load "w3m"
+  '(let ((entries '(("application/pdf" "\\.pdf\\'" ("evince" file) nil)
+                   ("application/x-pdf" "\\.pdf\\'" ("evince" file) nil))))
+     (dolist (e entries)
+       (setq w3m-content-type-alist
+            (cons e (remove* (car e) w3m-content-type-alist
+                             :key #'car :test #'string=))))))
+
 (setq w3-do-incremental-display t
       w3-use-menus '(file edit view go bookmark options
                     buffers style search emacs nil help)
 
 (setq display-time-24hr-format t)
 (display-time)
+(column-number-mode 1)
 (trap
   (if window-system
       (let ((view-diary-entries-initially t))
         (cursor-color . "red"))
        (if mdw-black-background
           '((background-mode . dark))
-        '((background-mode . light)))
-       (and (eq window-system 'pm)
-           '((font . "-os2-System VIO-medium-r-normal--*-40-*-*-m-*-cp850")
-             (menu-font . "8.Helv")
-             (background-color . "lightgrey")))
-       default-frame-alist))
+        '((background-mode . light)))))
+(setq window-system-default-frame-alist
+      '((pm (font . "-os2-System VIO-medium-r-normal--*-40-*-*-m-*-cp850")
+           (menu-font . "8.Helv")
+           (background-color . "lightgrey"))
+       (nil (menu-bar-lines . 0))))
 
 ;; Other frame fiddling.
 
 
 (eval-after-load "dired"
   '(progn
-     (define-key dired-mode-map [?\C-x ?\C-q]
-       'wdired-change-to-wdired-mode)))
+     (or (lookup-key dired-mode-map  [?\C-x ?\C-q])
+        (define-key dired-mode-map [?\C-x ?\C-q]
+          'wdired-change-to-wdired-mode))
+     (and (fboundp 'dired-do-relsymlink)
+         (define-key dired-mode-map [?\C-c ?\C-s] 'dired-do-relsymlink))))
 
 (add-hook 'org-mode-hook
          #'(lambda () (mdw-clobber-evil-keymap org-mode-map)))
 
 (setq completion-ignored-extensions
       (append `(".hc" ".hi") completion-ignored-extensions))
+(dolist (dir (remove-if-not (lambda (ext)
+                             (= (aref ext (- (length ext) 1)) ?/))
+                           completion-ignored-extensions))
+  (if (/= (aref dir 0) ?/)
+      (setq completion-ignored-extensions
+           (cons (concat "/" dir)
+                 (remove dir completion-ignored-extensions)))))
 
 ;; Some common local definitions.
 
 
 (eval-after-load "tramp"
   '(let ((fix-args (if (mdw-version-< tramp-version "2.1")
-                      #'append #'identity)))
+                      #'append #'list)))
      (setq tramp-methods
           (mdw-uniquify-alist
            `(("become"
index da8c51c1a3cdbe3bd10367b6dffb3c5d95e6ac0a..4d6da0c47504fe01f9c7bacf15e5dbc7eb389ae8 100755 (executable)
@@ -122,6 +122,10 @@ start-clients () {
   ## Mail notification.
   run bginit mail-notification
 
+  ## Policykit authentication agent.
+  agent=/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
+  if [ -x $agent ]; then run bginit $agent; fi
+
   ## System monitor.
   case $vnc in no) run bginit gkrellm ;; esac
 
index f1592fd65e2ea626fa515c099c65c02d28c67f1a..234fe55098d6f7ad3ba011549b2ebfe04ee8dbe3 100644 (file)
@@ -598,7 +598,7 @@ (make-variable-buffer-local 'mdw-fill-prefix)
 
 (defvar mdw-hanging-indents
   (concat "\\(\\("
-           "\\([*o]\\|-[-#]?\\|[0-9]+\\.\\|\\[[0-9]+\\]\\|([a-zA-Z])\\)"
+           "\\([*o+]\\|-[-#]?\\|[0-9]+\\.\\|\\[[0-9]+\\]\\|([a-zA-Z])\\)"
            "[ \t]+"
          "\\)?\\)")
   "*Standard regexp matching parts of a hanging indent.
@@ -699,6 +699,14 @@ (defun mdw-standard-fill-prefix (rx &optional mat)
 (defvar mdw-auto-indent t
   "Whether to indent automatically after a newline.")
 
+(defun mdw-whitespace-mode (&optional arg)
+  "Turn on/off whitespace mode, but don't highlight trailing space."
+  (interactive "P")
+  (when (and (boundp 'whitespace-style)
+            (fboundp 'whitespace-mode))
+    (let ((whitespace-style (remove 'trailing whitespace-style)))
+      (whitespace-mode arg))))
+
 (defun mdw-misc-mode-config ()
   (and mdw-auto-indent
        (cond ((eq major-mode 'lisp-mode)
@@ -715,8 +723,7 @@ (defun mdw-misc-mode-config ()
   (auto-fill-mode 1)
   (setq fill-column 77)
   (setq show-trailing-whitespace t)
-  (let ((whitespace-style (remove 'trailing whitespace-style)))
-    (trap (whitespace-mode t)))
+  (mdw-whitespace-mode 1)
   (and (fboundp 'gtags-mode)
        (gtags-mode))
   (outline-minor-mode t)
@@ -725,8 +732,7 @@ (defun mdw-misc-mode-config ()
   (trap (turn-on-font-lock)))
 
 (defun mdw-post-config-mode-hack ()
-  (let ((whitespace-style (remove 'trailing whitespace-style)))
-    (trap (whitespace-mode t))))
+  (mdw-whitespace-mode 1))
 
 (eval-after-load 'gtags
   '(progn
@@ -767,26 +773,13 @@ (defun mdw-last-one-out-turn-off-the-lights (frame)
     (when (and frame-display
               (eq window-system 'x)
               (not (some (lambda (fr)
-                           (message "checking frame %s" frame)
                            (and (not (eq fr frame))
                                 (string= (frame-parameter fr 'display)
-                                         frame-display)
-                                (progn "frame %s still uses us" nil)))
+                                         frame-display)))
                          (frame-list))))
       (run-with-idle-timer 0 nil #'x-close-connection frame-display))))
 (add-hook 'delete-frame-functions 'mdw-last-one-out-turn-off-the-lights)
 
-(defvar mdw-frame-parameters-alist
-  '((nil (menu-bar-lines . 0))))
-(defun mdw-set-frame-parameters (frame)
-  (let ((params (assq (if (fboundp 'window-system)
-                         (window-system frame)
-                       window-system)
-                     mdw-frame-parameters-alist)))
-    (when params
-      (modify-frame-parameters frame (cdr params)))))
-(add-hook 'after-make-frame-functions 'mdw-set-frame-parameters)
-
 ;;;--------------------------------------------------------------------------
 ;;; General fontification.
 
@@ -1539,6 +1532,7 @@ (defun mdw-fontify-pythonic (keywords)
 
   ;; Miscellaneous fiddling.
   (mdw-standard-fill-prefix "\\([ \t]*#+[ \t]*\\)")
+  (setq indent-tabs-mode nil)
 
   ;; Now define fontification things.
   (make-local-variable 'font-lock-keywords)