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

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

Re: Doing things only in a particular mode


From: Marcin Borkowski
Subject: Re: Doing things only in a particular mode
Date: Thu, 27 Aug 2015 07:17:43 +0200

On 2015-08-25, at 03:30, Emanuel Berg <address@hidden> wrote:

> ;; ditto multiple-form branches
>
> (if (eq major-mode 'mu4e-headers-mode)
>   (progn
>     (do-something-step-1)
>     (do-something-step-2) )
>   (progn
>     (else-do-this-step-1)
>     ;; ...
>     (else-do-this-step-n) ))

I guess you got the indentation wrong.  Also, you don't need progn for
else-branch.  Also, if you need progn for then-branch, I'd prefer cond
to if.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



reply via email to

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