recently I updated emacs package and found double quotes were not inserted as regular double quotes (") any more.
Instead, it insert pair of LaTeX double quotes `` and '' on ". On the second typing of ", it reverts to a single LaTeX double quote ``.
I would like to setup auctex and smartparens such that
- make a pair of regular double quotes (") inserted, and return to a pair of LaTeX double quote on the second typing of ".
or
- make a pair of regular double quotes (") inserted, and return to a single regular double quote on the second typing of ".
my emacs setup for smartparens and auctex is as follows:
(use-package smartparens
:ensure t
:init
(progn
(use-package smartparens-config)
(smartparens-global-mode t)
(show-smartparens-global-mode t)
)
:config
(progn
(setq smartparens-strict-mode t)
(sp-local-pair 'emacs-lisp-mode "'" nil :when '(sp-in-string-p))
)
(use-package tex
:ensure auctex
:init
(setq-default TeX-master nil)
(setq TeX-auto-save t) ;; Enable parse on load
(setq TeX-parse-self t) ;; Enable parse on save
(setq TeX-engine 'xetex)
(setq TeX-command-extra-options "-shell-escape")
(setq TeX-source-correlate-method 'synctex)
(setq TeX-source-correlate-mode t)
(setq TeX-quote-after-quote 1)
(setq reftex-plug-into-AUCTeX t)
(setq latex-preview-pane-enable t)
:config
(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) ; with AUCTeX LaTeX math mode
(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
(add-hook 'TeX-mode-hook '(lambda () (TeX-fold-mode 1)))
(add-hook 'TeX-mode-hook '(lambda () (outline-minor-mode 1)))
(add-hook 'TeX-mode-hook '(lambda () (TeX-PDF-mode 1)))
(add-hook 'TeX-mode-hook 'reftex-mode)
(add-hook 'LaTeX-mode-hook
(lambda ()
(define-key LaTeX-mode-map (kbd "<f10>") 'TeX-command-master)
(define-key LaTeX-mode-map (kbd "C-c `") 'TeX-error-overview)
))
)