unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Handling defaults values for both interactive and non-interactive use
@ 2024-09-10  3:37 Heime
  2024-09-10 17:29 ` Heime
  0 siblings, 1 reply; 3+ messages in thread
From: Heime @ 2024-09-10  3:37 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

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")




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-11  0:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-10  3:37 Handling defaults values for both interactive and non-interactive use Heime
2024-09-10 17:29 ` Heime
2024-09-11  0:23   ` Heime

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).