From: Tyler Spivey <tspivey@pcdesk.no-spam.net>
To: help-gnu-emacs@gnu.org
Subject: Advising functions and major-mode?
Date: Mon, 13 Oct 2008 02:34:07 -0700 [thread overview]
Message-ID: <877i8ckfe8.fsf@pcdesk.net> (raw)
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.
next reply other threads:[~2008-10-13 9:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-13 9:34 Tyler Spivey [this message]
2008-10-13 14:53 ` Advising functions and major-mode? Lennart Borgman (gmail)
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=877i8ckfe8.fsf@pcdesk.net \
--to=tspivey@pcdesk.no-spam.net \
--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.