[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14191: 24.3.50; (buffer-list) returns list with non-current buffer a
bug#14191: 24.3.50; (buffer-list) returns list with non-current buffer as its firstelement
Sat, 13 Apr 2013 08:08:36 -0700
> > Why not take away some of the mystery and make the behavior
> > here more transparent by creating a function whose name
> > suggests it?
> `record-window-buffer' ?
I wasn't aware of it. I was just basing my off-the-cuff suggestion on what the
code was apparently trying to do here.
But `record-window-buffer' is apparently quite a bit more than just
Should `record-window-buffer' be used in its place at this occurrence? If not,
should another function be defined to do only (select-window (selected-window))
- essentially an alias to better communicate the intention?
You're the expert here, not I. My feeling is just that using (select-window
(selected-window)) to take advantage of a less-than-obvious side effect is
obfuscating, not clever or wise.
Without an informative alias for this action, the code really needs to be
commented to indicate the unobvious intention/effect, at the least. But is
probably better to have a function name & doc string communicate this than code
comments and bug reports.
bug#14191: 24.3.50; (buffer-list) returns list with non-current buffer as its first element, Andreas Schwab, 2013/04/12