[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compilation-highlight-duration

From: Juri Linkov
Subject: Re: compilation-highlight-duration
Date: Sun, 09 May 2004 04:03:14 +0300
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> writes:
>     > But currently it's not possible to highlight the source buffer
>     > only in `next-error-no-select'.  Perhaps a new argument should be
>     > added to `next-error' and `compilation-next-error-function' indicating
>     > whether highlighting is desirable and in what fashion (overlay flashing
>     > delay duration, fringe arrow, etc.)
> I think we should make next-error and next-error-no-select use a common
> subroutine.  Then next-error-no-select would do this highlighting.
> next-error would not do the highlighting.

This is not possible with the current implementation because
`next-error-no-select' calls the `next-error'.

However, creating two similar user options and binding one of them in
`next-error-no-select' will allow the user to specify preferred
highlighting methods separately for selected and non-selected
error visiting.

(defcustom error-highlight nil
  :type '(choice (const :tag "Persistent overlay" t)
                 (const :tag "No highlighting" nil)
                 (const :tag "Fringe arrow" 'fringe-arrow)
                 (integer :tag "Delay"))
  :group 'compilation
  :version "21.4")

(defcustom error-highlight-no-select 0.5
  :type '(choice (const :tag "Persistent overlay" t)
                 (const :tag "No highlighting" nil)
                 (const :tag "Fringe arrow" 'fringe-arrow)
                 (integer :tag "Delay"))
  :group 'compilation
  :version "21.4")

(defun next-error-no-select (n)
  (interactive "p")
  (let ((error-highlight error-highlight-no-select))
    (next-error n))
  (pop-to-buffer next-error-last-buffer))

And `compilation-goto-locus' will use the variable `error-highlight'
to perform highlighting accordingly.

Juri Linkov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]