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

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

Re: Elisp - Function returning a list


From: Emanuel Berg
Subject: Re: Elisp - Function returning a list
Date: Wed, 16 Dec 2020 05:13:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

steve-humphreys wrote:

> I am having a go at making a function that returns a list of
> numbers, but need it interactive. Unsure this is good

The function that returns the list of number has already been
written, well, as you have discovered.

You need to do something else with it on top of that, otherwise
there isn't any point having it interactive.

> (defun typh-agenda-tgrd (tstr tend tskp)
>    (interactive "n Start_Time: n End_Time: n Skip_Time: ")
>    (number-sequence tstr tend tskp))

Hm, interesting indentation, did you really write that in
emacs-lisp-mode?

Yes, the interactive line is incorrect. You can do something
like this:

(defun num-seq (beg end skip)
  (interactive "nstart: \nnend: \nnskip: ")
  (message "%s" (number-sequence beg end skip) ))

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




reply via email to

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