Mercurial > emacs
comparison lisp/mouse-sel.el @ 90043:e24e2e78deda
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-69
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-643
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-649
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-650
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-651
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-655
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-656
Update from CVS: lisp/man.el (Man-xref-normal-file): Fix help-echo.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-657
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-658
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-659
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-660
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-661
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-667
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-668
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-61
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-68
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 04 Nov 2004 08:55:40 +0000 |
parents | 0fe073a08cef 1d855c5b0242 |
children | 62afea0771d8 |
comparison
equal
deleted
inserted
replaced
90042:003d95404d71 | 90043:e24e2e78deda |
---|---|
1 ;;; mouse-sel.el --- multi-click selection support for Emacs 19 | 1 ;;; mouse-sel.el --- multi-click selection support for Emacs 19 |
2 | 2 |
3 ;; Copyright (C) 1993,1994,1995,2001,2002 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1993, 1994, 1995, 2001, 2002, 2004 |
4 ;; Free Software Foundation, Inc. | |
4 | 5 |
5 ;; Author: Mike Williams <mdub@bigfoot.com> | 6 ;; Author: Mike Williams <mdub@bigfoot.com> |
6 ;; Keywords: mouse | 7 ;; Keywords: mouse |
7 | 8 |
8 ;; This file is part of GNU Emacs. | 9 ;; This file is part of GNU Emacs. |
241 primary selection and region." | 242 primary selection and region." |
242 :global t | 243 :global t |
243 :group 'mouse-sel | 244 :group 'mouse-sel |
244 (if mouse-sel-mode | 245 (if mouse-sel-mode |
245 (progn | 246 (progn |
246 (add-hook 'x-lost-selection-hooks 'mouse-sel-lost-selection-hook) | 247 (add-hook 'x-lost-selection-functions 'mouse-sel-lost-selection-hook) |
247 (when mouse-sel-default-bindings | 248 (when mouse-sel-default-bindings |
248 ;; Save original bindings and replace them with new ones. | 249 ;; Save original bindings and replace them with new ones. |
249 (setq mouse-sel-original-bindings | 250 (setq mouse-sel-original-bindings |
250 (mapcar (lambda (binding) | 251 (mapcar (lambda (binding) |
251 (let ((event (car binding))) | 252 (let ((event (car binding))) |
261 (unless (eq mouse-sel-default-bindings 'interprogram-cut-paste) | 262 (unless (eq mouse-sel-default-bindings 'interprogram-cut-paste) |
262 (setq interprogram-cut-function nil | 263 (setq interprogram-cut-function nil |
263 interprogram-paste-function nil)))) | 264 interprogram-paste-function nil)))) |
264 | 265 |
265 ;; Restore original bindings | 266 ;; Restore original bindings |
266 (remove-hook 'x-lost-selection-hooks 'mouse-sel-lost-selection-hook) | 267 (remove-hook 'x-lost-selection-functions 'mouse-sel-lost-selection-hook) |
267 (dolist (binding mouse-sel-original-bindings) | 268 (dolist (binding mouse-sel-original-bindings) |
268 (global-set-key (car binding) (cdr binding))) | 269 (global-set-key (car binding) (cdr binding))) |
269 ;; Restore the old values of these variables, | 270 ;; Restore the old values of these variables, |
270 ;; only if they were actually saved previously. | 271 ;; only if they were actually saved previously. |
271 (if mouse-sel-has-been-enabled | 272 (if mouse-sel-has-been-enabled |
710 (let ((overlay (mouse-sel-selection-overlay selection))) | 711 (let ((overlay (mouse-sel-selection-overlay selection))) |
711 (delete-overlay overlay))) | 712 (delete-overlay overlay))) |
712 | 713 |
713 (provide 'mouse-sel) | 714 (provide 'mouse-sel) |
714 | 715 |
715 ;;; arch-tag: 86e6c73f-deaa-48d3-a24e-c565fda1f7d7 | 716 ;; arch-tag: 86e6c73f-deaa-48d3-a24e-c565fda1f7d7 |
716 ;;; mouse-sel.el ends here | 717 ;;; mouse-sel.el ends here |