unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Subject: follow-link not on mouse-face
Date: Fri, 21 Oct 2005 14:59:29 +0300	[thread overview]
Message-ID: <87ll0n11ey.fsf@jurta.org> (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/

             reply	other threads:[~2005-10-21 11:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-21 11:59 Juri Linkov [this message]
2005-10-21 13:39 ` follow-link not on mouse-face 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

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ll0n11ey.fsf@jurta.org \
    --to=juri@jurta.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 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).