Emacs: workaround for the tex-hook issue
parent
63509e6fde
commit
011af5350e
|
@ -227,7 +227,9 @@ properly escaped with double-quotes in case it has spaces."
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; TeX setup
|
;; TeX setup
|
||||||
|
|
||||||
(defun tex-setup ()
|
(add-hook
|
||||||
|
'tex-mode-hook
|
||||||
|
(lambda ()
|
||||||
(dolist (key '("\C-c\C-f" "\C-c\C-b"))
|
(dolist (key '("\C-c\C-f" "\C-c\C-b"))
|
||||||
(local-unset-key key))
|
(local-unset-key key))
|
||||||
(set-face-attribute 'tex-verbatim nil :family "freemono")
|
(set-face-attribute 'tex-verbatim nil :family "freemono")
|
||||||
|
@ -237,21 +239,19 @@ properly escaped with double-quotes in case it has spaces."
|
||||||
")
|
")
|
||||||
;; (set (make-local-variable 'use-hard-newlines) t)
|
;; (set (make-local-variable 'use-hard-newlines) t)
|
||||||
(local-set-key (kbd "<f9>") 'tex-pdf-view)
|
(local-set-key (kbd "<f9>") 'tex-pdf-view)
|
||||||
(tex-set-compiler))
|
(tex-set-compiler)))
|
||||||
|
|
||||||
;; TODO: why is tex-setup needed for tex-mode only?
|
;; TODO: why is run-hooks needed for tex-mode only?
|
||||||
(add-hook 'tex-mode-hook 'tex-setup t)
|
(run-hooks 'tex-mode-hook)
|
||||||
(tex-setup)
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; LaTeX setup
|
;; LaTeX setup
|
||||||
|
|
||||||
(defun latex-setup ()
|
(add-hook
|
||||||
(local-set-key (kbd "M-RET") 'latex-itemize)
|
'latex-mode-hook
|
||||||
(turn-on-orgtbl))
|
(lambda ()
|
||||||
|
(local-set-key (kbd "M-RET") 'latex-itemize)
|
||||||
(add-hook 'latex-mode-hook 'latex-setup)
|
(turn-on-orgtbl)))
|
||||||
(latex-setup)
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; The magnificent latex-math-preview mode!
|
;; The magnificent latex-math-preview mode!
|
||||||
|
|
Loading…
Reference in New Issue