Function: TeX-insert-dollar-action
TeX-insert-dollar-action is a byte-compiled function defined in
tex.el.
Signature
(TeX-insert-dollar-action ARG)
Documentation
Determine the action for TeX-insert-dollar.
Returns one of the following possible symbols that determine the
behavior of TeX-insert-dollar:
just-insert
Just insert a literal $ ARG times. For example, if you need
exactly one $, you can use C-1 $.
electric
Behave according to TeX-electric-math.
begin-math
Insert a $ that starts the math mode.
end-math
Insert a $ that ends the math mode.
refuse
Refuse to insert a $ (or do anything else).
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-insert-dollar-action (arg)
"Determine the action for `TeX-insert-dollar'.
Returns one of the following possible symbols that determine the
behavior of `TeX-insert-dollar':
`just-insert'
Just insert a literal $ ARG times. For example, if you need
exactly one $, you can use `C-1 $'.
`electric'
Behave according to `TeX-electric-math'.
`begin-math'
Insert a $ that starts the math mode.
`end-math'
Insert a $ that ends the math mode.
`refuse'
Refuse to insert a $ (or do anything else)."
(cond
((or arg (TeX-escaped-p) (TeX-verbatim-p))
'just-insert)
(TeX-electric-math
'electric)
((not (texmathp))
'begin-math)
((member (car texmathp-why) '("$" "$$"))
'end-math)
;; Math mode was not entered with dollar according to `texmathp'.
(TeX-refuse-unmatched-dollar
'refuse)
;; We assume that `texmathp' was wrong and behave as if not in
;; math mode. (bug#57626)
('begin-math)))