Cleanup latex config

- remove a defun
- bind keys using define-key (to LaTeX-mode-map) instead of local-set-key
This commit is contained in:
Adam Goldsmith 2015-10-10 14:17:46 -04:00
parent 5a4273480f
commit 12523f7a37

View File

@ -153,16 +153,12 @@
(use-package latex
:config
(setq TeX-command-extra-options "-shell-escape")
(defun my-tex ()
"Saves the current buffer and runs LaTeX, all with no prompts or further interaction."
(interactive)
(save-buffer)
(TeX-command "LaTeX" 'TeX-master-file -1))
(add-hook 'LaTeX-mode-hook
(lambda () (local-set-key (kbd "C-z") 'my-tex)
(local-set-key (kbd "C-c e") 'tex-close-latex-block)
(TeX-source-correlate-mode)))
(define-key LaTeX-mode-map (kbd "C-z")
'(lambda () (interactive)
(save-buffer)
(TeX-command "LaTeX" 'TeX-master-file -1)))
(define-key LaTeX-mode-map (kbd "C-c e") 'tex-close-latex-block)
(add-hook 'LaTeX-mode-hook 'TeX-source-correlate-mode)
(defun latex-tsv-to-table ()
"Converts tab-seperated-values to a LaTeX table."
(interactive)