[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/gnus-select 03e7331 089/218: * lisp/pcomplete.el (
From: |
Andrew G Cohen |
Subject: |
[Emacs-diffs] feature/gnus-select 03e7331 089/218: * lisp/pcomplete.el (pcomplete-here): Move before first reference. |
Date: |
Fri, 14 Dec 2018 03:35:07 -0500 (EST) |
branch: feature/gnus-select
commit 03e7331c59038ecb388d90e419d502e44342fd07
Author: Glenn Morris <address@hidden>
Commit: Andrew G Cohen <address@hidden>
* lisp/pcomplete.el (pcomplete-here): Move before first reference.
---
lisp/pcomplete.el | 66 +++++++++++++++++++++++++++----------------------------
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index e7d12c6..6bdea68 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -272,6 +272,39 @@ to all arguments, such as variable names after a $."
"Complete amongst a list of directories and executables."
(pcomplete-entries regexp 'file-executable-p))
+(defmacro pcomplete-here (&optional form stub paring form-only)
+ "Complete against the current argument, if at the end.
+If completion is to be done here, evaluate FORM to generate the completion
+table which will be used for completion purposes. If STUB is a
+string, use it as the completion stub instead of the default (which is
+the entire text of the current argument).
+
+For an example of when you might want to use STUB: if the current
+argument text is `long-path-name/', you don't want the completions
+list display to be cluttered by `long-path-name/' appearing at the
+beginning of every alternative. Not only does this make things less
+intelligible, but it is also inefficient. Yet, if the completion list
+does not begin with this string for every entry, the current argument
+won't complete correctly.
+
+The solution is to specify a relative stub. It allows you to
+substitute a different argument from the current argument, almost
+always for the sake of efficiency.
+
+If PARING is nil, this argument will be pared against previous
+arguments using the function `file-truename' to normalize them.
+PARING may be a function, in which case that function is used for
+normalization. If PARING is t, the argument dealt with by this
+call will not participate in argument paring. If it is the
+integer 0, all previous arguments that have been seen will be
+cleared.
+
+If FORM-ONLY is non-nil, only the result of FORM will be used to
+generate the completions list. This means that the hook
+`pcomplete-try-first-hook' will not be run."
+ (declare (debug t))
+ `(pcomplete--here (lambda () ,form) ,stub ,paring ,form-only))
+
(defcustom pcomplete-command-completion-function
(function
(lambda ()
@@ -1014,39 +1047,6 @@ See the documentation for `pcomplete-here'."
;; byte-compiled with the older code.
(eval form)))))
-(defmacro pcomplete-here (&optional form stub paring form-only)
- "Complete against the current argument, if at the end.
-If completion is to be done here, evaluate FORM to generate the completion
-table which will be used for completion purposes. If STUB is a
-string, use it as the completion stub instead of the default (which is
-the entire text of the current argument).
-
-For an example of when you might want to use STUB: if the current
-argument text is `long-path-name/', you don't want the completions
-list display to be cluttered by `long-path-name/' appearing at the
-beginning of every alternative. Not only does this make things less
-intelligible, but it is also inefficient. Yet, if the completion list
-does not begin with this string for every entry, the current argument
-won't complete correctly.
-
-The solution is to specify a relative stub. It allows you to
-substitute a different argument from the current argument, almost
-always for the sake of efficiency.
-
-If PARING is nil, this argument will be pared against previous
-arguments using the function `file-truename' to normalize them.
-PARING may be a function, in which case that function is used for
-normalization. If PARING is t, the argument dealt with by this
-call will not participate in argument paring. If it is the
-integer 0, all previous arguments that have been seen will be
-cleared.
-
-If FORM-ONLY is non-nil, only the result of FORM will be used to
-generate the completions list. This means that the hook
-`pcomplete-try-first-hook' will not be run."
- (declare (debug t))
- `(pcomplete--here (lambda () ,form) ,stub ,paring ,form-only))
-
(defmacro pcomplete-here* (&optional form stub form-only)
"An alternate form which does not participate in argument paring."
- [Emacs-diffs] feature/gnus-select 590166c 151/218: Firm up documentation of generalized variables, (continued)
- [Emacs-diffs] feature/gnus-select 590166c 151/218: Firm up documentation of generalized variables, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select a3e7de9 086/218: Fix mouse-set-point when line numbers are displayed, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 57200d8 084/218: Replace "carriage-return" by "carriage return" in manuals, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 620b63a 092/218: * lisp/progmodes/verilog-mode.el (verilog-mode): Quieten compilation., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 3ef9943 067/218: * lisp/obsolete/options.el: Remove file., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 2544299 076/218: Try to stop tramp test hangs on hydra, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 520498d 091/218: Improve port to NetBSD tzalloc, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 02b297b 044/218: ; Revert "; Tracing for eieio-test random failure (Bug#24503)", Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select a381e7e 002/218: Define if-let* and derivatives as aliases for if-let etc, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select a8e5163 070/218: Minor changes in mule.texi, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 03e7331 089/218: * lisp/pcomplete.el (pcomplete-here): Move before first reference.,
Andrew G Cohen <=
- [Emacs-diffs] feature/gnus-select 040f725 093/218: * lisp/emulation/cua-base.el (cua-paste): Quieten compilation., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select f5219ae 094/218: Replace some obsolete uses of filter-buffer-substring-functions, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 25950c1 095/218: Suppress warnings about obsolete generics (bug#25556), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 965f4ec 100/218: * lisp/gnus/gnus-registry.el: Add missing compile-time requirement., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select e2aebb9 090/218: * test/lisp/ses-tests.el: Quieten compilation., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select c52e2e2 099/218: Fix 'posn-at-point' when line numbers are displayed, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select e907e4a 102/218: Improve word motion docs (Bug#30815), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 08b32c9 105/218: Print test timings unconditionally, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 58da563 110/218: * lisp/url/url-handlers.el: Require subr-x., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 513b7fc 111/218: Fix compilation warnings in subr-x-tests.el, Andrew G Cohen, 2018/12/14