all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Advising functions and major-mode?
Date: Mon, 13 Oct 2008 16:53:52 +0200	[thread overview]
Message-ID: <48F36100.7050304@gmail.com> (raw)
In-Reply-To: <877i8ckfe8.fsf@pcdesk.net>

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	other threads:[~2008-10-13 14:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-13  9:34 Advising functions and major-mode? Tyler Spivey
2008-10-13 14:53 ` Lennart Borgman (gmail) [this message]

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

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

  git send-email \
    --in-reply-to=48F36100.7050304@gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.