[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
This code won't match buffer names. Why not?
From: |
Chris Seberino |
Subject: |
This code won't match buffer names. Why not? |
Date: |
Fri, 21 Aug 2009 17:31:56 -0700 (PDT) |
User-agent: |
G2/1.0 |
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))))