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

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

Re: Handling defaults values for both interactive and non-interactive us


From: Heime
Subject: Re: Handling defaults values for both interactive and non-interactive use
Date: Tue, 10 Sep 2024 17:29:44 +0000





Sent with Proton Mail secure email.

On Tuesday, September 10th, 2024 at 3:37 PM, Heime <heimeborgia@protonmail.com> 
wrote:

> How is one to handle setting defaults for both interactive
> and non-interactive use, properly ?
> 
> (defun xiakos-context (search-text &optional n bfrn)
> 
> (setq n (or n 8))
> (setq bfrn (or bfrn "Context"))
> 
> (interactive
> (list
> (read-string " Search Text: ")
> (read-number " Number of Context Lines: ")
> (read-string " Buffer Name: ")))
> 
> (if (string-match-p "^\\s-*$" bfrn) "Context")

Would one handle the default non-interactive and default
interactive separately ?  Or does one handle the defaults 
after having parsed the non-interactive or the interactive 
part ?  In summary, would the default values be handled 
after the interactive clause ?  Or does one set the default
for the interactive part inside the interactive clause ?



reply via email to

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