unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>,
	"'Joost Kremers'" <joostkremers@fastmail.fm>
Cc: 14191-done@debbugs.gnu.org
Subject: bug#14191: 24.3.50; (buffer-list) returns list with non-current buffer as its firstelement
Date: Fri, 12 Apr 2013 10:51:16 -0700	[thread overview]
Message-ID: <9522B8428A9D4EE2A8029FFE7904D967@us.oracle.com> (raw)
In-Reply-To: <jwvmwt3irk0.fsf-monnier+emacs@gnu.org>

> +    /* `switch-to-buffer' uses (select-window 
> +    (selected-window)) as a "clever"
> +    way to call record_buffer from Elisp

As your quote-marks are no doubt meant to suggest here, there's really nothing
clever about code that relies on behavior that is somewhat obscure.

Why not take away some of the mystery and make the behavior here more
transparent by creating a function whose name suggests it?

(defun record-selected-window-buffer () ; Or `defsubst', if you prefer.
  "Move the buffer of the selected window to the front of `buffer-list'."
  (select-window (selected-window)))







  reply	other threads:[~2013-04-12 17:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 12:34 bug#14191: 24.3.50; (buffer-list) returns list with non-current buffer as its first element Joost Kremers
2013-04-12 17:32 ` Stefan Monnier
2013-04-12 17:51   ` Drew Adams [this message]
2013-04-13  8:02     ` bug#14191: 24.3.50; (buffer-list) returns list with non-current buffer as its firstelement martin rudalics
2013-04-13 15:08       ` Drew Adams
2013-04-15  7:10         ` martin rudalics
2013-04-12 18:59 ` bug#14191: 24.3.50; (buffer-list) returns list with non-current buffer as its first element Andreas Schwab
2013-04-14 12:46   ` Joost Kremers

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9522B8428A9D4EE2A8029FFE7904D967@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=14191-done@debbugs.gnu.org \
    --cc=joostkremers@fastmail.fm \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).