From: Luc Teirlinck <teirllm@dms.auburn.edu>
Subject: Strange dynamic variable buf in ielm-send-input
Date: Sat, 24 Apr 2004 21:21:30 -0500 (CDT) [thread overview]
Message-ID: <200404250221.i3P2LUG17355@raven.dms.auburn.edu> (raw)
Take:
(defun ielm-send-input nil
"Evaluate the Emacs Lisp expression after the prompt."
(interactive)
(let ((buf (current-buffer))
ielm-input) ; set by ielm-input-sender
(comint-send-input) ; update history, markers etc.
(ielm-eval-input ielm-input)))
That dynamically bound variable "buf" does not only _not_ get used in
the function ielm-send-input, but also nowhere else in ielm.el, nor in
comint.el. I do not know whether it is a remnant of a prior version
in which it was used (in which case it should obviously be removed),
or whether it is meant to provide the user with a way to refer to the
current ielm buffer in IELM expressions. (Because (current-buffer)
yields the working buffer, not necessarily the ielm buffer, the ielm
buffer may have been renamed and although (window-buffer) will most of
the time refer to the actual IELM buffer, it may not be 100% reliable
either.)
If the latter is the purpose, then I believe that that purpose should
be documented in the docstring and also that the variable should be
renamed to ielm-buffer or something similar, because buf can just too
easily be overridden.
Sincerely,
Luc.
next reply other threads:[~2004-04-25 2:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-25 2:21 Luc Teirlinck [this message]
2004-04-26 7:27 ` Strange dynamic variable buf in ielm-send-input Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200404250221.i3P2LUG17355@raven.dms.auburn.edu \
--to=teirllm@dms.auburn.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.