X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/870778ff05d2edf2b9a13c51dace12710d427500..16fe7c41f6a107a5a897ea36dd82e9905bac6423:/emacs?ds=sidebyside diff --git a/emacs b/emacs index 131e78a..fb51fec 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,18 @@ (setq rmail-display-summary t) (setq rmail-file-name "~/Mail/rmail") +(setq sendmail-program "~/bin/sendmail-hack") + +(setq mail-user-agent 'message-user-agent) + +(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 +179,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 +387,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 +399,13 @@ '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)) + +(add-hook 'org-mode-hook + #'(lambda () (mdw-clobber-evil-keymap org-mode-map))) +(add-hook 'org-agenda-mode-hook + #'(lambda () (mdw-clobber-evil-keymap org-agenda-mode-map))) ;; --- Recognising types of files --- @@ -587,7 +619,29 @@ ("^pdf$" "." "evince %o") ("^html?$" "." "netscape %o"))) -(setq reftex-use-external-file-finders t) +(setq reftex-use-external-file-finders t + reftex-auto-recenter-toc t) + +(setq reftex-label-alist + '(("theorem" ?T "th:" "~\\ref{%s}" t ("theorems?" "th\\.") -2) + ("axiom" ?A "ax:" "~\\ref{%s}" t ("axioms?" "ax\\.") -2) + ("definition" ?D "def:" "~\\ref{%s}" t ("definitions?" "def\\.") -2) + ("proposition" ?P "prop:" "~\\ref{%s}" t + ("propositions?" "prop\\.") -2) + ("lemma" ?P "lem:" "~\\ref{%s}" t ("lemmas?" "lem\\.") -2) + ("example" ?X "eg:" "~\\ref{%s}" t ("examples?") -2) + ("exercise" ?E "ex:" "~\\ref{%s}" t ("exercises?" "ex\\.") -2) + ("enumerate" ?i "i:" "~\\ref{%s}" item ("items?")))) +(setq reftex-section-prefixes + '((0 . "part:") + (1 . "ch:") + (t . "sec:"))) + +(setq bibtex-field-delimiters 'double-quotes + bibtex-entry-format '(realign opts-or-alts required-fields + numerical-fields last-comma delimiters + unify-case) + bibtex-include-OPTkey nil) ;;;----- SLIME setup -------------------------------------------------------- @@ -632,6 +686,7 @@ ;; --- Notice passwords, and make C-a work right --- (add-hook 'shell-mode-hook #'mdw-sh-mode-setup) +(add-hook 'shell-mode-hook #'ansi-color-for-comint-mode-on) (setq shell-font-lock-keywords nil) (add-hook 'term-mode-hook #'mdw-term-mode-setup)