lang/latex: fix removal of master file prompt

It makes me sad that this is necessary. Friends don't let friends use
anonymous functions for their package's hooks.
This commit is contained in:
Henrik Lissner 2018-06-15 21:16:37 +02:00
parent 9e85acec2c
commit 4a0b98ef1c
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -54,10 +54,12 @@
(define-key LaTeX-mode-map "\C-j" nil)
;; Do not prompt for Master files, this allows auto-insert to add templates
;; to .tex files
(add-hook! '(LaTeX-mode TeX-mode)
(remove-hook 'find-file-hook (car find-file-hook) 'local))
;; Do not prompt for Master files, this allows auto-insert to add templates to
;; .tex files
(add-hook! '(LaTeX-mode-hook TeX-mode-hook)
(remove-hook 'find-file-hook
(cl-find-if #'byte-code-function-p find-file-hook)
'local))
;; Adding useful things for latex
(add-hook! 'LaTeX-mode-hook
#'(LaTeX-math-mode