unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* interactive argument not meeting condition
@ 2024-11-27 12:37 Heime via Users list for the GNU Emacs text editor
  2024-12-22 12:06 ` Joel Reicher
  0 siblings, 1 reply; 2+ messages in thread
From: Heime via Users list for the GNU Emacs text editor @ 2024-11-27 12:37 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

For the line column I test whether actm disables the value. 
What happens to line-column when the condition does not
invoke read-number?  Would I need some default for it?

(defun polaq (actm line-column)

  (interactive
    (let* ( (cseq '("extended" "disable" "tabtrail"))
            (actm (completing-read "Dragovis: " cseq nil t "tabtrail"))
            (line-column (if (not (string= actm "disable"))
                               (read-number "Set line column: " 72))) )

      (list actm line-column)) )





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

* Re: interactive argument not meeting condition
  2024-11-27 12:37 interactive argument not meeting condition Heime via Users list for the GNU Emacs text editor
@ 2024-12-22 12:06 ` Joel Reicher
  0 siblings, 0 replies; 2+ messages in thread
From: Joel Reicher @ 2024-12-22 12:06 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor; +Cc: Heime

Heime via Users list for the GNU Emacs text editor 
<help-gnu-emacs@gnu.org> writes:

> For the line column I test whether actm disables the value. 
> What happens to line-column when the condition does not invoke 
> read-number?  Would I need some default for it?
>
> (defun polaq (actm line-column)
>
>   (interactive
>     (let* ( (cseq '("extended" "disable" "tabtrail"))
>             (actm (completing-read "Dragovis: " cseq nil t 
>             "tabtrail"))
>             (line-column (if (not (string= actm "disable"))
>                                (read-number "Set line column: " 
>                                72))) )
>
>       (list actm line-column)) )

It looks like line-column is being set to the result of the "if".

Regards,

        - Joel



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

end of thread, other threads:[~2024-12-22 12:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-27 12:37 interactive argument not meeting condition Heime via Users list for the GNU Emacs text editor
2024-12-22 12:06 ` Joel Reicher

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