[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 288/299: Avoid duplicate marks in TeX-insert-dollar.
From: |
Stefan Monnier |
Subject: |
[elpa] 288/299: Avoid duplicate marks in TeX-insert-dollar. |
Date: |
Sun, 02 Nov 2014 03:12:01 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit 45ffe1f260ca71cd474c90bace312a57d7aedfee
Author: Ikumi Keita <address@hidden>
Date: Fri Oct 3 20:38:58 2014 +0200
Avoid duplicate marks in TeX-insert-dollar.
* tex.el (featurep): Activate mark in the GNU Emacs version of
TeX-activate-mark instead of being a no-op.
(TeX-insert-dollar): Use set-mark instead of push-mark in order to
avoid duplicate marks.
Signed-off-by: Tassilo Horn <address@hidden>
---
ChangeLog | 7 +++++++
tex.el | 14 ++++++--------
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2ce2a0c..10cc9de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2014-10-02 Ikumi Keita <address@hidden>
+ * tex.el (featurep): Activate mark in the GNU Emacs version of
+ TeX-activate-mark instead of being a no-op.
+ (TeX-insert-dollar): Use set-mark instead of push-mark in order to
+ avoid duplicate marks.
+
+2014-10-02 Ikumi Keita <address@hidden>
+
* texmathp.el (texmathp-tex-commands-default): Move equation*
environment to AMS-LaTeX section.
(texmathp-why): Fix docstring.
diff --git a/tex.el b/tex.el
index 25b7dfa..48dfa5b 100644
--- a/tex.el
+++ b/tex.el
@@ -751,7 +751,8 @@ If POS is nil, use current buffer location."
(and transient-mark-mode mark-active))
(defun TeX-activate-region ()
- nil)
+ (setq deactivate-mark nil)
+ (activate-mark))
(defun TeX-overlay-prioritize (start end)
"Calculate a priority for an overlay extending from START to END.
@@ -5540,18 +5541,18 @@ sign. With optional ARG, insert that many dollar
signs."
((and (eq last-command 'TeX-insert-dollar)
(re-search-forward "\\=\\$\\([^$][^z-a]*[^$]\\)\\$" (mark) t))
(replace-match "$$\\1$$")
- (push-mark (match-beginning 0) t))
+ (set-mark (match-beginning 0)))
;; \(...\) to \[...\]
((and (eq last-command 'TeX-insert-dollar)
(re-search-forward "\\=\\\\(\\([^z-a]*\\)\\\\)" (mark) t))
(replace-match "\\\\[\\1\\\\]")
- (push-mark (match-beginning 0) t))
+ (set-mark (match-beginning 0)))
;; Strip \[...\] or $$...$$
((and (eq last-command 'TeX-insert-dollar)
(or (re-search-forward "\\=\\\\\\[\\([^z-a]*\\)\\\\\\]" (mark) t)
(re-search-forward "\\=\\$\\$\\([^z-a]*\\)\\$\\$" (mark) t)))
(replace-match "\\1")
- (push-mark (match-beginning 0) t))
+ (set-mark (match-beginning 0)))
(t
;; We use `save-excursion' because point must be situated before opening
;; symbol.
@@ -5559,10 +5560,7 @@ sign. With optional ARG, insert that many dollar signs."
(exchange-point-and-mark)
(insert (cdr TeX-electric-math))))
;; Keep the region active.
- (if (featurep 'xemacs)
- (zmacs-activate-region)
- (setq activate-mark t
- deactivate-mark nil)))
+ (TeX-activate-region))
(TeX-electric-math
(insert (car TeX-electric-math))
(save-excursion (insert (cdr TeX-electric-math)))
- [elpa] 283/299: Document TeX-add-style-hook's new 3rd argument., (continued)
- [elpa] 283/299: Document TeX-add-style-hook's new 3rd argument., Stefan Monnier, 2014/11/01
- [elpa] 279/299: Add test for the %` expander., Stefan Monnier, 2014/11/01
- [elpa] 281/299: Remove defalias docstring arg., Stefan Monnier, 2014/11/01
- [elpa] 278/299: Fix the expansion of %' in TeX-expand-list., Stefan Monnier, 2014/11/01
- [elpa] 286/299: Rename LaTeX-amstext-package-option to LaTeX-amstext-package-options., Stefan Monnier, 2014/11/01
- [elpa] 285/299: Use `push-mark' instead of `set-mark'., Stefan Monnier, 2014/11/01
- [elpa] 284/299: Fix \end buffer position passed to hooks., Stefan Monnier, 2014/11/01
- [elpa] 290/299: Fix LaTeX-newline when comment-auto-fill-only-comments is non-nil., Stefan Monnier, 2014/11/01
- [elpa] 287/299: Docstring fix., Stefan Monnier, 2014/11/01
- [elpa] 276/299: Code cleanup and optimizations., Stefan Monnier, 2014/11/01
- [elpa] 288/299: Avoid duplicate marks in TeX-insert-dollar.,
Stefan Monnier <=
- [elpa] 289/299: Add style for cleverref., Stefan Monnier, 2014/11/01
- [elpa] 295/299: Fix in LaTeX-largest-level-set for XEmacs compatibility., Stefan Monnier, 2014/11/01
- [elpa] 291/299: Build HTML doc with makeinfo if texi2html is not available., Stefan Monnier, 2014/11/01
- [elpa] 296/299: Fix indentation of tabularx environment closing., Stefan Monnier, 2014/11/01
- [elpa] 292/299: Update for upcoming release., Stefan Monnier, 2014/11/01
- [elpa] 298/299: Release_11.88, Stefan Monnier, 2014/11/01
- [elpa] 297/299: Minor fix to previous change., Stefan Monnier, 2014/11/01
- [elpa] 293/299: Use autoconf variables for preview version and date., Stefan Monnier, 2014/11/01
- [elpa] 294/299: Manually adjust preview release version in dtx., Stefan Monnier, 2014/11/01
- [elpa] 282/299: Allow applying style hooks only in a certain context., Stefan Monnier, 2014/11/01