[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa a83c4d0 02/51: Fix compatibility with older Emacs versions
From: |
Tassilo Horn |
Subject: |
[elpa] elpa a83c4d0 02/51: Fix compatibility with older Emacs versions |
Date: |
Sun, 22 May 2016 07:22:47 +0000 (UTC) |
branch: elpa
commit a83c4d0e69c12eadd642f13583444fc89badd9f6
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>
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.
---
tex.el | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
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'.
- [elpa] elpa b20cd68 16/51: Fix a documentation type., (continued)
- [elpa] elpa b20cd68 16/51: Fix a documentation type., Tassilo Horn, 2016/05/22
- [elpa] elpa 71349ec 23/51: Use `deactivate-input-method' if defined, Tassilo Horn, 2016/05/22
- [elpa] elpa d4d2ab5 31/51: Enable directory local variables in japanese-{latex, plain-tex}-mode, Tassilo Horn, 2016/05/22
- [elpa] elpa 63a83c3 30/51: Make unloading of tex-site work on Emacs 24, Tassilo Horn, 2016/05/22
- [elpa] elpa 5886c49 41/51: Improve the insertation of "macro" environment, Tassilo Horn, 2016/05/22
- [elpa] elpa e19f8bd 37/51: Do not check TeX engine with ifluatex package, Tassilo Horn, 2016/05/22
- [elpa] elpa 79a8643 47/51: Respect both "xcolor" and "color" for command queries, Tassilo Horn, 2016/05/22
- [elpa] elpa ccfe316 42/51: Make TeX-view work better with regions, Tassilo Horn, 2016/05/22
- [elpa] elpa d418e9a 15/51: Prevent infinite loop in TeX-command-expand, Tassilo Horn, 2016/05/22
- [elpa] elpa 4f9666b 24/51: Use customize option `TeX-region' instead of "_region_", Tassilo Horn, 2016/05/22
- [elpa] elpa a83c4d0 02/51: Fix compatibility with older Emacs versions,
Tassilo Horn <=
- [elpa] elpa 13153ba 40/51: Use commit date for package date also in configure, Tassilo Horn, 2016/05/22
- [elpa] elpa 7fc63f1 39/51: Tweak mode name only when file local variable is enabled., Tassilo Horn, 2016/05/22
- [elpa] elpa 7e3bec8 44/51: Run `TeX-add-symbols' if "xcolor" is not an active style, Tassilo Horn, 2016/05/22
- [elpa] elpa f0849b4 10/51: TikZ: Add the 'sin' and 'cos' connectors., Tassilo Horn, 2016/05/22
- [elpa] elpa 7ea1aa3 18/51: TikZ: Don't allow relative points with \coordinate., Tassilo Horn, 2016/05/22
- [elpa] elpa c032063 19/51: Auto save `TeX-command-extra-options'., Tassilo Horn, 2016/05/22
- [elpa] elpa 56c1afd 28/51: Call TeX-newline-function interactively, Tassilo Horn, 2016/05/22
- [elpa] elpa eb9986d 46/51: Respect both "xcolor" and "color" for query to "shadecolor", Tassilo Horn, 2016/05/22
- [elpa] elpa 40c2c26 32/51: Allow for negative offsets in region backward search, Tassilo Horn, 2016/05/22
- [elpa] elpa 9613bdd 36/51: Check TeX engine only once, Tassilo Horn, 2016/05/22