From: Mark Wooding Date: Mon, 28 Apr 2008 13:48:08 +0000 (+0100) Subject: Merge branch 'master' of git+ssh://ponder.ncipher.com/~mwooding/etc/profile X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/ee5598ca7f13962784323ab4625d44412f3f3de6?hp=36ef07f1c95343d8bd020b9d6b115fd6930933da Merge branch 'master' of git+ssh://ponder.ncipher.com/~mwooding/etc/profile * 'master' of git+ssh://ponder.ncipher.com/~mwooding/etc/profile: emacs: New keybindings for windmove. emacs: Use vector notation consistently for key bindings. --- diff --git a/bash_logout b/bash_logout index 766d852..9e67a16 100644 --- a/bash_logout +++ b/bash_logout @@ -1,6 +1,4 @@ # -# $Id$ -# # Bash logout things # diff --git a/bash_profile b/bash_profile index e2d8d05..692efc2 100644 --- a/bash_profile +++ b/bash_profile @@ -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 5ce148f..755dffa 100644 --- 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 # diff --git a/dot-emacs.el b/dot-emacs.el index 704f37d..1b1a71c 100644 --- a/dot-emacs.el +++ b/dot-emacs.el @@ -1,7 +1,5 @@ ;;; -*- mode: emacs-lisp; coding: utf-8 -*- ;;; -;;; $Id$ -;;; ;;; Functions and macros for .emacs ;;; ;;; (c) 2004 Mark Wooding @@ -611,6 +609,26 @@ doesn't cope with anything approximating a complicated case." (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 bae4138..f47f77b 100644 --- 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 @@ -80,6 +78,15 @@ (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") @@ -133,6 +140,8 @@ (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 @@ -166,6 +175,8 @@ (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)) @@ -191,12 +202,22 @@ ;;;----- 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) @@ -233,7 +254,7 @@ (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 16ef268..183ea64 100755 --- 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