[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Basic emacs lisp question
From: |
Emanuel Berg |
Subject: |
Re: Basic emacs lisp question |
Date: |
Wed, 10 Sep 2014 01:02:32 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Thorsten Jolitz <tjolitz@gmail.com> writes:
> (defun process-diary-file () ...
Yeah, +1 for thing-at-point, very useful - but, that
function opens a file and echoes the first symbol. If
that is the purpose (?) of the function I think it
should close the buffer (if opened), and it should
save-excursion if there was such a buffer opened - and
the name/docstring should be changed to reflect the
purpose of the defun.
We can discuss programming all night long but it makes
more sense if we do it in the context of defuns that do
sensible things, not just for the sake of it...
let:
(let (a-var)
(setq a-var 5)
(message "%s" a-var) ) ; "5"
;; I think this is better:
(let ((a-var 5))
;; here, do something else that involves a-var
(message "%s" a-var) ) ; "5"
(message "%s" a-var) ; error, no a-var (good)
--
underground experts united
- Basic emacs lisp question, Ken, 2014/09/09
- Message not available
- Re: Basic emacs lisp question, Emanuel Berg, 2014/09/09
- Message not available
- Re: Basic emacs lisp question, Emanuel Berg, 2014/09/09
- Message not available
- Re: Basic emacs lisp question, Emanuel Berg, 2014/09/09
- Re: Basic emacs lisp question, Robert Thorpe, 2014/09/09
- Re: Basic emacs lisp question, Ken, 2014/09/09
- Re: Basic emacs lisp question, Glyn Millington, 2014/09/10
- Re: Basic emacs lisp question, Ken, 2014/09/10
Re: Basic emacs lisp question, Phillip Lord, 2014/09/10