Mercurial > dotfiles
comparison .elisp/settings/40.modes.el @ 218:b9b118dba61a
emacs: make diff-mode mq-aware
| author | Augie Fackler <durin42@gmail.com> |
|---|---|
| date | Sat, 14 Aug 2010 21:58:40 -0500 |
| parents | e4842709368a |
| children | 739d96003993 |
comparison
equal
deleted
inserted
replaced
| 217:e4842709368a | 218:b9b118dba61a |
|---|---|
| 85 | 85 |
| 86 (add-hook 'java-mode-hook | 86 (add-hook 'java-mode-hook |
| 87 (lambda () | 87 (lambda () |
| 88 (c-set-offset 'topmost-intro-cont | 88 (c-set-offset 'topmost-intro-cont |
| 89 annotation-fix))) | 89 annotation-fix))) |
| 90 | |
| 91 ;; mq diff-mode support | |
| 92 (add-to-list 'auto-mode-alist '("\\.hg/patches/" . diff-mode)) | |
| 93 (defun mq-patch-set-default-directory () | |
| 94 (when (string= ".hg" (nth 2 (reverse (split-string default-directory "/")))) | |
| 95 (setq default-directory (expand-file-name (concat default-directory "../../"))))) | |
| 96 (add-hook 'diff-mode-hook 'mq-patch-set-default-directory) |
