From 15be089570e88203a5f9a693645273db6fdce500 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Tue, 1 Mar 2016 15:26:21 -0500 Subject: [PATCH] Split LaTeX compile keybinding into function useful for mmm-mode --- .emacs.d/init.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 ()