auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 45ffe1f260ca71cd474c9


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 45ffe1f260ca71cd474c90bace312a57d7aedfee
Date: Fri, 03 Oct 2014 18:39:37 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  45ffe1f260ca71cd474c90bace312a57d7aedfee (commit)
      from  babe2242f594cef1d3a5c7fd9e01191ba8875361 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
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>

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)))

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog |    7 +++++++
 tex.el    |   14 ++++++--------
 2 files changed, 13 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

[Prev in Thread] Current Thread [Next in Thread]