;;; compile-.el --- Extensions to `compile.el'. ;; ;; Filename: compile-.el ;; Description: Extensions to `compile.el' ;; Author: Drew Adams ;; Maintainer: Drew Adams ;; Copyright (C) 2004-2007, Drew Adams, all rights reserved. ;; Created: Tue Nov 16 17:04:11 2004 ;; Version: 21.0 ;; Last-Updated: Fri Jan 19 20:53:48 2007 (-28800 Pacific Standard Time) ;; By: dradams ;; Update #: 85 ;; URL: http://www.emacswiki.org/cgi-bin/wiki/compile-.el ;; Keywords: tools, processes ;; Compatibility: GNU Emacs 21.x,GNU Emacs 22.x ;; ;; Features that might be required by this library: ;; ;; `avoid', `fit-frame', `frame-cmds', `frame-fns', `misc-fns', ;; `strings', `thingatpt', `thingatpt+'. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Commentary: ;; ;; Extensions to `compile.el'. ;; ;; See also the companion file `compile+.el'. ;; `compile-.el' should be loaded before `compile.el'. ;; `compile+.el' should be loaded after `compile.el'. ;; ;; Put this in your initialization file (`~/.emacs'): ;; ;; (require 'compile-) ;; ;; ;; New face defined here: ;; ;; `compilation-mouseover' - Use instead of highlight for mouse-face. ;; ;; Function `fit-1-window-frames-on' (defined in `fit-frame.el') is ;; added here to `compilation-finish-functions'. ;; ;; ;; ***** NOTE: The following variable defined in `compile.el' ;; has been REDEFINED HERE: ;; ;; `compilation-message-face' - ;; We set the default value to nil, to get rid of underlining. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Change log: ;; ;; 2006/04/02 dadams ;; Added defcustom of compilation-message-face (nil) to get rid of underlining. ;; 2005/12/26 dadams ;; Updated parent groups. ;; 2005/12/16 dadams ;; Added: compilation-mouseover. ;; Removed: compile-regexp-face. Use next-error face, not compile-regexp-face. ;; 2004/11/26 dadams ;; Require frame-fns.el[c]. ;; 2004/11/16 dadams ;; New version for Emacs 21. Old version renamed to compile-20.el. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth ;; Floor, Boston, MA 02110-1301, USA. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Code: (require 'fit-frame nil t) ;; (no error if not found): fit-frame (require 'frame-fns nil t) ;; 1-window-frames-on ;;;;;;;;;;;;;;;;;;;;;;;;; ;; Use nil, not `underline', to turn off underlining. (defcustom compilation-message-face nil "Face name to use for whole messages. Faces `compilation-error-face', `compilation-warning-face', `compilation-info-face', `compilation-line-face' and `compilation-column-face' get prepended to this, when applicable." :type 'face :group 'compilation :version "22.1") ;; Instead of `highlight', which is hard-coded in `compile.el'. ;;;###autoload (defface compilation-mouseover '((t (:underline t))) "Face used to highlight text the mouse is over." :group 'compilation :group 'font-lock-highlighting-faces) (when (and (fboundp 'x-color-defined-p) (x-color-defined-p "SkyBlue")) (cond ((facep 'next-error) (set-face-foreground 'next-error nil) (set-face-background 'next-error "SkyBlue")) (t (defface next-error '((t (:background "SkyBlue"))) "Face used to highlight next error locus." :group 'next-error)))) ;; Resize frame to fit buffer - hook `compilation-finish-functions'. (when (and (fboundp 'fit-frame) (fboundp '1-window-frames-on)) (defun fit-1-window-frames-on (buf &optional ignored) "Resize buffer BUF's one-window frame(s) to fit the buffer. Usable, e.g., as a member of `compilation-finish-functions'." ;; Optional arg IGNORED is ignored. ;; It is for compatibility with `compilation-finish-functions'. (let ((frs (1-window-frames-on buf))) (while frs (fit-frame (car frs)) ; Defined in `fit-frame.el'. (setq frs (cdr frs))))) (add-hook 'compilation-finish-functions 'fit-1-window-frames-on)) ;;;;;;;;;;;;;;;;;;;;;;; (provide 'compile-) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; compile-.el ends here