[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 7ba3caa 03/12: Remove compatibility code for Ema
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 7ba3caa 03/12: Remove compatibility code for Emacs<24.3 |
Date: |
Sat, 17 Apr 2021 15:13:21 -0400 (EDT) |
branch: externals/auctex
commit 7ba3caa2e199be4d0af96566636e4e0b3b6c8693
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Remove compatibility code for Emacs<24.3
* latex.el (LaTeX-insert-left-brace):
* tex.el (TeX-insert-dollar):
Simplify the property `delete-selection-mode'.
(VirTeX-common-initialization): Use " " for `comment-padding'.
(TeX-math-input-method-off): Never use `inactivate-input-method'.
---
latex.el | 42 ++++++++++++++++++------------------------
tex.el | 21 +++++----------------
2 files changed, 23 insertions(+), 40 deletions(-)
diff --git a/latex.el b/latex.el
index 5311a30..1c3b213 100644
--- a/latex.el
+++ b/latex.el
@@ -2936,30 +2936,24 @@ Normally bound to keys \(, { and [."
;; Cater for `delete-selection-mode' (bug#36385)
;; See the header comment of delsel.el for detail.
(put #'LaTeX-insert-left-brace 'delete-selection
- ;; COMPATIBILITY for Emacs < 24.3
- (if (and (= emacs-major-version 24)
- (< emacs-minor-version 3))
- ;; Emacs < 24.3 doesn't support a function as value of
- ;; `delete-selection' property.
- nil
- (lambda ()
- ;; Consult `delete-selection' property when
- ;; `LaTeX-insert-left-brace' works just the same as
- ;; `self-insert-command'.
- (and (or (not LaTeX-electric-left-right-brace)
- current-prefix-arg)
- (let ((f (get #'self-insert-command 'delete-selection)))
- ;; If `delete-selection' property of
- ;; `self-insert-command' is one of the predefined
- ;; special symbols, just return itself.
- (if (memq f '(yank supersede kill t nil))
- ;; FIXME: if this list of special symbols is
- ;; extended in future delsel.el, this discrimination
- ;; will become wrong.
- f
- ;; Otherwise, call it as a function and return
- ;; its value.
- (funcall f)))))))
+ (lambda ()
+ ;; Consult `delete-selection' property when
+ ;; `LaTeX-insert-left-brace' works just the same as
+ ;; `self-insert-command'.
+ (and (or (not LaTeX-electric-left-right-brace)
+ current-prefix-arg)
+ (let ((f (get #'self-insert-command 'delete-selection)))
+ ;; If `delete-selection' property of
+ ;; `self-insert-command' is one of the predefined
+ ;; special symbols, just return itself.
+ (if (memq f '(yank supersede kill t nil))
+ ;; FIXME: if this list of special symbols is
+ ;; extended in future delsel.el, this discrimination
+ ;; will become wrong.
+ f
+ ;; Otherwise, call it as a function and return
+ ;; its value.
+ (funcall f))))))
(defun LaTeX-insert-corresponding-right-macro-and-brace
(lmacro lbrace &optional optional prompt)
diff --git a/tex.el b/tex.el
index d68dfb4..7a7ba9b 100644
--- a/tex.el
+++ b/tex.el
@@ -3735,9 +3735,7 @@ The algorithm is as follows:
"\\)*\\)\\(%+[ \t]*\\)"))
(set (make-local-variable 'comment-end-skip) "[ \t]*\\(\\s>\\|\n\\)")
(set (make-local-variable 'comment-use-syntax) t)
- ;; `comment-padding' is defined here as an integer for compatibility
- ;; reasons because older Emacsen could not cope with a string.
- (set (make-local-variable 'comment-padding) 1)
+ (set (make-local-variable 'comment-padding) " ")
;; Removed as commenting in (La)TeX is done with one `%' not two
;; (make-local-variable 'comment-add)
;; (setq comment-add 1) ;default to `%%' in comment-region
@@ -5976,11 +5974,7 @@ sign. With optional ARG, insert that many dollar signs."
(texmathp)
(boundp 'current-input-method) current-input-method
(string-match TeX-math-input-method-off-regexp current-input-method)
- ;; inactivate-input-method is obsolete since emacs 24.3.
- (if (fboundp 'deactivate-input-method)
- (deactivate-input-method)
- (with-no-warnings
- (inactivate-input-method)))))
+ (deactivate-input-method)))
;;; Simple Commands
@@ -6626,14 +6620,9 @@ error."
;; `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))))
+;; `TeX-insert-dollar' based on the value of `TeX-electric-math'.
+(put 'TeX-insert-dollar 'delete-selection
+ (lambda () (null TeX-electric-math)))
(defun TeX--list-of-string-p (lst)
"Return non-nil iff `LST' is a list of strings.
- [elpa] externals/auctex updated (83403e9 -> 688349a), Tassilo Horn, 2021/04/17
- [elpa] externals/auctex 65b8b29 02/12: Use #' instead of ' to quote function names, Tassilo Horn, 2021/04/17
- [elpa] externals/auctex 7ba3caa 03/12: Remove compatibility code for Emacs<24.3,
Tassilo Horn <=
- [elpa] externals/auctex b587fdb 04/12: Resolve constant fboundp/boundp/featurep, Tassilo Horn, 2021/04/17
- [elpa] externals/auctex 4046481 01/12: Use closure rather than hand-made lambda, Tassilo Horn, 2021/04/17
- [elpa] externals/auctex 39699a7 05/12: Simplify conditionals evaluating to constant, Tassilo Horn, 2021/04/17
- [elpa] externals/auctex 8cdf102 07/12: ; Fix commit b587fdbeb8 for Emacs 28, Tassilo Horn, 2021/04/17
- [elpa] externals/auctex 5f79e96 08/12: Don't move past % if the current command is a non-indent command, Tassilo Horn, 2021/04/17
- [elpa] externals/auctex 953fcb7 11/12: ; Fix Xreader spelling in docstring., Tassilo Horn, 2021/04/17
- [elpa] externals/auctex 688349a 12/12: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2021/04/17
- [elpa] externals/auctex 61f508d 06/12: ; Fix doc string, Tassilo Horn, 2021/04/17
- [elpa] externals/auctex a0b62cb 09/12: ; Fix formulation in comment, Tassilo Horn, 2021/04/17
- [elpa] externals/auctex fffc8fc 10/12: Rename TeX-xreader-sync-view to TeX-reader-sync-view (bug#47807), Tassilo Horn, 2021/04/17