emacs-devel
[Top][All Lists]
Advanced

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

Re: ignore-error?


From: Lars Ingebrigtsen
Subject: Re: ignore-error?
Date: Fri, 26 Jul 2019 10:08:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> Let's see...  It's this stuff?
>
> Yup.
>
>> The parameter should perhaps also be allowed to be a list of symbols:
>>
>> (ignore-error (file-error some-other-error)
>>   (foo))
>
> Even better,

I have now added `ignore-error', and provided for completion...  but
with some caveats, as `elisp-completion-at-point' isn't...  er...  quite
right?  :-)

Right: If you say

(ignore-erC-M-i

then funpos will indicate that we're in a function position and complete
over functions (which is correct).

(ignore-error C-M-i

still has funpos indicating that we're in a function definition, which
doesn't seem correct?  But even if we fix that, then `end' will indicate
that we can't complete anything anyway.

(ignore-error argC-M-i

will have everything correct and complete to

(ignore-error args-out-of-range

Unfortunately, so will

(ignore-error foo
  argC-M-i

because we don't have a count at all where we are in the sexp we're
completing.  But on the other hand, the sexps are usually not closed
when we're completing anyway, so I guess that's a hard problem.

And, by the way

(condition-case nil
   (foo)
  (argC-M-i

completes well, but not

(condition-case nil
   (foo)
  ((argC-M-i

that is, where the condition is a list...

It seems like that completing function could, like, use more...  stuff.
:-)  But I guess it's a DWIM best effort kinda thing.

-- 
(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]