On 05 Feb 2004, storm@cua.dk wrote: > Maybe a more generic approach could be used: > > Let compile.el define a buffer-local compilation-next-error-function > variable (default value nil) which can be bound in the *occur* > buffer to #'occur-next (or whatever). [...] > With this approach, compile.el doesn't need to know anything about > occur mode, and future similar modes can hook themselves into > next-error without modifying compile.el any further. I see, that is indeed a much better solution. I've reworked the patch to do what you suggest; only the universal-prefix is not handled by occur-next-error. It is much better from the perspective of occur-mode, but I had to modify compilation-find-buffer and compilation-buffer-p to avoid complicating next-error. Anyhow, see what you think. multi-occur should be handled, I don't know if I need to do anything there. It works exactly like occur, according to the docs. > IMO, it would be cleaner to add (provide 'occur) to replace.el and > just test with (featurep 'occur). OK, with the change you suggested above I don't need to do this anymore, but I'll keep it in mind. By the way, why doesn't replace.el (provide 'occur)? No one needed it? > The autoload of occur-next should be done as an autoload cookie in > occur.el But I don't see why do you need it at all? I was calling occur-next explicitly, so I wanted to make sure there were no compiler warnings. I see it's unnecessary. Thanks Ted