emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex 3cd3e72 08/28: Restore Emacs 22 compatibility


From: Tassilo Horn
Subject: [elpa] externals/auctex 3cd3e72 08/28: Restore Emacs 22 compatibility
Date: Fri, 07 Aug 2015 15:59:18 +0000

branch: externals/auctex
commit 3cd3e72e4c513bdcfacfcf2c2b51ff79e0a222e6
Author: Ikumi Keita <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Restore Emacs 22 compatibility
    
    * tex.el (featurep): Restore compatibility with emacs versions
    which don't have `activate-mark' (Emacs <= 22).
    
    Signed-off-by: Tassilo Horn <address@hidden>
---
 ChangeLog |    5 +++++
 tex.el    |   14 +++++++++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4a0d590..d2e1a09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-05  Ikumi Keita  <address@hidden>
+
+       * tex.el (featurep): Restore compatibility with emacs versions
+       which don't have `activate-mark' (Emacs <= 22).
+
 2015-06-02  Arash Esbati  <address@hidden>
 
        * latex.el (LaTeX-auto-cleanup): Prepare so that an optional
diff --git a/tex.el b/tex.el
index ae4bb3d..24f0d6d 100644
--- a/tex.el
+++ b/tex.el
@@ -763,7 +763,19 @@ If POS is nil, use current buffer location."
 
   (defun TeX-activate-region ()
     (setq deactivate-mark nil)
-    (activate-mark))
+    (if (fboundp 'activate-mark)
+       (activate-mark)
+      ;; COMPATIBILITY for Emacs <= 22
+      ;; This part is adopted from `activate-mark' of Emacs 24.5.
+      (when (mark t)
+       (unless (and transient-mark-mode mark-active
+                (mark))
+         (force-mode-line-update) ;Refresh toolbar (bug#16382).
+         (setq mark-active t)
+         (unless transient-mark-mode
+           (setq transient-mark-mode 'lambda))
+         (if (boundp 'activate-mark-hook)
+             (run-hooks 'activate-mark-hook))))))
 
   (defun TeX-overlay-prioritize (start end)
     "Calculate a priority for an overlay extending from START to END.



reply via email to

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