[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: follow-link not on mouse-face
From: |
Romain Francoise |
Subject: |
Re: follow-link not on mouse-face |
Date: |
Tue, 25 Oct 2005 22:54:43 +0200 |
"Richard M. Stallman" <address@hidden> writes:
> Is it possible to do that but including the colon with the line
> number?
It's possible but only if the line number uses a different face for
mouse-face. I don't want the line-number highlight to look different
since it does the same thing as the highlight on match data, so that
would mean defining a new face that inherits from 'highlight, and use it
for the line numbers. I don't find it terribly elegant.
Or is there a way to highlight (separately) two adjoining sections of a
line with the same mouse-face property?
Index: replace.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/replace.el,v
retrieving revision 1.226
diff -c -r1.226 replace.el
*** replace.el 24 Oct 2005 06:19:32 -0000 1.226
--- replace.el 25 Oct 2005 20:52:58 -0000
***************
*** 857,862 ****
--- 857,868 ----
:group 'matching
:version "22.1")
+ (defface occur-highlight-line-number
+ '((t (:inherit highlight)))
+ "Face for highlighting line numbers in Occur buffers."
+ :group 'matching
+ :version "22.1")
+
(defcustom list-matching-lines-default-context-lines 0
"*Default number of context lines included around `list-matching-lines'
matches.
A negative number means to include that many lines before the match.
***************
*** 1125,1138 ****
(let* ((out-line
(concat
;; Using 7 digits aligns tabs properly.
! (apply #'propertize (format "%7d" lines)
(append
(when prefix-face
`(font-lock-face prefix-face))
! `(occur-prefix t mouse-face highlight
occur-target ,marker follow-link t
help-echo "mouse-2: go to this
occurrence")))
- ":"
;; We don't put `mouse-face' on the newline,
;; because that loses. And don't put it
;; on context lines to reduce flicker.
--- 1131,1143 ----
(let* ((out-line
(concat
;; Using 7 digits aligns tabs properly.
! (apply #'propertize (format "%7d:" lines)
(append
(when prefix-face
`(font-lock-face prefix-face))
! `(occur-prefix t mouse-face
occur-highlight-line-number
occur-target ,marker follow-link t
help-echo "mouse-2: go to this
occurrence")))
;; We don't put `mouse-face' on the newline,
;; because that loses. And don't put it
;; on context lines to reduce flicker.
--
Romain Francoise <address@hidden> | I just thought I'd go out
it's a miracle -- http://orebokech.com/ | with a little bit more style.
- Re: follow-link not on mouse-face, (continued)
- Re: follow-link not on mouse-face, Richard M. Stallman, 2005/10/23
- Re: follow-link not on mouse-face, David Kastrup, 2005/10/23
- Re: follow-link not on mouse-face, Romain Francoise, 2005/10/23
- Re: follow-link not on mouse-face, Richard M. Stallman, 2005/10/23
- Re: follow-link not on mouse-face, Romain Francoise, 2005/10/24
- Re: follow-link not on mouse-face, Juri Linkov, 2005/10/24
- Re: follow-link not on mouse-face, Romain Francoise, 2005/10/25
- RE: follow-link not on mouse-face, Drew Adams, 2005/10/25
- Re: follow-link not on mouse-face, David Kastrup, 2005/10/25
- Re: follow-link not on mouse-face, Richard M. Stallman, 2005/10/25
- Re: follow-link not on mouse-face,
Romain Francoise <=
- Re: follow-link not on mouse-face, Juri Linkov, 2005/10/25
- Re: follow-link not on mouse-face, Richard M. Stallman, 2005/10/26
- Re: follow-link not on mouse-face, Romain Francoise, 2005/10/27