monnier pushed a commit to branch externals/auctex
in repository elpa.
commit 0c79eae3bc0028dff5851c8b29a193a1a4bcb80c
Author: Mosè Giordano <[email protected]>
Date: Sun May 12 20:26:45 2013 +0200
Insert one $ when point is in a verbatim construct.
* tex.el (TeX-insert-dollar): Insert just a single dollar when the
point is in a verbatim-like construct.
---
ChangeLog | 3 +++
tex.el | 5 +++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 878c57f..6e09034 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2013-05-12 Mos� Giordano <[email protected]>
+ * tex.el (TeX-insert-dollar): Insert just a single dollar when the
+ point is in a verbatim-like construct.
+
* font-latex.el (font-latex-jit-lock-force-redisplay): Don't rely
on existing `jit-lock-force-redisplay' because recent bzr Emacs
broke compatibility changing the number of arguments. Reported by
diff --git a/tex.el b/tex.el
index f18719d..cc4257c 100644
--- a/tex.el
+++ b/tex.el
@@ -5195,8 +5195,9 @@ sign. With optional ARG, insert that many dollar signs."
(arg
;; Numerical arg inserts that many
(insert (make-string (prefix-numeric-value arg) ?\$)))
- ((TeX-escaped-p)
- ;; This is escaped with `\', so just insert one.
+ ((or (TeX-escaped-p) (TeX-verbatim-p))
+ ;; Point is escaped with `\' or is in a verbatim-like construct, so just
+ ;; insert one $.
(insert "$"))
((texmathp)
;; We are inside math mode