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. a83c4d0e69c12eadd642f


From: Mosè Giordano
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. a83c4d0e69c12eadd642f13583444fc89badd9f6
Date: Sat, 02 Apr 2016 13:23:14 +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  a83c4d0e69c12eadd642f13583444fc89badd9f6 (commit)
      from  da88a3eca3107372131aa26930e548c039fe1b51 (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 a83c4d0e69c12eadd642f13583444fc89badd9f6
Author: Mosè Giordano <address@hidden>
Date:   Sat Apr 2 15:21:14 2016 +0200

    Fix compatibility with older Emacs versions
    
    * tex.el: Dynamic determination of `delete-selection' behavior has been
      introduced in Emacs 24.3.  For previous versions leave
      `TeX-insert-dollar' without that property.

diff --git a/tex.el b/tex.el
index 006af7e..7449659 100644
--- a/tex.el
+++ b/tex.el
@@ -6445,7 +6445,18 @@ NAME may be a package, a command, or a document."
 (put 'TeX-newline 'delete-selection t)
 (put 'TeX-insert-quote 'delete-selection t)
 (put 'TeX-insert-backslash 'delete-selection t)
-(put 'TeX-insert-dollar 'delete-selection (lambda () (null TeX-electric-math)))
+;; When `TeX-electric-math' is non-nil, `TeX-insert-dollar' interferes with
+;; `delete-selection-mode', but when it's nil users may want to be able to
+;; delete active region if `delete-selection-mode' is active, see bug#23177.  
We
+;; can dynamically determine the behavior of `delete-selection' with
+;; `TeX-insert-dollar' based on the value of `TeX-electric-math'.  This
+;; dynamicity has been introduced in Emacs 24.3, for previous versions keep
+;; `TeX-insert-dollar' without this property.
+(if (or (> emacs-major-version 24)
+       (and (= emacs-major-version 24)
+            (>= emacs-minor-version 3)))
+    (put 'TeX-insert-dollar 'delete-selection
+        (lambda () (null TeX-electric-math))))
 
 (defun TeX-how-many (regexp &optional rstart rend)
   "Compatibily function for `how-many'.

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

Summary of changes:
 tex.el |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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