[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion 0c77c64b50 174/313: Disable bash-completio
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion 0c77c64b50 174/313: Disable bash-completion-enable-caching if completion-table-with-cache |
Date: |
Sat, 3 Dec 2022 10:59:28 -0500 (EST) |
branch: elpa/bash-completion
commit 0c77c64b50f5241630d42a0e4b90fa0d7fccdd3e
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>
Disable bash-completion-enable-caching if completion-table-with-cache
is unavailable, such as on Emacs 24.1.
Fallback to completion-table-dynamic in that case, to allow
byte-compilation to work without errors.
---
bash-completion.el | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/bash-completion.el b/bash-completion.el
index b3ee3ff259..a742d5ab18 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -202,8 +202,9 @@ to remove the extra space bash adds after a completion."
:type 'boolean
:group 'bash-completion)
-(defcustom bash-completion-enable-caching nil
- "If non-nil, enable caching in `bash-completion-dynamic-complete-nocomint'.
+(if (fboundp 'completion-table-with-cache)
+ (defcustom bash-completion-enable-caching nil
+ "If non-nil, enable caching in
`bash-completion-dynamic-complete-nocomint'.
When caching is enabled,
`bash-completion-dynamic-complete-nocomint' returns a function
@@ -212,8 +213,13 @@ improves performance because less calls will be made to
`bash-completion-comm' which is an expensive function but it has
one downside: wordbreak completion will not be attempted when a
compspec returns no matches."
- :type 'boolean
- :group 'bash-completion)
+ :type 'boolean
+ :group 'bash-completion)
+ (defconst bash-completion-enable-caching nil))
+
+(defalias 'bash-completion--completion-table-with-cache
+ (if (fboundp 'completion-table-with-cache)
+ 'completion-table-with-cache 'completion-table-dynamic))
(defvar bash-completion-start-files
'("~/.emacs_bash.sh" "~/.emacs.d/init_bash.sh")
@@ -370,7 +376,7 @@ Returns (list stub-start stub-end completions) with
(list
stub-start
comp-pos
- (completion-table-with-cache
+ (bash-completion--completion-table-with-cache
(lambda (_)
(bash-completion-comm line point words cword open-quote
unparsed-stub))))
- [nongnu] elpa/bash-completion 0af9a70ff9 130/313: Merge pull request #16 from tarsius/master, (continued)
- [nongnu] elpa/bash-completion 0af9a70ff9 130/313: Merge pull request #16 from tarsius/master, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion d673bf1ed0 132/313: Merge pull request #17 from svend/bash-flags, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 1659c7ca38 126/313: Quoting fix: fix parentheses in a file name, improve double quoting within, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 432c2d15c9 142/313: Add a space after the completion candidate for single completion., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 0f3f8c22b4 146/313: Add a space after a single custom completion., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion eacb8061e3 147/313: Fallback to filename completion when custom completion didn't find, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 081d03bedc 156/313: Fix issue #21 completion bug, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 1c2153d287 159/313: Call make-obsolete with three arguments, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 7965b914da 160/313: Re-enable directory expansion for custom completion. fixes #23, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 2c0b8d6a6e 163/313: Merge pull request #27 from vorburger/patch-1, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 0c77c64b50 174/313: Disable bash-completion-enable-caching if completion-table-with-cache,
ELPA Syncer <=
- [nongnu] elpa/bash-completion b281e1e181 008/313: bash-complete-add-to-alist, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 1144ae69a9 056/313: documented the tokenizer, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 376dd532e2 057/313: modre documentation, up until wordbreak, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion fd7e0e6fbe 078/313: added documentation, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion dd34b278bf 069/313: stopping at point; the easy way, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 8756e80737 184/313: Replace 'options' in the completion struct with 'nospace'., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 2c4cb6edd2 186/313: Replace bash-completion-integration-test with a higher-level test for, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 0aed19067b 188/313: When using Bash 4, split words as Bash 4 does., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 4581a7823f 189/313: Bash 4: set COMP_TYPE and COMP_KEY to TAB, to let completion functions, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 802eb4e5a8 194/313: Set EMACS_BASH_COMPLETE even on remote (tramp) completion., ELPA Syncer, 2022/12/03