Emacs Asked on December 5, 2021
I’m using AuCTeX (v.11.89.6 with Emacs 25.1). I have no problems with it, just a small nuisance. Whenever I use TeX-insert-macro
(C-c C-m) I get many options I never use. For instance, when I wish to insert the command enquote{...}
, I run TeX-insert-macro
and start typing enq
. The first option I get is MakeHyphenQuote
and so I have to scroll down to select enquote
.
To go around this issue, I used to edit the csquotes.el
style file and remove MakeHyphenQuote
from the list. However, each time AuCTeX updates itself, my file is removed and all customisation gets lost.
I also tried editing the TeX-symbol-list
variable (which, according to apropos-value
, seems to hold these commands), but couldn’t make it to work.
So my question is whether I can remove MakeHyphenQuote
(or any other command or environment) from the list used by AuCTeX for command insertion.
Update: just to clarify, I’m using ivy-mode
.
I finally managed to tackle this problem with the following function:
(defun nv/cleanauctex ()
"Removes two elements from TeX-symbol-list"
(interactive)
(setq TeX-symbol-list (remove '("MakeHyphenBlockQuote" "Language" "Opening quotation mark" "Delimiter for citation" "Closing quotation mark") TeX-symbol-list))
(setq TeX-symbol-list (remove '("MakeHyphenQuote" "Babel's language name" "Opening quotation mark" "Closing quotation mark") TeX-symbol-list))
)
After AucTeX
loads csquotes.el
(which contains the symbols related to the csquotes.sty
LaTeX package), I run this function which expunges two elements from the TeX-symbol-list
variable.
Unfortunately, I have to manually run the function after I have opened a .tex file. (A hook doesn't work as AucTeX
dynamically loads the symbols according to the preamble's packages.)
Answered by NVaughan on December 5, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP