diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 0523790..9ef3f2f 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -254,11 +254,12 @@ (use-package latex :config - (define-key LaTeX-mode-map (kbd "C-z") - '(lambda () (interactive) - (save-buffer) - (TeX-command "LaTeX" 'TeX-master-file -1))) (setq-default TeX-command-extra-options "-shell-escape") + (defun latex-save-and-compile () + (interactive) + (save-buffer) + (TeX-command "LaTeX" 'TeX-master-file -1)) + (define-key LaTeX-mode-map (kbd "C-z") 'latex-save-and-compile) (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 ()