branch: externals/auctex commit b4ff3764a185eb3a5cd229b2d95687b3c470b033 Merge: c6d3152 45ffe1f Author: Tassilo Horn <t...@gnu.org> Commit: Tassilo Horn <t...@gnu.org>
Merge branch 'master' into simplify-TeX-parse-error --- 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 <ik...@ikumi.que.jp> + * 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 <ik...@ikumi.que.jp> + * 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)))