Using Aquamacs 3.2 on Mac OSX Yosemite. I run with delete-selection-mode
set, and it mostly works as advertised. However, if I'm in TeX mode (AucTeX), make a selection, and then type $
, the selection is cleared and the $
appended. So for example if I select foobar
in xyzfoobarxyz
and type $
, I get xyzfoobar$xyz
instead of the desired xyz$xyz
. Is this known/documented behavior, or a bug? If it's a bug, is it an AucTeX or an Aquamacs issue (or an Emacs issue)?
Edit: In response to Tobias' comment below, C-h k $
returns
$ runs the command TeX-insert-dollar, which is an interactive compiled Lisp function in `tex.el'.
It is bound to $.
(TeX-insert-dollar &optional ARG)
Insert dollar sign.
If current math mode was not entered with a dollar, refuse to insert one. Show matching dollar sign if this dollar sign ends the TeX math mode and 'blink-matching-paren' is non-nil. When outside math mode, the behavior is controlled by the variable 'TeX-electric-math'.
With raw ^U prefix, insert exactly one dollar sign. With optional ARG, insert that many dollar signs.
And, the function delete-selection-mode
is defined in delsel.el
.
I'm far from LISP-literate. Perhaps the TeX-insert-dollar
function does not take the delete selection mode into account (either by design or by omission)?