X-Git-Url: https://git.donarmstrong.com/?p=home-base.git;a=blobdiff_plain;f=.emacs;h=9406ea885c88d3980deaff02a30d03ad3fb87367;hp=d5634725af1e4debe46bf7aeb6d9bddc72cd3a3c;hb=c900edc791c124edfd072fc70de050e55be93897;hpb=1363ca7da05a11e98df9cb503ec9d75759440580 diff --git a/.emacs b/.emacs index d563472..9406ea8 100644 --- a/.emacs +++ b/.emacs @@ -86,6 +86,9 @@ (add-to-list 'auto-mode-alist '("mutt-[a-z0-9]+-[0-9]+-" . post-mode)) (add-to-list 'auto-mode-alist '("muttrc" . muttrc-mode)) +(add-to-list 'auto-mode-alist '("\\.mdwn$" . markdown-mode)) + + (global-unset-key "\M-g") (global-set-key "\M-g" 'goto-line) @@ -291,4 +294,18 @@ (setq outline-regexp "\\(^#\\{4,5\\} \\)\\|\\(^[a-zA-Z0-9_\.]+ ?<- ?function(.*{\\)") (defun outline-level (lambda () (interactive) (cond ((looking-at "^##### ") 1)((looking-at "^#### ") 2)((looking-at "^[a-zA-Z0-9_\.]+ ?<- ?function(.*{") 3) (t 1000))) - ))) \ No newline at end of file + ))) + +(defun my-org-mode-setup () + (when (and (buffer-file-name) + (file-exists-p (buffer-file-name))) + (load-library "reftex") + (and (buffer-file-name) + (file-exists-p (buffer-file-name)) + (reftex-parse-all)) + (reftex-set-cite-format + '((?b . "[[bib::%l]]") + (?n . "[[note::%l]]")))) + (define-key org-mode-map "\C-c\C-g" 'reftex-citation) +) +(add-hook 'org-mode-hook 'my-org-mode-setup)