X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/e34a133fd6788a1769d624c9ac6f2c4bbf9efb65..4849ea187ec4e782b737ae41803b26b64b31f585:/emacs diff --git a/emacs b/emacs index 8abc4af..97277d1 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))) @@ -154,6 +165,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...) @@ -375,6 +387,21 @@ (global-set-key [vertical-scroll-bar C-mouse-1] #'(lambda () (interactive))) +(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 --- (setq auto-mode-alist @@ -408,7 +435,7 @@ ("\\.\\(tex\\|dtx\\)$" . latex-mode) ("\\.gc$" . haskell.-mode) (,(concat "^" (getenv "HOME") "/News/") . mdwmail-mode) - (,(concat "^" tmpdir "/\\(SLRN\\|snd\\|pico\\)") + (,(concat "^" tmpdir "/\\(SLRN\\|snd\\|pico\\|mutt\\)") . mdwmail-mode)) auto-mode-alist)) @@ -536,9 +563,6 @@ (add-hook 'TeXinfo-mode-hook 'mdw-fontify-texinfo t) (setq LaTeX-table-label "tbl:") -(setq-default TeX-master nil) -;; (setq TeX-parse-self t) -;; (setq TeX-auto-save t) (setq TeX-auto-untabify nil) (add-hook 'TeX-mode-hook 'mdw-fontify-tex t) (add-hook 'tex-mode-hook 'mdw-fontify-tex t) @@ -590,6 +614,30 @@ ("^pdf$" "." "evince %o") ("^html?$" "." "netscape %o"))) +(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 -------------------------------------------------------- (trap @@ -633,6 +681,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)