[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
From: |
martin rudalics |
Subject: |
bug#14191: 24.3.50; (buffer-list) returns list with non-current buffer as its firstelement |
Date: |
Mon, 15 Apr 2013 09:10:59 +0200 |
> But `record-window-buffer' is apparently quite a bit more than just
> (select-window (selected-window)).
More and less, I think.
> 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.
As Andreas already remarked, the behavior of Emacs in this regard was
never clearly documented. Unfortunately, I don't know more about its
"unobvious intention/effect" than you.
martin
bug#14191: 24.3.50; (buffer-list) returns list with non-current buffer as its first element, Andreas Schwab, 2013/04/12