bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#50470: 27.1; 'company-mode' 'eshell'


From: Stefan Monnier
Subject: bug#50470: 27.1; 'company-mode' 'eshell'
Date: Sun, 19 Mar 2023 21:34:52 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

>> Ok, here we are.
>>> -  (when (memq (char-after) eshell-glob-chars-list)
>>> +  (when (and (not (bound-and-true-p eshell-parse-for-completion-p))
>>
>> Can we (cheaply) arrange so that the var is always defined at this
>> point (same for the other uses further down in the patch)?
>> Maybe by moving the `defvar` elsewhere (e.g. next to
>> `eshell-parse-argument-hook`)?
>
> It's a bit ugly, but I'm trying to follow the conventions in Eshell: since
> completion is an optional extension module for Eshell, other modules jump
> through hoops like this to allow the module to be not-loaded.

I definitely don't want to force preloading that module.
But maybe that var could have a meaning that's independent
from completion, thus justifying to move it out of the completion
extension module?

E.g. something like "keep parsing free of side effects"?  This would also
have the benefit of clarifying the actual meaning of this var: defining
a var based on who uses it or how it's used is always a source of
trouble.

> Another way to do this (arguably more Eshell-y) would be:
>
>   (when (and (eshell-using-module 'eshell-cmpl)
>              eshell-parsing-for-completion)

`boundp` is definitely much better.


        Stefan






reply via email to

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