[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex c39fe6d1d6 13/77: Delete compatibility code
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex c39fe6d1d6 13/77: Delete compatibility code |
Date: |
Fri, 26 Aug 2022 16:06:32 -0400 (EDT) |
branch: externals/auctex
commit c39fe6d1d6295943252fc068a53d488f14f74767
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Delete compatibility code
* tex.el (TeX-completing-read-multiple): Remove compatibility code
for Emacs <= 24.3.
---
tex.el | 78 ++++++++++++++++++++++++++++--------------------------------------
1 file changed, 33 insertions(+), 45 deletions(-)
diff --git a/tex.el b/tex.el
index 1d091e1d73..8a80f13fbb 100644
--- a/tex.el
+++ b/tex.el
@@ -767,53 +767,41 @@ overlays between two existing ones.")
;; which results in a void-variable error if crm hasn't been loaded before.
(require 'crm)
-(if (or (and (= emacs-major-version 24) (>= emacs-minor-version 4))
- (>= emacs-major-version 25))
- ;; For GNU Emacs 24.4 or later, based on `completing-read-multiple' of
- ;; git commit b14abca9476cba2f500b5eda89441d593dd0f12b
- ;; 2013-01-10 * lisp/emacs-lisp/crm.el: Allow any regexp for separators.
- (defun TeX-completing-read-multiple
- (prompt table &optional predicate require-match initial-input
- hist def inherit-input-method)
- "Like `completing-read-multiple' which see.
+;; For GNU Emacs 24.4 or later, based on `completing-read-multiple' of
+;; git commit b14abca9476cba2f500b5eda89441d593dd0f12b
+;; 2013-01-10 * lisp/emacs-lisp/crm.el: Allow any regexp for separators.
+(defun TeX-completing-read-multiple
+ (prompt table &optional predicate require-match initial-input
+ hist def inherit-input-method)
+ "Like `completing-read-multiple' which see.
Retain zero-length substrings but ensure that empty input results
in nil across different emacs versions."
- (unwind-protect
- (progn
- (add-hook 'choose-completion-string-functions
- #'crm--choose-completion-string)
- (let* ((minibuffer-completion-table #'crm--collection-fn)
- (minibuffer-completion-predicate predicate)
- ;; see completing_read in src/minibuf.c
- (minibuffer-completion-confirm
- (unless (eq require-match t) require-match))
- (crm-completion-table table)
- (map (if require-match
- crm-local-must-match-map
- crm-local-completion-map))
- ;; If the user enters empty input, `read-from-minibuffer'
- ;; returns the empty string, not DEF.
- (input (read-from-minibuffer
- prompt initial-input map
- nil hist def inherit-input-method))
- result)
- (and def (string-equal input "") (setq input def))
- (if (equal (setq result (split-string input crm-separator))
- '(""))
- nil
- result)))
- (remove-hook 'choose-completion-string-functions
- #'crm--choose-completion-string)))
- ;; For GNU Emacs <= 24.3.
- (defun TeX-completing-read-multiple
- (prompt table &optional predicate require-match initial-input
- hist def inherit-input-method)
- "Like `completing-read-multiple' which see.
-Ensures that empty input results in nil across different emacs versions."
- (let ((result (completing-read-multiple prompt table predicate
- require-match initial-input
- hist def inherit-input-method)))
- (if (equal result '("")) nil result))))
+ (unwind-protect
+ (progn
+ (add-hook 'choose-completion-string-functions
+ #'crm--choose-completion-string)
+ (let* ((minibuffer-completion-table #'crm--collection-fn)
+ (minibuffer-completion-predicate predicate)
+ ;; see completing_read in src/minibuf.c
+ (minibuffer-completion-confirm
+ (unless (eq require-match t) require-match))
+ (crm-completion-table table)
+ (map (if require-match
+ crm-local-must-match-map
+ crm-local-completion-map))
+ ;; If the user enters empty input, `read-from-minibuffer'
+ ;; returns the empty string, not DEF.
+ (input (read-from-minibuffer
+ prompt initial-input map
+ nil hist def inherit-input-method))
+ result)
+ (and def (string-equal input "") (setq input def))
+ (if (equal (setq result (split-string input crm-separator))
+ '(""))
+ nil
+ result)))
+ (remove-hook 'choose-completion-string-functions
+ #'crm--choose-completion-string)))
(defun TeX-read-string (prompt &optional initial-input history default-value)
(read-string prompt initial-input history default-value t))
- [elpa] externals/auctex d44f83de8b 37/77: Add three new styles, (continued)
- [elpa] externals/auctex d44f83de8b 37/77: Add three new styles, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 0f59225c0f 70/77: ; * doc/todo.texi (Mid-term Goals): Fix typo., Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 2d28bd1630 67/77: Avoid `makeinfo` warnings, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex edabf207b4 65/77: Insert a space between \caption and \\ in tables, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex edb15b8f26 43/77: Follow up the previous commit, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 728db25bf7 69/77: Update documentation, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 33a01b6928 59/77: Extend test for filling, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 5c5aa78de0 71/77: Fix doc string, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex cb0a1e6be1 72/77: Improve function calls to retrieve key=vals in style hooks, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 010a1e24be 01/77: Follow up the previous commit, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex c39fe6d1d6 13/77: Delete compatibility code,
Tassilo Horn <=
- [elpa] externals/auctex ecf8b28cda 14/77: Add new style/multibib.el, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 37e5a450a3 20/77: Complete LaTeX lengths and counters, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 9ca155cdb0 25/77: Improve fontification of kernel macros, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex d47a6e8716 29/77: Support complex \input path (bug#55511), Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 6fe2f21e96 31/77: ; Fix warnings about single quotes in docstrings, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 4770d57dba 38/77: Support different number of arguments for \hyperref, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex daaff30b4a 36/77: Follow elisp quoting convention, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 192f201f96 49/77: Add new style/microtype.el, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex cc70633aa6 51/77: ; * preview.el.in (preview-reference-face): Fix warning., Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 812368af6a 62/77: Update documentation about C-M-a and C-M-e, Tassilo Horn, 2022/08/26