From 4666983a5e78c64687633fdfc4511a6a337505b5 Mon Sep 17 00:00:00 2001 From: Alexey Romanov Date: Thu, 10 Jul 2014 15:53:13 +0400 Subject: [PATCH] Add fast math entry methods --- modules/prelude-latex.el | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/prelude-latex.el b/modules/prelude-latex.el index 069af5d..b69072a 100644 --- a/modules/prelude-latex.el +++ b/modules/prelude-latex.el @@ -32,14 +32,25 @@ ;;; Code: -(prelude-require-packages '(auctex)) +(prelude-require-packages '(auctex cdlatex)) (require 'smartparens-latex) +;; for case +(require 'cl) (eval-after-load "company" '(progn (prelude-require-packages '(company-auctex)) (company-auctex-init))) +(defcustom prelude-latex-fast-math-entry 'LaTeX-math-mode + "Method used for fast math symbol entry in LaTeX." + :link '(function-link :tag "AUCTeX Math Mode" LaTeX-math-mode) + :link '(emacs-commentary-link :tag "CDLaTeX" "cdlatex.el") + :group 'prelude + :type '(choice (const :tag "None" nil) + (const :tag "AUCTeX Math Mode" LaTeX-math-mode) + (const :tag "CDLaTeX" cdlatex))) + ;; AUCTeX configuration (setq TeX-auto-save t) (setq TeX-parse-self t) @@ -65,7 +76,10 @@ "Default Prelude hook for `LaTeX-mode'." (turn-on-auto-fill) (abbrev-mode +1) - (smartparens-mode +1)) + (smartparens-mode +1) + (case prelude-latex-fast-math-entry + (LaTeX-math-mode (LaTeX-math-mode 1)) + (cdlatex (turn-on-cdlatex)))) (setq prelude-latex-mode-hook 'prelude-latex-mode-defaults)