X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/2140978777dba51f1924f2ddf6fb4b27acc5778b..3cfdeaa9e603583f0d5745cb3211ff9b667c3428:/emacs diff --git a/emacs b/emacs index 841ad0d..2d0aaff 100644 --- a/emacs +++ b/emacs @@ -40,6 +40,17 @@ (maybe-autoload 'nc-timesheet-prepare "nc-timesheet" nil t nil) (maybe-autoload 'nc-timesheet-submit "nc-timesheet" nil t nil) +(and (library-exists-p "debian-changelog-mode") + (add-to-list 'auto-mode-alist + `(,(concat "/debian/" + "\\(" + "[" "[:lower:][:digit:]]" + "[[:lower:][:digit:].+-" "]+" + "\\." + "\\)?" + "changelog\\'") + . debian-changelog-mode))) + (and (library-exists-p "vc-git") (not (memq 'GIT vc-handled-backends)) (setq vc-handled-backends (cons 'GIT vc-handled-backends))) @@ -49,6 +60,8 @@ (trap (or mdw-fast-startup (require 'tex-site))) +(trap (or mdw-fast-startup (semantic-load-enable-excessive-code-helpers))) + ;; --- Skeleton stuff --- (trap (or mdw-fast-startup (require 'skel-init))) @@ -105,6 +118,30 @@ (setq rmail-display-summary t) (setq rmail-file-name "~/Mail/rmail") +(setq sendmail-program "~/bin/sendmail-hack") + +(setq mail-user-agent 'message-user-agent) +(setq message-signature-separator "^-- \\(\\|\\[mdw\\]\\)$" + message-yank-prefix "> " + message-yank-cited-prefix "> " + message-indent-citation-function '(message-indent-citation + mdw-trim-spaces-after-citing)) + +(defun mdw-trim-spaces-after-citing () + (save-excursion + (save-restriction + (narrow-to-region (point) (mark t)) + (while (re-search-forward "^> +$" nil t) + (replace-match ">"))))) + +(and (fboundp 'turn-on-gnus-dired-mode) + (not mdw-fast-startup) + (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)) + +(or mdw-fast-startup + (trap (bbdb-initialize 'gnus 'sendmail 'vm 'message))) +(setq bbdb-north-american-phone-numbers-p nil) + ;; --- Customization --- (setq custom-file "~/.emacs-custom") @@ -154,6 +191,7 @@ iswitchb-default-method 'samewindow) ;in other random frames (setq dired-deletion-confirmer ;Make deletion easier in dired (symbol-function 'y-or-n-p)) +(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...) @@ -361,7 +399,6 @@ (global-set-key [?\C-x ?/] 'auto-fill-mode) (global-set-key [?\C-x ?w ?d] 'mdw-divvy-window) (global-set-key [insertchar] 'overwrite-mode) -(global-set-key [?\C-x ?m] 'vm-mail) (global-set-key [?\C-x ?\C-n] 'skel-create-file) (global-set-key [?\C-x ?4 ?n] 'skel-create-file-other-window) (global-set-key [?\C-x ?5 ?n] 'skel-create-file-other-frame) @@ -374,6 +411,23 @@ 'mouse-drag-vertical-line) (global-set-key [vertical-scroll-bar C-mouse-1] #'(lambda () (interactive))) +(and (not mdw-fast-startup) (fboundp 'hippie-expand) + (global-set-key [?\M-/] 'hippie-expand)) + +(defun mdw-clobber-org-mode-map () + (dolist (key '([S-up] [S-down] [S-left] [S-right] + [?\e left] [?\e right] + [M-left] [M-right])) + (define-key org-mode-map key nil)) + (define-key org-mode-map [?\C-c left] 'org-shiftleft) + (define-key org-mode-map [?\C-c right] 'org-shiftright) + (define-key org-mode-map [?\C-c up] 'org-shiftup) + (define-key org-mode-map [?\C-c down] 'org-shiftdown) + (define-key org-mode-map [C-left] 'org-metaleft) + (define-key org-mode-map [C-right] 'org-metaright) + (define-key org-mode-map [C-up] 'org-metaup) + (define-key org-mode-map [C-down] 'org-metadown)) +(add-hook 'org-mode-hook 'mdw-clobber-org-mode-map) ;; --- Recognising types of files ---