For this simple question, I never found any answer. Let assume I have the following:
(if (true)
(foo1) ;; When true
(bar) ;; When false)
So I would like to combine foo1 and foo2
(if (true)
(foo1)(foo2) ;; When true
(bar) ;; When false)
The problem is that the Emacs Lisp interpreter consider foo2
as false statement. Trying to devise some workaround, I could get away with the following:
(if (true)
(foo3) ;; When true
(bar) ;; When false)
(defun foo3 ()
(foo1)
(foo2))
But this could be quite cumbersome when you use if-else statements a lot. How could I find a more practical way for this?