Hi, Stefan Monnier suggested I post this here. I wrote some code long ago that works with Emacs 20.7 and earlier - I don't know if it works with Emacs 21 - probably not, out of the box. In any case, some of the changes I made might be of interest for adaptation/inclusion in compile.el. They are essentially cosmetic (for usability), so I expect they are complementary to changes made recently (Emacs 21) to compile.el. I don't have the resources to work on Emacs 21 development, myself, but I'm hoping my code might be useful for that development, if only by suggesting something useful that might be recoded in a more up-to-date fashion. I changed and added to the functions in compile.el not by changing the file itself, but by adding an envelope of two new files (attached): compile-.el and compile+.el, to be loaded before and after compile.el, respectively. File highlight.el is also attached, to provide function highlight-regexp-region. Please try these files with Emacs 20 to see what they do. Let me know if you have any questions. Here is a description of the compile.el features I changed: - The last grep pattern used (whether quoted or not) is used for highlighting - see grep and grep-regexp-face. - grep - Saves grep-pattern for highlighting. Interactive spec uses grep-default-regexp-fn (see next) to provide default. - New user options (vars): . grep-default-regexp-fn - Used in interactive spec of grep command to provide default. . grep-regexp-face - For highlighting grep regexp: everywhere in *grep* buffer and at specific occurrence in target buffer when you use compilation-goto-locus. . compile-buffer-mouse-face - Used instead of highlight as mouse-face in compile-reinitialize-errors and compilation-forget-errors. . compile-reinitialize-errors - Put mouse-face on the whole line. . compilation-mode-font-lock-keywords - Highlights grep-pattern in *grep* buffer. . compilation-goto-locus - Highlights grep-pattern at error (in target buffer) and displays line #. . compilation-next-error - Displays line #. . compilation-mode - Uses fundamental-mode instead of kill-all-local-variables. - Keys that would modify a compilation-mode buffer (e.g. self-insert) are unbound and available to user for binding. - (put 'compile-mode 'mode-class 'special) - compilation-minor-mode-map is a full key map - the unused keys display a help message for Compile Mode. - compilation-forget-errors and compile-reinitialize-errors - Use compile-buffer-mouse-face. - Minibuffer messages use color to make some terms stand out (via function display-in-minibuffer, defined in file strings.el). - compile - Resets grep-pattern from last grep. - compile-internal - Sets font-lock-fontified to nil. Prevents frame from getting shrink-wrapped prematurely. - compilation-finish-functions - Added shrink-wrap-1-window-frames-on and fontify-buffer. The first of these shrink-wraps the compilation buffer frame to fit the output, when compilation is finished. The changes I've made also reference functions defined in some other files I've written. They define functions that are not essential to the compile functionality. I can send them separately, on request. Thanks, Drew Adams