emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Towards a cleaner build: pcomplete


From: Lars Ingebrigtsen
Subject: Re: Towards a cleaner build: pcomplete
Date: Mon, 17 Jun 2019 14:08:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> This one I'm not sure what the status is with: It's an obsolete
>> variable, but it seems unsure how it should be replaced here,
>
> Right, it should be replaced by obsoleting the `pcomplete` command (not
> the package).
>
>> In pcomplete/tar:
>> pcmpl-gnu.el:162:47:Warning: `pcomplete-suffix-list' is an obsolete variable
>>     (as of 24.1).
>>
>> I'm not sure whether suppressing this warning is the right thing,
>> either...
>
> Agreed.

Actually, looking at the code further, I don't quite understand this one
at all...  These functions are the ones that are called when you hit TAB
in M-x shell buffers (and the like)?  So "tar --v<TAB>" will complete
over the completions like "--verbose"?

And I guess pcomplete is one of these functions that can be used here,
but it's not used by default; right.

But the only place where pcomplete-suffix-alist is actually used for
anything is in pcomplete-insert-entry, and this is the call trace for
that:

Debugger entered: nil
  pcomplete-insert-entry(#("--rsh-comma" 0 11 (fontified t face
  (and result (not (eq (car result) 'listed)) (cdr result) (pco
  (let* ((pcomplete-stub) pcomplete-seen pcomplete-norm-func pc
  (catch 'pcompleted (let* ((pcomplete-stub) pcomplete-seen pco
  (if (and interactively pcomplete-cycle-completions pcomplete-
  pcomplete(1)
  funcall-interactively(pcomplete 1)
  call-interactively(pcomplete record nil)
  command-execute(pcomplete record)
  execute-extended-command(nil "pcomplete" nil)
  funcall-interactively(execute-extended-command nil "pcomplete" nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

And, as we can see, that function is not called from pcomplete/tar, so
the binding of pcomplete-insert-entry in pcomplete/tar doesn't seem like
it could possibly affect anything?

Am I misreading the code?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

[Prev in Thread] Current Thread [Next in Thread]