[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
defadvicing next-error
From: |
Timur Aydin |
Subject: |
defadvicing next-error |
Date: |
Tue, 31 Mar 2015 15:18:16 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
Hi,
I had defadviced isearch-update a long time ago so that it also
recenters the screen and have never looked back. Best entry I made in my
.emacs.el :) Here is what I have for that:
(defadvice isearch-update (after recenter activate)
(recenter))
Now I want to do the same thing with next-error:
(defadvice next-error (after recenter activate)
(recenter))
But while this works most of the time, it doesn't work with the first
hit. And it doesn't work when a transition happens from one source file
to another. I get "recenter'ing a window that does not display
current-buffer".
So how do I get the recenter for every hit of next-error, just like
isearch-update?
Timur
- defadvicing next-error,
Timur Aydin <=