[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion ec557d8949 123/313: shell-command.el is un
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion ec557d8949 123/313: shell-command.el is unnecessary, and has probably been so for years... |
Date: |
Sat, 3 Dec 2022 10:59:23 -0500 (EST) |
branch: elpa/bash-completion
commit ec557d8949b1216d05768f685e7348acd101db11
Author: Stephane Zermatten <stephane@boomer.local>
Commit: Stephane Zermatten <stephane@boomer.local>
shell-command.el is unnecessary, and has probably been so for years...
remove any mention of it. Remove the unnecessary -legacy variant of
bash-completion.
---
bash-completion.el | 88 ++++++++++++------------------------------------------
1 file changed, 19 insertions(+), 69 deletions(-)
diff --git a/bash-completion.el b/bash-completion.el
index 49f65df8eb..b1e22fb2d4 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -23,9 +23,6 @@
;; This file defines dynamic completion hooks for shell-mode and
;; shell-command prompts that are based on bash completion.
;;
-;; You will need shell-command.el to get tab completion in the
-;; minibuffer. See http://www.namazu.org/~tsuchiya/elisp/shell-command.el
-;;
;; Bash completion for emacs:
;; - is aware of bash builtins, aliases and functions
;; - does file expansion inside of colon-separated variables
@@ -52,8 +49,6 @@
;; \"BASH completion hook\")
;; (add-hook 'shell-dynamic-complete-functions
;; 'bash-completion-dynamic-complete)
-;; (add-hook 'shell-command-complete-functions
-;; 'bash-completion-dynamic-complete-legacy)
;;
;; or simpler, but forces you to load this file at startup:
;;
@@ -112,19 +107,8 @@
;;
;; COMPATIBILITY
;;
-;; bash-completion.el is quite sensitive to the OS and BASH version.
-;; This package is known to work on the following environment:
-;; GNU Emacs 22.3.1 (Aquamacs 1.7)
-;; GNU Emacs 22.1.1 (OSX 10.5)
-;; GNU Emacs 22.1.1 (Ubuntu 8.04)
-;; GNU Emacs 23.0.94.1 (Ubuntu 8.10)
-;;
-;; and using the following bash versions:
-;; BASH 3.2.17
-;; BASH 3.2.32
-;; BASH 3.2.39
-;;
-;; bash-completion.el does not works on XEmacs.
+;; bash-completion.el is known to work on Emacs 22 and later under
+;; Linux and OSX. It does not works on XEmacs.
;;
;;; History:
@@ -282,8 +266,7 @@ TOKENS is a list of token as returned by
"Register bash completion for the shell buffer and shell command line.
This function adds `bash-completion-dynamic-complete' to the completion
-function list of shell mode, `shell-dynamic-complete-functions' and to the
-completion function list of shell-command, `shell-command-complete-functions'.
+function list of shell mode, `shell-dynamic-complete-functions'.
This function is convenient, but it might not be the best way of enabling
bash completion in your .emacs file because it forces you to load the module
@@ -293,13 +276,9 @@ before it is needed. For an autoload version, add:
\"BASH completion hook\")
(add-hook 'shell-dynamic-complete-functions
'bash-completion-dynamic-complete)
- (add-hook 'shell-command-complete-functions
- 'bash-completion-dynamic-complete-legacy)
"
(add-hook 'shell-dynamic-complete-functions
- 'bash-completion-dynamic-complete)
- (add-hook 'shell-command-complete-functions
- 'bash-completion-dynamic-complete-legacy))
+ 'bash-completion-dynamic-complete))
;;;###autoload
(defun bash-completion-dynamic-complete ()
@@ -308,55 +287,26 @@ before it is needed. For an autoload version, add:
This function is meant to be added into
`shell-dynamic-complete-functions'. It uses `comint' to figure
out what the current command is and returns a completion table or
-nil if no completions available.
-
-If emacs version is below 24.1 it calls
-`comint-dynamic-simple-complete-legacy' to do the completion instead."
+nil if no completions available."
(if bash-completion-comint-uses-standard-completion
- (bash-completion-dynamic-complete-standard)
- (bash-completion-dynamic-complete-legacy)))
-
-(defun bash-completion-dynamic-complete-legacy ()
- "Returns the completion table for bash command at point.
-
-This function is meant to be added into
-`shell-dynamic-complete-functions' or
-`shell-command-complete-functions'. It uses `comint' to figure
-out what the current command is and calls
-`comint-dynamic-simple-complete' to do the completion instead.
-
-In most cases, you should call `bash-completion-dynamic' instead.
-This is only meant to be used when pre-emacs 24.1 behavior is
-required, such as when added to `shell-command-complete-functions'."
- (let ((result (bash-completion-dynamic-complete-0)))
- (when result
- (let* ((stub (car result))
- (completions (nth 3 result))
- ;; Setting comint-completion-addsuffix overrides
- ;; configuration for comint-dynamic-simple-complete.
- ;; Bash adds a space suffix automatically.
- (comint-completion-addsuffix nil))
- (comint-dynamic-simple-complete stub completions)))))
-
-(defun bash-completion-dynamic-complete-standard ()
- "Returns the completion table for bash command at point.
-
-This function is meant to be added into
-`shell-dynamic-complete-functions' or
-`shell-command-complete-functions'. It uses `comint' to figure
-out what the current command is and returns a completion table or
-nil if no completions available. If emacs version is below 24.1
-is calls `comint-dynamic-simple-complete' to do the completion
-instead."
- (cdr (bash-completion-dynamic-complete-0)))
+ (cdr (bash-completion-dynamic-complete-0))
+ ;; pre-emacs 24.1 compatibility code
+ (let ((result (bash-completion-dynamic-complete-0)))
+ (when result
+ (let* ((stub (car result))
+ (completions (nth 3 result))
+ ;; Setting comint-completion-addsuffix overrides
+ ;; configuration for comint-dynamic-simple-complete.
+ ;; Bash adds a space suffix automatically.
+ (comint-completion-addsuffix nil))
+ (comint-dynamic-simple-complete stub completions))))))
(defun bash-completion-dynamic-complete-0 ()
"Returns completion information for bash command at point.
-This function returns enough information for both
-`bash-completion-dynamic-complete-standard' and
-`bash-completion-dynamic-complete-legacy'. It is not meant to
-be called directly.
+This function returns enough information for both standard and
+legacy modes of `bash-completion-dynamic-complete' It is not
+meant to be called directly.
Returns (list unescaped-stub stub-start pos completions)"
(when bash-completion-enabled
- [nongnu] elpa/bash-completion 7615b1bda5 083/313: changed e-mail address, (continued)
- [nongnu] elpa/bash-completion 7615b1bda5 083/313: changed e-mail address, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion aadb2e20b2 070/313: simplified bash-completion-parse-line, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion ca24f8ada4 073/313: forward last open quote, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion b4fc1a73cb 092/313: removed unnecessary elisp directory, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 3f86d75644 064/313: Trim strange results that are a subset of the current value, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 7f4bcd03a8 110/313: Avoid cluttering .bash_history with commands from, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion c8ddd11ec3 113/313: Fix tests after "Make bash-completion.el work, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion d2745d8923 114/313: Extended history, added a pointer to github, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 6413d662ba 116/313: Rewrote the tests using ert instead of regress., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion d65f7e018d 118/313: Skip integration tests if /bin/bash is not executable., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion ec557d8949 123/313: shell-command.el is unnecessary, and has probably been so for years...,
ELPA Syncer <=
- [nongnu] elpa/bash-completion 318e32979f 135/313: Display completion progress message only if completion takes too long., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 2378b04eeb 140/313: More easily call bash-completion-dynamic-complete-nocomint, faking bash, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 43348d0be1 143/313: Bugfixes: remove references to nonexistent variables, such as, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 583d1dde61 151/313: Remove usage of seq-position with a custom implementation., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 664452aca2 157/313: Merge pull request #22 from kfogel/21-fix-completion-re-21149fdc, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion ad8d72c626 162/313: README nit pick ; ), ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion c494a89070 168/313: Run tests under Emacs 24.1: alias letf to cl-letf., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion f523a290a6 169/313: Make the integration tests run on Emacs 24.1., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion bbff4fa527 172/313: Merge branch 'master' of github.com:szermatt/emacs-bash-completion, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion b307dc24c3 005/313: keep cword, ELPA Syncer, 2022/12/03