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