help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Advising functions and major-mode?


From: Lennart Borgman (gmail)
Subject: Re: Advising functions and major-mode?
Date: Mon, 13 Oct 2008 16:53:52 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Tyler Spivey wrote:
> 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?

When list-buffers normal code has finished you are back in the buffer
where you started.

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]