all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Subject: compile.el underlining
Date: Fri, 17 Jun 2005 10:58:38 -0400	[thread overview]
Message-ID: <E1DjIIo-0001ri-0e@fencepost.gnu.org> (raw)

Here's a patch to make compile.el underline the file names and line
numbers and column numbers.  Please try this and tell me what you
think.

There is surely a more elegant way to do this which does not involve
making so many new faces; someone who knows better how to set up
font-lock-keywords, might give that a try.

*** compile.el	12 Jun 2005 06:10:07 -0400	1.362
--- compile.el	16 Jun 2005 22:04:13 -0400	
***************
*** 493,517 ****
  ;; backward-compatibility alias
  (put 'compilation-info-face 'face-alias 'compilation-info)
  
  (defvar 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.")
  
! (defvar compilation-error-face 'font-lock-warning-face
    "Face name to use for file name in error messages.")
  
! (defvar compilation-warning-face 'compilation-warning
    "Face name to use for file name in warning messages.")
  
! (defvar compilation-info-face 'compilation-info
    "Face name to use for file name in informational messages.")
  
! (defvar compilation-line-face 'font-lock-variable-name-face
    "Face name to use for line number in message.")
  
! (defvar compilation-column-face 'font-lock-type-face
    "Face name to use for column number in message.")
  
  ;; same faces as dired uses
--- 493,552 ----
  ;; backward-compatibility alias
  (put 'compilation-info-face 'face-alias 'compilation-info)
  
+ (defface compilation-error-file-name
+   '((default :inherit font-lock-warning-face)
+     (((supports :underline t)) :underline t))
+   "Face for displaying file names in compilation errors."
+   :group 'font-lock-highlighting-faces
+   :version "22.1")
+ 
+ (defface compilation-warning-file-name
+   '((default :inherit font-lock-warning-face)
+     (((supports :underline t)) :underline t))
+   "Face for displaying file names in compilation errors."
+   :group 'font-lock-highlighting-faces
+   :version "22.1")
+ 
+ (defface compilation-info-file-name
+   '((default :inherit compilation-info)
+     (((supports :underline t)) :underline t))
+   "Face for displaying file names in compilation errors."
+   :group 'font-lock-highlighting-faces
+   :version "22.1")
+ 
+ (defface compilation-line-number
+   '((default :inherit font-lock-variable-name-face)
+     (((supports :underline t)) :underline t))
+   "Face for displaying file names in compilation errors."
+   :group 'font-lock-highlighting-faces
+   :version "22.1")
+ 
+ (defface compilation-column-number
+   '((default :inherit font-lock-type-face)
+     (((supports :underline t)) :underline t))
+   "Face for displaying file names in compilation errors."
+   :group 'font-lock-highlighting-faces
+   :version "22.1")
+ 
  (defvar 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.")
  
! (defvar compilation-error-face 'compilation-error-file-name
    "Face name to use for file name in error messages.")
  
! (defvar compilation-warning-face 'compilation-warning-file-name
    "Face name to use for file name in warning messages.")
  
! (defvar compilation-info-face 'compilation-info-file-name
    "Face name to use for file name in informational messages.")
  
! (defvar compilation-line-face 'compilation-line-number
    "Face name to use for line number in message.")
  
! (defvar compilation-column-face 'compilation-column-number
    "Face name to use for column number in message.")
  
  ;; same faces as dired uses
***************
*** 1342,1349 ****
      (force-mode-line-update)
      (if (and opoint (< opoint omax))
  	(goto-char opoint))
!     (if compilation-finish-function
! 	(funcall compilation-finish-function (current-buffer) msg))
      (let ((functions compilation-finish-functions))
        (while functions
  	(funcall (car functions) (current-buffer) msg)
--- 1377,1385 ----
      (force-mode-line-update)
      (if (and opoint (< opoint omax))
  	(goto-char opoint))
!     (with-no-warnings
!       (if compilation-finish-function
! 	  (funcall compilation-finish-function (current-buffer) msg)))
      (let ((functions compilation-finish-functions))
        (while functions
  	(funcall (car functions) (current-buffer) msg)

             reply	other threads:[~2005-06-17 14:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-17 14:58 Richard Stallman [this message]
2005-06-17 15:41 ` compile.el underlining Stefan Monnier
2005-06-17 15:42   ` Stefan Monnier
2005-06-18  2:20   ` Richard Stallman

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=E1DjIIo-0001ri-0e@fencepost.gnu.org \
    --to=rms@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.