unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* follow-link not on mouse-face
@ 2005-10-21 11:59 Juri Linkov
  2005-10-21 13:39 ` Kim F. Storm
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Juri Linkov @ 2005-10-21 11:59 UTC (permalink / raw)


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/

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2005-10-27 18:22 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-21 11:59 follow-link not on mouse-face Juri Linkov
2005-10-21 13:39 ` Kim F. Storm
2005-10-21 13:47 ` Romain Francoise
2005-10-21 13:58 ` Romain Francoise
2005-10-21 16:02   ` Juri Linkov
2005-10-22  4:18     ` Richard M. Stallman
2005-10-22  5:23       ` Drew Adams
2005-10-23  4:42         ` Richard M. Stallman
2005-10-23  5:34           ` Drew Adams
2005-10-22 12:14     ` Romain Francoise
2005-10-23  4:42       ` Richard M. Stallman
2005-10-23  8:44         ` David Kastrup
2005-10-23 10:19         ` Romain Francoise
2005-10-24  1:00           ` Richard M. Stallman
2005-10-24  6:22             ` Romain Francoise
2005-10-24 23:43               ` Juri Linkov
2005-10-25  6:01                 ` Romain Francoise
2005-10-25 14:26                 ` Drew Adams
2005-10-25 15:57                   ` David Kastrup
2005-10-25 20:27                 ` Richard M. Stallman
2005-10-25 20:54                   ` Romain Francoise
2005-10-25 20:59                     ` Juri Linkov
2005-10-27  1:31                     ` Richard M. Stallman
2005-10-27 18:22                       ` Romain Francoise

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).