[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Advising functions and major-mode?
From: |
Tyler Spivey |
Subject: |
Advising functions and major-mode? |
Date: |
Mon, 13 Oct 2008 02:34:07 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Hello. I am trying to get this (simplified example) to work, and would
like to know what is happening.
(defadvice list-buffers (after test pre act)
(message "%s" major-mode))
Here is what I think should happen, and what is happening.
1. I have set pop-up-windows to nil.
2. When this advice runs, it should print "Buffer-menu-mode". Instead,
it prints the mode of whatever I was in before entering list-buffers.
Is this just a case of the buffer not changing before redisplay or
something like that runs, or have I uncovered a bug?
I've tried adding force-mode-line-update, force-window-update, and
redisplay to the advice before the message, but no luck.
I'm running GNU Emacs 23.0.60.1 (x86_64-unknown-linux-gnu, GTK+ Version
2.12.11) of 2008-09-27 on arch1.
- Advising functions and major-mode?,
Tyler Spivey <=