Mercurial > dotfiles
comparison .elisp/settings/40.modes.el @ 310:6a773ec78813
emacs: edit tempfiles from mutt in mail-mode
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Tue, 07 May 2013 14:39:15 -0400 |
parents | a9e3c2ca6fa5 |
children | 0a593d2c0595 |
comparison
equal
deleted
inserted
replaced
309:74990ae54bd2 | 310:6a773ec78813 |
---|---|
95 (add-to-list 'auto-mode-alist '("\\.hg/patches/" . diff-mode)) | 95 (add-to-list 'auto-mode-alist '("\\.hg/patches/" . diff-mode)) |
96 (defun mq-patch-set-default-directory () | 96 (defun mq-patch-set-default-directory () |
97 (when (string= ".hg" (nth 2 (reverse (split-string default-directory "/")))) | 97 (when (string= ".hg" (nth 2 (reverse (split-string default-directory "/")))) |
98 (setq default-directory (expand-file-name (concat default-directory "../../"))))) | 98 (setq default-directory (expand-file-name (concat default-directory "../../"))))) |
99 (add-hook 'diff-mode-hook 'mq-patch-set-default-directory) | 99 (add-hook 'diff-mode-hook 'mq-patch-set-default-directory) |
100 | |
101 ;; Tempfiles from mutt should be edited in mail-mode. | |
102 (add-to-list 'auto-mode-alist '("/mutt" . mail-mode)) |