all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.