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

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

Re: Run terminal command with output in current buffer


From: Stefan Monnier
Subject: Re: Run terminal command with output in current buffer
Date: Fri, 16 Jul 2021 11:21:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> You can declare local variables with “let”:
>
>     (let (cmd-excl cmd-incl)
>       (setq cmd-excl "value"))

Please don't.  Use

    (let ((cmd-excl "value")
          cmd-incl)

instead.
[ This is less code to write, simpler code for the reader, simpler code
  for the compiler, and even marginally more efficient.  ]

Only use `setq` when you really want that variable to contain
different values at different times.


        Stefan




reply via email to

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