[Top][All Lists]

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

RE: [External] : Re: result of completing-read contradicting require-mat

From: Drew Adams
Subject: RE: [External] : Re: result of completing-read contradicting require-match
Date: Sun, 10 Jul 2022 14:36:04 +0000

> I would like to merge these two functions and use each of them
> sometimes singly. The third merged one would check for both values.

I'm not following this thread.  Just happened to
read your initial statement, which sounds like
you want to repeat invoking a function until it
returns nil or non-nil.

If so, Emacs already gives you that:
(`*-success' is similar).

_____ And `C-h v' tells you this ____

run-hook-with-args-until-failure is a built-in function in ‘C source

(run-hook-with-args-until-failure HOOK &rest ARGS)

Run HOOK with the specified arguments ARGS.
HOOK should be a symbol, a hook variable.  The value of HOOK
may be nil, a function, or a list of functions.  Call each
function in order with arguments ARGS, stopping at the first
one that returns nil, and return nil.  Otherwise (if all functions
return non-nil, or if there are no functions to call), return non-nil
(do not rely on the precise return value in this case).

Do not use `make-local-variable' to make a hook variable buffer-local.
Instead, use `add-hook' and specify t for the LOCAL argument.

reply via email to

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