chiark / gitweb /
Merge branch 'master' of git+ssh://ponder.ncipher.com/~mwooding/etc/profile
authorMark Wooding <mdw@distorted.org.uk>
Mon, 28 Apr 2008 13:48:08 +0000 (14:48 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 28 Apr 2008 13:48:08 +0000 (14:48 +0100)
* 'master' of git+ssh://ponder.ncipher.com/~mwooding/etc/profile:
  emacs: New keybindings for windmove.
  emacs: Use vector notation consistently for key bindings.

bash_logout
bash_profile
bashrc
dot-emacs.el
emacs
setup

index 766d85275076e30adccfe0da487a651035024f4f..9e67a160de35c215eab0fe21478101268c4bd95d 100644 (file)
@@ -1,6 +1,4 @@
 #
-# $Id$
-#
 # Bash logout things
 #
 
index e2d8d05968ac52eba4567e3503549806d1c57f90..692efc2d03134c8be054dc1114917accc2702cec 100644 (file)
@@ -1,7 +1,5 @@
 # -*-sh-*-
 #
-# $Id: .profile,v 1.3 1997/01/09 20:30:23 mdw Exp $
-#
 # Bash startup things
 #
 
diff --git a/bashrc b/bashrc
index 5ce148fef9ae46dd2e9012f296c07cd8c52faa10..755dffa2da7a729336da710f7abce28d215c42d9 100644 (file)
--- a/bashrc
+++ b/bashrc
@@ -1,7 +1,5 @@
 # -*- mode: sh; coding: utf-8 -*-
 #
-# $Id: .bashrc,v 1.6 1996/12/08 20:33:42 mdw Exp $
-#
 # Bash session things
 #
 
index 704f37d4c1e5a662957a7c958faa54c7af5f5bd6..1b1a71cf80f4127afdda5dd5e63d0e71b895b40e 100644 (file)
@@ -1,7 +1,5 @@
 ;;; -*- mode: emacs-lisp; coding: utf-8 -*-
 ;;;
-;;; $Id$
-;;;
 ;;; Functions and macros for .emacs
 ;;;
 ;;; (c) 2004 Mark Wooding
@@ -611,6 +609,26 @@ (make-face 'mdw-punct-face)
 (defvar mdw-number-face 'mdw-number-face "Face to use for numbers")
 (make-face 'mdw-number-face)
 
+;; --- Backup file handling ---
+
+(defvar mdw-backup-disable-regexps nil
+  "*List of regular expressions: if a file name matches any of these then the
+file is not backed up.")
+
+(defun mdw-backup-enable-predicate (name)
+  "[mdw]'s default backup predicate: allows a backup if the
+standard predicate would allow it, and it doesn't match any of
+the regular expressions in `mdw-backup-disable-regexps'."
+  (and (normal-backup-enable-predicate name)
+       (let ((answer t) (list mdw-backup-disable-regexps))
+        (save-match-data
+          (while list
+            (if (string-match (car list) name)
+                (setq answer nil))
+            (setq list (cdr list)))
+          answer))))
+(setq backup-enable-predicate 'mdw-backup-enable-predicate)
+
 ;;;----- General fontification ----------------------------------------------
 
 (defun mdw-set-fonts (frame faces)
diff --git a/emacs b/emacs
index bae4138ee6b5cb63d28e357f11de988e4723b849..f47f77bdba7b6bf060a566f6ea439f53f244aee0 100644 (file)
--- a/emacs
+++ b/emacs
@@ -1,7 +1,5 @@
 ;;; -*- mode: emacs-lisp; coding: utf-8 -*-
 ;;;
-;;; $Id: .emacs,v 1.11 1997/01/01 18:47:09 mdw Exp $
-;;;
 ;;; Emacs configuration file
 ;;;
 ;;; (c) 1996-1999 Mark Wooding
 (setq backup-by-copying-when-linked t)
 (setq backup-by-copying-when-mismatch t)
 
+(setq mdw-backup-disable-regexps
+      '("/\\.git/COMMIT_EDITMSG$"
+       "/\\.stgit\\(-edit\\.txt\\|msg\\.txt\\|\\.msg\\)$"))
+
+;; --- Safe variables ---
+
+(setq safe-local-variable-values
+      '((make-backup-files . nil)))
+
 ;; --- Calculator fiddling ---
 
 (setq calc-settings-file "~/.emacs-calc")
 (setq dabbrev-case-replace nil)                ;Retain case when completing
 (setq next-line-add-newlines nil)      ;Don't add weird newlines
 (setq split-height-threshold 45)       ;Reuse windows where sensible
+(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))
 (setq dired-listing-switches "-alF")   ;Do `ls -F' things in dired windows
 (trap (or mdw-fast-startup (global-auto-revert-mode t)))
 (setq psgml-html-build-new-buffer nil)
 
+(defvar mdw-black-background t)
+
 (setq cltl2-root-url (mdw-config 'cltl-url))
 (setq common-lisp-hyperspec-root (mdw-config 'hyperspec-url))
 
 
 ;;;----- Calendar configuration ---------------------------------------------
 
+(setq diary-file "~/etc/diary")
+
 ;; --- Trivial stuff for the sunrise/sunset calculations ---
 
 (setq calendar-latitude 52.2)
 (setq calendar-longitude 0.1)
 (setq calendar-location-name "Cambridge, UK")
 
+;; --- Holidays ---
+
+(and (not mdw-fast-startup)
+     (trap
+       (require 'ew-hols)
+       (setq other-holidays (append english-and-welsh-bank-holidays
+                                   other-holidays))))
+
 ;; --- Date format fiddling ---
 
 (setq european-calendar-style t)
       (let ((view-diary-entries-initially t))
        (calendar))))
 
-(defvar mdw-black-background t)
+;;;----- MailCrypt ----------------------------------------------------------
 
 ;; --- Define more mode hooks for MailCrypt ---
 
diff --git a/setup b/setup
index 16ef268ea2c03e03c7cf272ec7ce01a339b31824..183ea64a22cef0cda5427b488d9382adab0881df 100755 (executable)
--- a/setup
+++ b/setup
@@ -227,6 +227,7 @@ fi
 echo "Installing Emacs packages..."
 emacspkg="
   make-regexp
+  ew-hols
   git git-blame vc-git stgit
   quilt"
 for elib in $emacspkg; do