aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2004-12-17 15:19:33 +0000
committerKim F. Storm2004-12-17 15:19:33 +0000
commitc44edf72cd01cb86d5527a9ba09860459aeba1e5 (patch)
tree1d6815b3fb608330f3ffa797a7d552f1dd3e32f8
parent0ac804df7985219cf795d11fc8a5cc760619f787 (diff)
downloademacs-c44edf72cd01cb86d5527a9ba09860459aeba1e5.tar.gz
emacs-c44edf72cd01cb86d5527a9ba09860459aeba1e5.zip
Implement context-sentitive dual behaviour for mouse-1 click.
-rw-r--r--etc/NEWS33
-rw-r--r--lisp/ChangeLog38
-rw-r--r--lisp/gnus/ChangeLog8
3 files changed, 78 insertions, 1 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 21895dd1d63..1ac6aba6de5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -98,6 +98,35 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types.
98 98
99* Changes in Emacs 21.4 99* Changes in Emacs 21.4
100 100
101** You can now follow links by clicking mouse-1 on the link.
102
103Traditionally, Emacs uses a mouse-1 click to set point and a mouse-2
104click to follow a link, whereas most other applications use a mouse-1
105click for both purposes, depending on whether you click outside or
106inside a link. With release 21.4, the behaviour of a mouse-1 click
107has been changed to match this context-sentitive dual behaviour.
108
109Depending on the current mode, a mouse-2 click in Emacs may do much
110more than just follow a link, so the new mouse-1 behaviour is only
111activated for modes which explicitly mark a clickable text as a "link"
112(see the new function `mouse-on-link-p' for details). The lisp
113packages that are included in release 21.4 have been adapted to do
114this, but external packages may not yet support this. However, there
115is no risk in using such packages, as the worst thing that could
116happen is that you get the original mouse-1 behaviour when you click
117on a link, which typically means that you set point where you click.
118
119If you want to get the original mouse-1 action also inside a link, you
120just need to press the mouse-1 button a little longer than a normal
121click (i.e. press and hold the mouse-1 button for half a second before
122you release it).
123
124Dragging the mouse-1 inside a link still performs the original
125drag-mouse-1 action, typically copy the text.
126
127You can customize the new mouse-1 behaviour via the new user option
128`mouse-1-click-follows-link'.
129
101** line-move-ignore-invisible now defaults to t. 130** line-move-ignore-invisible now defaults to t.
102 131
103** In Outline mode, hide-body no longer hides lines at the top 132** In Outline mode, hide-body no longer hides lines at the top
@@ -2372,6 +2401,10 @@ configuration files.
2372 2401
2373* Lisp Changes in Emacs 21.4 2402* Lisp Changes in Emacs 21.4
2374 2403
2404** Lisp code can now test if a given buffer position is inside a
2405clickable link with the new function `mouse-on-link-p'. This is the
2406function used by the new `mouse-1-click-follows-link' functionality.
2407
2375** (while-no-input BODY...) runs BODY, but only so long as no input 2408** (while-no-input BODY...) runs BODY, but only so long as no input
2376arrives. If the user types or clicks anything, BODY stops as if a 2409arrives. If the user types or clicks anything, BODY stops as if a
2377quit had occurred. while-no-input returns the value of BODY, if BODY 2410quit had occurred. while-no-input returns the value of BODY, if BODY
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7e19ddff5d7..e973b48e814 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,41 @@
12004-12-17 Kim F. Storm <storm@cua.dk>
2
3 * mouse.el (mouse-1-click-follows-link): New defcustom.
4 (mouse-on-link-p): New function.
5 (mouse-drag-region-1): Implement mouse-1-click-follows-link
6 functionality. Map a mouse-1 click event into a mouse-2 (or
7 other) event when position is inside a link.
8
9 * tooltip.el (tooltip-show-help-function): Replace "mouse-2"
10 prefix in tooltip text with "mouse-1" when this is a link
11 recognized by mouse-1-click-follows-link functionality.
12
13 * help.el (describe-key): Report effective and original binding
14 for mouse-1 when clicked on a link.
15 (describe-mode): Add follow-link property to "minor-mode" button.
16
17 * help-fns.el (describe-variable): Add follow-link property to
18 "below" button.
19
20 * help-mode.el (help-xref): Add follow-link property.
21
22 * apropos.el (apropos-symbol, apropos-function, apropos-macro)
23 (apropos-command, apropos-variable, apropos-face, apropos-group)
24 (apropos-widget, apropos-plist): Add follow-link property.
25
26 * pcvs-defs.el (cvs-mode-map): Map follow-link to a function which
27 checks if position is in a filename, rather than some other
28 clickable item. Function looks for cvs-filename-face at position.
29
30 * wid-edit.el (widget-specify-field, widget-specify-button):
31 Map a :follow-link keyword into a follow-link property.
32 (link): Add :follow-link keyword, map to RET binding.
33
34 * dired.el (dired-mode-map): Map follow-link to mouse-face.
35
36 * progmodes/compile.el (compilation-minor-mode-map)
37 (compilation-button-map, compilation-mode-map): Likewise.
38
12004-12-17 Thien-Thi Nguyen <ttn@gnu.org> 392004-12-17 Thien-Thi Nguyen <ttn@gnu.org>
2 40
3 * play/zone.el (zone): Init `line-spacing' from orig buffer. 41 * play/zone.el (zone): Init `line-spacing' from orig buffer.
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 518a9903085..bb7b8337f4c 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,9 @@
12004-12-17 Kim F. Storm <storm@cua.dk>
2
3 * gnus-group.el (gnus-group-mode-map): Map follow-link to mouse-face.
4
5 * gnus-sum.el (gnus-summary-mode-map): Likewise.
6
12004-12-08 Stefan Monnier <monnier@iro.umontreal.ca> 72004-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * gnus-art.el (gnus-narrow-to-page): Don't hardcode point-min. 9 * gnus-art.el (gnus-narrow-to-page): Don't hardcode point-min.
@@ -905,7 +911,7 @@
905 * gnus-delay.el (gnus-delay-default-hour): Add :version. 911 * gnus-delay.el (gnus-delay-default-hour): Add :version.
906 912
907 * gnus-cite.el (gnus-cite-blank-line-after-header) 913 * gnus-cite.el (gnus-cite-blank-line-after-header)
908 (gnus-article-boring-faces): 914 (gnus-article-boring-faces):
909 915
910 * gnus-art.el (gnus-buttonized-mime-types) 916 * gnus-art.el (gnus-buttonized-mime-types)
911 (gnus-inhibit-mime-unbuttonizing) 917 (gnus-inhibit-mime-unbuttonizing)