[Top][All Lists]

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

Re: wrong type error in local variables

From: Emanuel Berg
Subject: Re: wrong type error in local variables
Date: Fri, 03 Jul 2020 04:00:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Douglas Lewan wrote:

>> Okay, but what exactly is the problem with it,
>> from Lisp?
> The problem is that it changes the buffer.
> If a (find-file) fails and you were depending on
> the change of the current buffer all kinds of other
> things might go wrong.
> If you use (find-file-noselect), then the current
> buffer doesn't change and any attempt to use that
> buffer would fail. In particular, you should be
> verifying that the (find-file-noselect) succeeded.

Gotcha, but then why not just have a single such
function that does the checking itself and aborts
further execution immediately after the initial,
failed attempt to find the file? Then 1 (onee)
function would be used, and with no need to
explicitely check if it succeeded?

underground experts united

reply via email to

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