[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion 9b94818f88 167/313: Remove support for pre
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion 9b94818f88 167/313: Remove support for pre-Emacs24.1 backward compatibility. |
Date: |
Sat, 3 Dec 2022 10:59:27 -0500 (EST) |
branch: elpa/bash-completion
commit 9b94818f88f61c5db8450a3fdf64b07b8df6e74d
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>
Remove support for pre-Emacs24.1 backward compatibility.
---
bash-completion.el | 26 +-------
test/bash-completion-integration-test.el | 12 +---
test/bash-completion-test.el | 4 +-
test/pre24.el | 105 -------------------------------
4 files changed, 7 insertions(+), 140 deletions(-)
diff --git a/bash-completion.el b/bash-completion.el
index e9fc9071fe..ea14410d2f 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -236,13 +236,6 @@ function returns status code 124, meaning that the
completion
should be retried. This should be a string that's unlikely
to be included into a completion output.")
-(defconst bash-completion-comint-uses-standard-completion
- (or (and (= emacs-major-version 24) (>= emacs-minor-version 1))
- (>= emacs-major-version 25))
- "In emacs 24.1, comint and derived modes started to use
-standard completion facilities. Completion functions will change
-their behaviour according to this constant.")
-
(eval-when-compile
(unless (or (and (= emacs-major-version 24) (>= emacs-minor-version 1))
(>= emacs-major-version 25))
@@ -317,22 +310,9 @@ When doing completion outside of a comint buffer, call
bash-completion-message-delay nil
(lambda () (message "Bash completion..."))))))
(unwind-protect
- (let ((result (bash-completion-dynamic-complete-nocomint
- (comint-line-beginning-position)
- (point))))
- (if bash-completion-comint-uses-standard-completion
- result
- ;; pre-emacs 24.1 compatibility code
- (let ((stub (buffer-substring-no-properties
- (nth 0 result)
- (nth 1 result)))
- (completions (nth 2 result))
- ;; Setting comint-completion-addsuffix overrides
- ;; configuration for comint-dynamic-simple-complete.
- ;; Bash adds a space suffix automatically.
- (comint-completion-addsuffix nil))
- (with-no-warnings
- (comint-dynamic-simple-complete stub completions)))))
+ (bash-completion-dynamic-complete-nocomint
+ (comint-line-beginning-position)
+ (point))
;; cleanup
(if message-timer
(cancel-timer message-timer)))))
diff --git a/test/bash-completion-integration-test.el
b/test/bash-completion-integration-test.el
index 98b2b6c2cc..55198dea58 100644
--- a/test/bash-completion-integration-test.el
+++ b/test/bash-completion-integration-test.el
@@ -31,11 +31,7 @@
;;; Code:
(require 'bash-completion)
(require 'dired)
-
-(if (>= emacs-major-version 24)
- (require 'ert)
- (require 'pre24)
- (require 'dired))
+(require 'ert)
(defmacro bash-completion_test-harness (&rest body)
`(progn
@@ -73,10 +69,8 @@
;; do a completion and return the result
(with-current-buffer shell-buffer
(insert ,complete-me)
- (if bash-completion-comint-uses-standard-completion
- (let ((comint-dynamic-complete-functions
'(bash-completion-dynamic-complete)))
- (completion-at-point))
- (bash-completion-dynamic-complete))
+ (let ((comint-dynamic-complete-functions
'(bash-completion-dynamic-complete)))
+ (completion-at-point))
(buffer-substring-no-properties
(comint-line-beginning-position) (point))))
;; finally
diff --git a/test/bash-completion-test.el b/test/bash-completion-test.el
index 5c112affa7..375ac635ff 100644
--- a/test/bash-completion-test.el
+++ b/test/bash-completion-test.el
@@ -31,9 +31,7 @@
;;; Code:
(require 'bash-completion)
(require 'cl)
-(if (>= emacs-major-version 24)
- (require 'ert)
- (require 'pre24))
+(require 'ert)
(defmacro bash-completion-test-with-buffer (content &rest body)
"Create a temporary buffer with CONTENT and execute BODY.
diff --git a/test/pre24.el b/test/pre24.el
deleted file mode 100644
index 240d711967..0000000000
--- a/test/pre24.el
+++ /dev/null
@@ -1,105 +0,0 @@
-;;; pre24.el --- run bash-completion tests under Emacs 22 and 23
-
-;; Copyright (C) 2017 Stephane Zermatten
-
-;; Author: Stephane Zermatten <szermatt@gmx.net>
-
-;; This program is free software: you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2 of the
-;; License, or (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see
-;; `http://www.gnu.org/licenses/'.
-
-
-;;; Commentary:
-;;
-;; This file defines just enough macros and functions to run the
-;; bash-completion tests on Emacs 22 and 23 from the command line, using
-;; run_tests.sh.
-;;
-;; When this is used, the tests are run immediately, as they are
-;; defined. This file isn't meant to be used from an interactive emacs
-;; session.
-;;
-
-;;; Code:
-(require 'cl)
-(require 'dired)
-
-(if (>= emacs-major-version 24)
- (error "Don't use pre24.el with Emacs 24 or later."))
-
-(defvar pre24-error-count 0
- "Number of errors encountered by `ert-deftest'.
-
-`ert-run-tests-batch-and-exit' relies on this to exit with the
-appropriate return code.")
-
-(defmacro ert-deftest (name args &rest body)
- "Run a test and reports the result."
- `(let ((pre24-test (symbol-name (quote ,name))))
- (princ (format "%s..." pre24-test))
- (princ (catch 'pre24-return (prog1 "OK" (progn ,@body))))
- (princ "\n")))
-
-(defmacro should (&rest body)
- "Fail the containing `ert-deftest' unless BODY is t."
- `(unless (progn ,@body)
- (setq pre24-error-count (1+ pre24-error-count))
- (throw 'pre24-return
- (format "FAILED\n (should %s)\n\n"
- (quote ,@body)))))
-
-(defmacro should-not (&rest body)
- "Fail the containing `ert-deftest' unless BODY is not t."
- `(when (progn ,@body)
- (error "Test failed")))
-
-(defun skip-unless (condition)
- "Skip the test if CONDITION doesn't hold."
- (unless condition (throw 'pre24-return "SKIP")))
-
-(defmacro cl-letf (definitions &rest body)
- "Backward-compatibility adapter for cl-letf.
-
-This macro only supports redefining symbol functions."
- `(flet ,(mapcar
- (lambda (def)
- ;; ((symbol-function ',name) (lambda ,args ,func-body))
- (let ((lhs (car def)) (rhs (cadr def)))
- (unless (and (eq 'symbol-function (car lhs))
- (eq 'quote (car (nth 1 lhs)))
- (eq 'lambda (car rhs)))
- "Unsupported pattern")
- (cons (cadr (cadr (car def))) ; name
- (cons
- (car (cdr (cadr def))) ; args
- (cdr (cdr (cadr def))) ; func-body
- ))))
- definitions)
- ,@body))
-
-
-(defun ert-run-tests-batch-and-exit ()
- "Exit tests.
-
-Exit status is 1 if at least on test run with `ert-deftest'
-failed."
- (if (> pre24-error-count 0)
- (progn
- (princ "FAIL")
- (kill-emacs 1)))
- (progn
- (princ "PASS\n")
- (kill-emacs 0)))
-
-(provide 'pre24)
-;;; pre24.el ends here
- [nongnu] elpa/bash-completion 319886faa9 138/313: Add / after directory names - even if they contain spaces or special, (continued)
- [nongnu] elpa/bash-completion 319886faa9 138/313: Add / after directory names - even if they contain spaces or special, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion f2ea2b65df 141/313: Detect directories when expanding commands and add a slash instead of a, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 44bc73449e 144/313: Fixes strange behavior when completing --., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion b4757884b0 145/313: Expand the tests to better cover wordbreak and command argument, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 6ab1fe406b 148/313: Always quote the stub before passing it to compgen., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion a789093cd3 155/313: Run tests on older versions of Emacs., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 5e05365dc8 153/313: Cleanup tests, split them into unit and integration tests., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 09c93ffbdb 165/313: Explicitly disable support for Emacs version older than 24.1., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 62c6567af6 158/313: Complete argument rename, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 5eb85cf1fc 166/313: Remove obsolete functions bash-completion-dynamic-complete-0 and, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 9b94818f88 167/313: Remove support for pre-Emacs24.1 backward compatibility.,
ELPA Syncer <=
- [nongnu] elpa/bash-completion 912e1e8153 170/313: Add an option to disable default Readline completion when no matches are found (#29), ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 959e27dae3 171/313: Add remote shell support, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 68f7d937b7 175/313: Make wordbreak completion work with bash-completion-enable-caching., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 2cf76221c2 178/313: Rely on compgen for default completion, instead of doing it with, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion f01d8726de 179/313: Remove support filenames options., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 5171866b65 180/313: Simplify options a bit, since the only useful option is nospace., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion a223260f2d 181/313: Get rid of bash-completion-alist completely., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 4f13e00702 183/313: Execute wordbreak completion "properly", as part of the normal, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 34221c1fdd 185/313: Make bash-completion-enable-caching the default, remove the, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 8c3995aa98 187/313: run_tests.sh displays the bash command to test against., ELPA Syncer, 2022/12/03