[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
follow-link not on mouse-face
From: |
Juri Linkov |
Subject: |
follow-link not on mouse-face |
Date: |
Fri, 21 Oct 2005 14:59:29 +0300 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
I think it is a mistake to put the `follow-link' property on text areas
that have no mouse-face=highlight. The `highlight' face is a good
warning that mouse-1 click will try to follow links, and a missing
`highlight' face indicates that it is always safe to click mouse-1
to relocate point.
If these assumptions are true, then the correct way to put follow-link
in *Occur* buffers is only on mouse-face properties like in the following
patch:
Index: lisp/replace.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/replace.el,v
retrieving revision 1.225
diff -c -r1.225 replace.el
*** lisp/replace.el 20 Oct 2005 16:53:10 -0000 1.225
--- lisp/replace.el 21 Oct 2005 11:57:59 -0000
***************
*** 694,699 ****
--- 694,700 ----
(defvar occur-mode-map
(let ((map (make-sparse-keymap)))
(define-key map [mouse-2] 'occur-mode-mouse-goto)
+ (define-key map [follow-link] 'mouse-face)
(define-key map "\C-c\C-c" 'occur-mode-goto-occurrence)
(define-key map "\C-m" 'occur-mode-goto-occurrence)
(define-key map "o" 'occur-mode-goto-occurrence-other-window)
***************
*** 1157,1164 ****
(insert "-------\n"))
(add-text-properties
beg end
! `(occur-target ,marker follow-link t
! help-echo "mouse-2: go to this
occurrence")))))
(goto-char endpt))
(if endpt
(progn
--- 1158,1164 ----
(insert "-------\n"))
(add-text-properties
beg end
! `(occur-target ,marker help-echo "mouse-2: go to
this occurrence")))))
(goto-char endpt))
(if endpt
(progn
--
Juri Linkov
http://www.jurta.org/emacs/