[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 239db5d5162: Revert commits dafa6d6badd6 and 72c45fa9109a
From: |
Jim Porter |
Subject: |
master 239db5d5162: Revert commits dafa6d6badd6 and 72c45fa9109a |
Date: |
Tue, 10 Oct 2023 16:07:48 -0400 (EDT) |
branch: master
commit 239db5d5162f6f9a4a6735e176c8d306f18e50e7
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>
Revert commits dafa6d6badd6 and 72c45fa9109a
These were there to work around deficiencies in how Eshell produces
completions for 'pcomplete-argument' (Eshell passed various non-string
objects to Pcomplete, which broke things). Now, Eshell always returns
a stringified form of the argument, with the original value stored via
the text property 'pcomplete-arg-value'.
* lisp/pcomplete.el (pcomplete-arg): Revert changes back to a simpler
form.
---
lisp/pcomplete.el | 36 +++++++-----------------------------
1 file changed, 7 insertions(+), 29 deletions(-)
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index 0457f1b00c0..3dde001328d 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -685,35 +685,13 @@ parts of the list.
The OFFSET argument is added to/taken away from the index that will be
used. This is really only useful with `first' and `last', for
-accessing absolute argument positions.
-
-When the argument has been transformed into something that is not
-a string by `pcomplete-parse-arguments-function', the text
-representation of the argument, namely what the user actually
-typed in, is returned, and the value of the argument is stored in
-the pcomplete-arg-value text property of that string."
- (let ((arg
- (nth (+ (pcase index
- ('first 0)
- ('last pcomplete-last)
- (_ (- pcomplete-index (or index 0))))
- (or offset 0))
- pcomplete-args)))
- (if (or (stringp arg)
- ;; FIXME: 'last' is handled specially in Emacs 29, because
- ;; 'pcomplete-parse-arguments' accepts a list of strings
- ;; (which are completion candidates) as return value for
- ;; (pcomplete-arg 'last). See below: "it means it's a
- ;; list of completions computed during parsing,
- ;; e.g. Eshell uses that to turn globs into lists of
- ;; completions". This special case will be dealt with
- ;; differently in Emacs 30: the pcomplete-arg-value
- ;; property will be used by 'pcomplete-parse-arguments'.
- (eq index 'last))
- arg
- (propertize
- (car (split-string (pcomplete-actual-arg index offset)))
- 'pcomplete-arg-value arg))))
+accessing absolute argument positions."
+ (nth (+ (pcase index
+ ('first 0)
+ ('last pcomplete-last)
+ (_ (- pcomplete-index (or index 0))))
+ (or offset 0))
+ pcomplete-args))
(defun pcomplete-begin (&optional index offset)
"Return the beginning position of the INDEXth argument.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 239db5d5162: Revert commits dafa6d6badd6 and 72c45fa9109a,
Jim Porter <=