[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Executing part of the code instead of another
From: |
Christopher Dimech |
Subject: |
Re: Executing part of the code instead of another |
Date: |
Wed, 7 Oct 2020 09:01:00 +0200 |
What can one use if there is an else branch with multiple commands, as I would
like to use it.
> Sent: Wednesday, October 07, 2020 at 3:05 AM
> From: "Emanuel Berg via Users list for the GNU Emacs text editor"
> <help-gnu-emacs@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Executing part of the code instead of another
>
> Christopher Dimech wrote:
>
> > I have been trying to do the following
> >
> > (setq optn 1)
> > (if (= optn 1)
> >
> > ( global-unset-key (kbd "C-<home>") )
> > [...]
> > ( global-set-key (kbd "C-<mouse-5>")
> > (lambda () (interactive) (scroll-up 1)) ; Scrolls the page Up
> > )
> > )
>
> If there is no else branch, use `when' (or `unless').
>
> (when (= var-a 1)
> (do-this)
> (and-this)
> (and-this-as-well) )
>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>
- Executing part of the code instead of another, Christopher Dimech, 2020/10/06
- Re: Executing part of the code instead of another, Emanuel Berg, 2020/10/06
- Re: Executing part of the code instead of another, Christopher Dimech, 2020/10/06
- Re: Executing part of the code instead of another, Emanuel Berg, 2020/10/06
- Re: Executing part of the code instead of another,
Christopher Dimech <=
- Re: Executing part of the code instead of another, Emanuel Berg, 2020/10/07
- Re: Executing part of the code instead of another, Robert Pluim, 2020/10/07
- Re: Executing part of the code instead of another, Christopher Dimech, 2020/10/07
- Re: Executing part of the code instead of another, Nick Dokos, 2020/10/07
- Re: Executing part of the code instead of another, Christopher Dimech, 2020/10/07
- Re: Executing part of the code instead of another, Gregory Heytings, 2020/10/07
- Re: Executing part of the code instead of another, Emanuel Berg, 2020/10/07
- Re: Executing part of the code instead of another, Robert Pluim, 2020/10/07
- Re: Executing part of the code instead of another, Emanuel Berg, 2020/10/07
- Re: Executing part of the code instead of another, Robert Pluim, 2020/10/07