unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* This code won't match buffer names.  Why not?
@ 2009-08-22  0:31 Chris Seberino
  2009-08-22  1:09 ` Benjamin Andresen
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Chris Seberino @ 2009-08-22  0:31 UTC (permalink / raw)
  To: help-gnu-emacs

When I cycle through buffers, I'd like to skip *scratch*, *Messages*
and *Whitespace Errors* buffers.

I wrote following code to skip one more buffer if I'm sitting in
either of those 3.

However, it never matches those buffers.  Why not?

(BTW, the (end-kbd-macro) is just a dummy function since "if" needs an
"else" command.
Is there a better dummy command I can add there?)


; Sets F10 to execute a function that moves to another buffer.
(global-set-key [f10] (lambda () (interactive)
                                 (next-buffer)
                                 (if (equal (current-buffer)
"*scratch*")
                                     (next-buffer)
                                     (end-kbd-macro))
                                 (if (equal (current-buffer)
"*Messages*")
                                     (next-buffer)
                                     (end-kbd-macro))
                                 (if (equal (current-buffer)
                                            "*Whitespace Errors*")
                                     (next-buffer)
                                     (end-kbd-macro))))


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-08-31 12:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-22  0:31 This code won't match buffer names. Why not? Chris Seberino
2009-08-22  1:09 ` Benjamin Andresen
2009-08-22  1:12   ` Benjamin Andresen
2009-08-29 13:06   ` David Kastrup
2009-08-31  9:13     ` Pascal J. Bourguignon
2009-08-31 12:03       ` David Kastrup
2009-08-22  2:50 ` Xah Lee
2009-08-22  7:27 ` Ivan Kanis

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).