[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 11:25:25 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
steve-humphreys wrote:
>>> Is using "setq frq" and "setq tim" good
>>>
>>> (defun agenda-tgrd (&optional tstr tend tskp)
>>> "Sets the time grid for the agenda."
>>> (interactive "n StartTime: \nn EndTime: \nn SkipTime: ")
>>> (let ( (tstr (or tstr 800))
>>> (tend (or tend 1500))
>>> (tskp (or tskp 100))
>>> frq tim)
>>> (setq frq '(daily today))
>>> (setq tim (number-sequence tstr tend tskp))
>>> (setq org-agenda-time-grid `(,frq ,tim "------" "---"))) )
>>
>> It is better to do all computation in the `let's, then use
>> them. No `setq' needed.
>
> Example? Is there anything written about it?
Here, use `let*' instead of `let'. You already know how to do
let and to do the computation. So you don't need an example...
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
- Elisp - Function returning a list, steve-humphreys, 2020/12/15
- Re: Elisp - Function returning a list, Jean Louis, 2020/12/15
- Re: Elisp - Function returning a list, Emanuel Berg, 2020/12/15
- Re: Elisp - Function returning a list, steve-humphreys, 2020/12/16
- Re: Elisp - Function returning a list, Emanuel Berg, 2020/12/16
- Re: Elisp - Function returning a list, steve-humphreys, 2020/12/16
- Re: Elisp - Function returning a list, Joost Kremers, 2020/12/16
- Re: Elisp - Function returning a list,
Emanuel Berg <=
- let, let*, oh, why [was: Elisp - Function returning a list], tomas, 2020/12/16
- Re: let, let*, oh, why [was: Elisp - Function returning a list], Emanuel Berg, 2020/12/16
- Re: let, let*, oh, why [was: Elisp - Function returning a list], Jean Louis, 2020/12/16
- Re: let, let*, oh, why [was: Elisp - Function returning a list], Stefan Monnier, 2020/12/16
- Re: let, let*, oh, why [was: Elisp - Function returning a list], Jean Louis, 2020/12/16
- Re: let, let*, oh, why [was: Elisp - Function returning a list], Stefan Monnier, 2020/12/16
- Re: let, let*, oh, why [was: Elisp - Function returning a list], tomas, 2020/12/16
- Re: let, let*, oh, why [was: Elisp - Function returning a list], Jean Louis, 2020/12/16
- Re: let, let*, oh, why [was: Elisp - Function returning a list], tomas, 2020/12/16
- Re: let, let*, oh, why [was: Elisp - Function returning a list], Emanuel Berg, 2020/12/18