1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-16 10:50:49 -08:00
Commit graph

419 commits

Author SHA1 Message Date
Chong Yidong
7178e7222c Backport 2012-06-23T12:54:59Z!cyd@gnu.org from trunk 2012-08-07 11:24:52 +08:00
Chong Yidong
de655540a9 Backport 2012-06-23T12:48:24Z!cyd@gnu.org from trunk 2012-08-07 11:24:35 +08:00
Chong Yidong
971635eeb9 Backport fix for Bug#11989 from trunk.
* mouse.el (mouse-drag-track): Do not set the mark if the user
releases the mouse without selecting anything.
2012-07-25 14:14:30 +08:00
Martin Rudalics
41cfe0cb4c Fix resizing of minibuffer windows (Bug#11276).
* window.el (adjust-window-trailing-edge, enlarge-window)
(shrink-window, window-resize):
* mouse.el (mouse-drag-line): Fix resizing of minibuffer
windows (Bug#11276).
2012-04-20 10:49:24 +02:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Paul Eggert
22bcf20469 Spelling fixes. 2011-12-30 17:27:15 -08:00
Chong Yidong
e1eb5385bb * lisp/mouse.el (mouse-yank-primary): Push the mark.
Fixes: debbugs:9894
2011-10-29 14:09:02 +08:00
Martin Rudalics
53ebff1ff0 In mouse-drag-line correctly use window-in-direction. 2011-10-22 19:06:13 +02:00
Martin Rudalics
42ee24ed38 Fix minibuffer resizing.
* mouse.el (mouse-drag-line): Fix minibuffer resizing broken by
last change.
2011-10-22 11:43:09 +02:00
Martin Rudalics
e07b9a6d33 Fix and improve mouse-dragging of horizontal/vertical lines.
* mouse.el (mouse-drag-window-above)
(mouse-drag-move-window-bottom, mouse-drag-move-window-top)
(mouse-drag-mode-line-1, mouse-drag-header-line)
(mouse-drag-vertical-line-rightward-window): Remove.
(mouse-drag-line): New function.
(mouse-drag-mode-line, mouse-drag-header-line)
(mouse-drag-vertical-line): Call mouse-drag-line.
* window.el (window-at-side-p, windows-at-side): New functions.
2011-10-21 11:15:32 +02:00
Stefan Monnier
984889776c * lisp/mouse.el (mouse-drag-mode-line-1): Modify the end-event we pushed on
unread-command-events rather than pushing yet-another event.
2011-10-14 14:36:33 -04:00
Chong Yidong
371d6a6146 * mouse.el (mouse-drag-track): Set scroll-margin to 0 while tracking.
Fixes: debbugs:9541
2011-09-24 14:38:20 -04:00
Lars Magne Ingebrigtsen
43f5740b71 mouse-set-region doc fix
* mouse.el (mouse-set-region): Link to `mouse-drag-copy-region' in
the doc string (bug#7015).
2011-07-14 16:01:16 +02:00
Stefan Monnier
fe3f64d575 * lisp/mouse.el (mouse--strip-first-event): New function.
(function-key-map): Use it to map fringe clicks to normal clicks by default.
2011-07-01 13:58:14 -04:00
Stefan Monnier
fd6fa53f88 * lisp/minibuffer.el (minibuffer-inactive-mode-map): New var.
(minibuffer-inactive-mode): New major mode.
* src/minibuf.c (get_minibuffer, read_minibuf_unwind): Call it.
* lisp/mouse.el (mouse-drag-region): Remove the "mouse-1 pops up
the *Messages* buffer" hack.
(mouse-popup-menubar): Don't burp if the event is a normal key.
2011-06-01 12:34:41 -03:00
Glenn Morris
4ffd0d6b56 Merge from emacs-23; up to 2010-06-09T17:54:28Z!albinus@detlef. 2011-04-22 20:07:16 -07:00
Chong Yidong
3ad8bad038 Handle deferred `event-kind' property when using unread-command-events.
* src/mouse.el (mouse-drag-mode-line-1): Make sure that if we push
mouse-2 into unread-command-events, it is interpreted correctly.
2011-04-09 22:10:52 -04:00
Sam Steingold
7bc61bb7bf * lisp/mouse.el (mouse-buffer-menu-mode-groups): Add a "GDB" group. 2011-02-04 09:54:13 -05:00
Sam Steingold
e8e4d5c88e undo 2011-02-01T18:15:18Z!sds@gnu.org (purecopy-cons, purecopy-car) at Stefan Monnier's request 2011-02-01 16:37:12 -05:00
Sam Steingold
0b75349e7e * lisp/subr.el (purecopy-cons, purecopy-car): Add shortcuts.
* lisp/faces.el (face-x-resources): Use `purecopy-cons'.
* lisp/files.el (auto-mode-alist, interpreter-mode-alist): Use
`purecopy-car'.
* lisp/international/fontset.el (font-encoding-alist): Ditto.
* lisp/international/mule-conf.el (file-coding-system-alist): Ditto.
* lisp/international/mule.el (auto-coding-alist)
(auto-coding-regexp-alist): Ditto.
* lisp/mouse.el (mouse-buffer-menu-mode-groups): Use `purecopy-cons'.
* lisp/term/x-win.el (x-gtk-stock-map): Ditto.
2011-02-01 13:15:18 -05:00
Chong Yidong
14beddf471 Merge changes from emacs-23 branch 2011-01-31 18:54:50 -05:00
Chong Yidong
d1f14baa30 * mouse.el (mouse-menu-non-singleton): Doc fix (Bug#7801). 2011-01-28 12:18:54 -05:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Eli Zaretskii
e77714da30 Fix bug #7699 with pasting selected text on MS-Windows.
mouse.el (mouse-yank-primary): On MS-Windows, try the (emulated)
 PRIMARY first, then the clipboard.
2010-12-25 12:57:02 +02:00
Stefan Monnier
f49d1f52b2 Merge from emacs-23 2010-12-13 10:27:36 -05:00
Glenn Morris
d5e6e0b6df mouse.el fix for bug#7586.
* lisp/mouse.el (mouse-menu-major-mode-map, mouse-menu-bar-map):
Run hooks to update menu contents.
2010-12-07 19:32:31 -08:00
Jan Djärv
e06918d22b * mouse.el (mouse-yank-primary): Update comment (Bug#6802). 2010-11-05 13:11:12 +01:00
YAMAMOTO Mitsuharu
00d9e115db Backport Bug#6765 fix from trunk.
* mouse.el (mouse-fixup-help-message): Match "mouse-2" only at the
beginning of the string.  Use `string-match-p'.  (Bug#6765)
2010-11-04 15:27:46 -04:00
Glenn Morris
3226d6cacf Remove some functions, variables and aliases obsolete since at least 21.1.
* doc/misc/misc.texi (Shell Mode): Remove reference to old function name.

* src/character.c (Fchar_bytes): Remove obsolete function.
(syms_of_character): Remove Schar_bytes.
* lisp/subr.el (char-bytes): Remove obsolete function.

* lisp/emacs-lisp/checkdoc.el (checkdoc-minor-keymap): Remove obsolete alias.

* lisp/isearch.el (isearch-return-char): Remove obsolete function.

* lisp/mouse.el: No longer provide mldrag.
(mldrag-drag-mode-line, mldrag-drag-vertical-line):
Remove obsolete aliases.

* lisp/comint.el (comint-kill-output): Remove obsolete alias.

* lisp/shell.el: Comment fix.

* lisp/composite.el (decompose-composite-char): Remove obsolete function.
* lisp/ps-def.el (decompose-composite-char): Remove unused function.

* lisp/iswitchb.el (iswitchb-default-keybindings): Remove obsolete function.

* lisp/outline.el (outline-visible): Remove obsolete function.

* lisp/term/pc-win.el (x-frob-font-slant, x-frob-font-weight):
* lisp/faces.el (internal-find-face, internal-get-face)
(frame-update-faces, frame-update-face-colors)
(x-frob-font-weight, x-frob-font-slant)
(internal-frob-font-weight, internal-frob-font-slant)
(x-make-font-bold, x-make-font-demibold, x-make-font-unbold)
(x-make-font-italic, x-make-font-oblique, x-make-font-unitalic)
(x-make-font-bold-italic): Remove functions and aliases, obsolete
since Emacs 21.1.
* lisp/emulation/viper-util.el (viper-get-face):
* lisp/obsolete/lucid.el (find-face, get-face): Use facep.
* lisp/vc/ediff-init.el (ediff-valid-color-p, ediff-get-face):
Remove unused functions.
* lisp/vc/ediff-util.el (ediff-submit-report): Doc fix.

* etc/NEWS: Mention above changes.
2010-10-01 19:46:13 -07:00
David De La Harpe Golden
93d68d4f02 Respect mouse-drag-copy-region upon mouse-3 region adjustment.
* mouse.el (mouse-save-then-kill): Save region to kill-ring when
mouse-drag-copy-region is non-nil (Bug#6956).
2010-09-05 23:40:57 +01:00
Chong Yidong
bd78fa1d54 Add "Package:" file headers to denote built-in packages. 2010-08-29 12:17:13 -04:00
Chong Yidong
1c409d0b96 Avoid clobbering primary selection when switching frames (Bug#6872).
* lisp/mouse.el (mouse-yank-primary): Avoid setting primary when
deactivating the mark (Bug#6872).

* src/keyboard.c (command_loop_1): Don't set primary selection during
handle-switch-frame (Bug#6872).
2010-08-24 11:48:14 -04:00
Chong Yidong
d2625c3ded Cleanups and fixes for mouse-save-then-kill and mouse-secondary-save-then-kill.
* mouse.el (mouse-save-then-kill): Don't save region to kill ring
when extending it.  Before killing on the second click, check if
the buffer is the correct one.  Doc fix.
(mouse-secondary-save-then-kill): Allow usage without first
calling mouse-start-secondary, by defaulting to point.  Don't save
an empty secondary selection.  Doc fix.
2010-08-21 00:46:23 -04:00
Chong Yidong
6d3e82d2d6 Fix mouse dragging of words and lines (Bug#6840).
* mouse.el (mouse--drag-set-mark-and-point): New function.
(mouse-drag-track): Use LOCATION arg to push-mark.  Use
mouse--drag-set-mark-and-point to take click-count into
consideration when updating point and mark (Bug#6840).
2010-08-15 22:08:01 -04:00
Eli Zaretskii
e7afcf30cd Fix bug #6689 with mouse-2 pasting on Windows.
mouse.el (mouse-yank-primary): On MS-Windows and MS-DOS, call
 x-get-selection-value in preference to x-get-selection.
2010-08-14 18:41:22 +03:00
Chong Yidong
7adf5fdcb8 Fix 2010-07-03 change to mouse-drag-track.
* mouse.el (mouse-drag-track): Remove accidentally-removed check
for `double' value of mouse-1-click-follows-link (Bug#6807).
2010-08-08 17:57:34 -04:00
Chong Yidong
9852377f78 Change `select-active-region' mechanics.
Save region text prior to buffer modification.
Set window selection lazily, during `deactivate-mark' or after each
command when the region is temporarily active.

* lisp/cus-start.el: Add custom declaration for select-active-regions.

* lisp/mouse.el (mouse-drag-track): Remove hacks to deal with old
select-active-regions implementation.
(mouse-yank-at-click): Doc fix.

* lisp/simple.el (select-active-regions): Move to keyboard.c.
(deactivate-mark): Used saved-region-selection.
(select-active-region): Function removed.
(activate-mark, set-mark, push-mark-command)
(handle-shift-selection): Don't call it.
(keyboard-quit): Avoid adding the region to the window selection.

* src/insdel.c (prepare_to_modify_buffer): Save active region text to
Vsaved_region_selection.

* src/keyboard.c (Vselect_active_regions): Move from simple.el.
(Vsaved_region_selection, Qx_set_selection, QPRIMARY, Qlazy): New
vars.
(command_loop_1): Set window selection prior to deactivating the
mark.

* src/xselect.c (QPRIMARY): Move to keyboard.c.
2010-08-07 15:39:04 -04:00
YAMAMOTO Mitsuharu
26ee77a613 mouse.el: Match "mouse-2" at the beginning of the string. (Bug#6765) 2010-08-01 18:48:15 +02:00
Chong Yidong
1604140125 Adapt mouse-3 behavior to recent selection changes (Bug#6701).
* lisp/mouse.el (mouse-save-then-kill): Doc fix.  Deactivate mark
before killing to preserve the primary selection.

* lisp/term/x-win.el (x-select-text): Doc fix.

* src/xselect.c (x_own_selection): Use list4.
2010-07-31 17:26:56 -04:00
Sam Steingold
aa2d4bd343 * lisp/mouse.el (mouse-yank-primary, mouse-yank-secondary):
Do not call `x-get-selection' the second time, reuse the value.
2010-07-26 15:05:47 -04:00
Chong Yidong
91023c68af Revert 2010-07-14 change to deactivate mark; minor cleanups.
* mouse.el (mouse-drag-track): Use select-active-region.

* simple.el (select-active-region): New function.
(push-mark-command, set-mark, activate-mark)
(handle-shift-selection): Use it.
(deactivate-mark): Don't check for size of region.
2010-07-17 16:21:51 -04:00
Chong Yidong
2490cbbcb7 Change x-select-enable-primary to nil.
* lisp/mouse.el (mouse-drag-copy-region):
* lisp/simple.el (select-active-regions): Likewise.

* lisp/term/x-win.el (x-select-enable-primary): Change default to nil.
(x-select-enable-clipboard): Add :version keyword.
2010-07-16 22:49:48 -04:00
Chong Yidong
f9d71b4284 Change clipboard/primary selection to X application standards.
* lisp/menu-bar.el (menu-bar-enable-clipboard): Don't overwrite
Cut/Copy/Paste menu bar items.

* lisp/mouse.el: Bind mouse-2 to mouse-yank-primary.
(mouse-drag-copy-region): Default to nil.

* lisp/simple.el (select-active-regions): Default to t.
(push-mark-command): Don't overwrite primary with empty string.

* lisp/term/x-win.el (x-select-enable-clipboard): Default to t.
(x-initialize-window-system): Don't overwrite Paste menu item.
2010-07-14 14:03:39 -04:00
Chong Yidong
f479ef6e6f * mouse.el (mouse-drag-track): Handle select-active-regions (Bug#6612). 2010-07-11 18:14:53 -04:00
Chong Yidong
2ec1b5ee34 Merge changes from emacs-23 branch. 2010-07-10 14:52:53 -04:00
Chong Yidong
e8579ebc15 Minor fix to describe-key, and a docstring.
* help.el (describe-key): Print up-event using key-description.

* mouse.el (mouse-appearance-menu): Add docstring.
2010-07-06 15:42:46 -04:00
Chong Yidong
81133808b8 Fix multi-click selection behavior (Bug#6565).
* lisp/mouse.el (mouse-drag-track): Call mouse-start-end to handle
word/line selection (Bug#6565).
2010-07-05 12:42:50 -04:00
Chong Yidong
5592c08fbf Simplify mouse-dragging implementation.
Now that DEL deletes active regions, we can handle it by using the
ordinary region instead of a separate overlay.

* mouse.el (mouse-drag-overlay): Variable deleted.
(mouse-move-drag-overlay, mouse-show-mark): Functions deleted.
(mouse--remap-link-click-p): New function.
(mouse-drag-track): Handle dragging by using temporary Transient
Mark mode, instead of a special overlay.
(mouse-kill-ring-save, mouse-save-then-kill): Don't call
mouse-show-mark.

* mouse-sel.el (mouse-sel-selection-alist): mouse-drag-overlay
deleted.
2010-07-02 23:07:48 -04:00