Commit graph

148 commits

Author SHA1 Message Date
Stefan Monnier
dee89b6708 * lisp/xt-mouse.el (xterm-mouse-translate-1): Intern drag event.
Remove also pointless window&mark manipulation.

Fixes: debbugs:17894
2014-07-08 14:47:47 -04:00
Stefan Monnier
854b22ea18 * lisp/xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal)
(turn-off-xterm-mouse-tracking-on-terminal): Don't burp if the terminal
is suspended.

Fixes: debbugs:17857
2014-07-01 12:10:02 -04:00
Glenn Morris
c400516ab1 Merge from emacs-24; up to 2014-06-06T02:22:40Z!monnier@iro.umontreal.ca 2014-06-21 12:45:59 -07:00
Stefan Monnier
bc2fb4fdad * lisp/xt-mouse.el (xterm-mouse-translate-1): Fix last change.
(xterm-mouse--read-event-sequence-1000): Drop unknown events instead of
burping.

Fixes: debbugs:17776
2014-06-18 18:02:15 -04:00
Stefan Monnier
fbd5cc6ca4 * lisp/mouse.el: Use the normal toplevel loop while dragging.
(mouse-set-point): Handle multi-clicks.
(mouse-set-region): Handle multi-clicks for drags.
(mouse-drag-region): Update call accordingly.
(mouse-drag-track): Remove `do-mouse-drag-region-post-process' hack.
Use the normal event loop instead of a local while/read-event loop.
(global-map): Remove redundant bindings for double/triple-mouse-1.
* lisp/xt-mouse.el (xterm-mouse-translate-1): Only process one event at a time.
Generate synthetic down events when the protocol only sends up events.
(xterm-mouse-last): Remove.
(xterm-mouse--read-event-sequence-1000): Use xterm-mouse-last-down
terminal parameter instead.
(xterm-mouse--set-click-count): New function.
(xterm-mouse-event): Detect/generate double/triple clicks.
* lisp/reveal.el (reveal-close-old-overlays): Don't close while dragging.
2014-05-11 01:49:14 -04:00
Glenn Morris
fb3f83f5fd Merge from emacs-24; up to 2014-05-08T03:34:20Z!rgm@gnu.org 2014-05-07 20:41:21 -07:00
Stefan Monnier
b406487f52 * lisp/xt-mouse.el: Drop spurious/oddly shaped events.
(xterm-mouse--read-event-sequence-1000): Return nil if something looks fishy.
(xterm-mouse-event): Propagate it.
(xterm-mouse-translate-1): Handle it.

Fixes: debbugs:17378
2014-05-07 21:46:15 -04:00
Stefan Monnier
c22f24f6ef * lisp/xt-mouse.el (xterm-mouse--read-event-sequence-1000):
Always store button numbers in the same way in xterm-mouse-last;
Don't burp is xterm-mouse-last is not set as expected.
Never return negative indices.

Fixes: debbugs:17378
2014-05-05 19:50:20 -04:00
Daniel Colascione
bfc3079068 2014-04-17 Daniel Colascione <dancol@dancol.org>
Add support for bracketed paste mode; add infrastructure for
	managing terminal mode enabling and disabling automatically.

	* xt-mouse.el:
	(xterm-mouse-mode): Simplify.
	(xterm-mouse-tracking-enable-sequence)
	(xterm-mouse-tracking-disable-sequence): New constants.
	(turn-on-xterm-mouse-tracking-on-terminal)
	(turn-off-xterm-mouse-tracking-on-terminal): Use
	tty-mode-set-strings and tty-mode-reset-strings terminal
	parameters instead of random hooks.
	(turn-on-xterm-mouse-tracking)
	(turn-off-xterm-mouse-tracking): Delete.

	* term/xterm.el (xterm-extra-capabilities): Fix bitrotted comment.
	(xterm-paste-ending-sequence): New constant.
	(xterm-paste): New command used for bracketed paste support.

	(xterm-modify-other-keys-terminal-list): Delete obsolete variable.
	(terminal-init-xterm-bracketed-paste-mode): New function.
	(terminal-init-xterm): Call it.
	(terminal-init-xterm-modify-other-keys): Use tty-mode-set-strings
	and tty-mode-reset-strings instead of random hooks.
	(xterm-turn-on-modify-other-keys)
	(xterm-turn-off-modify-other-keys)
	(xterm-remove-modify-other-keys): Delete obsolete functions.

	* term/screen.el: Rewrite to just use the xterm code.  Add
	copyright notice.  Mention tmux.
2014-04-17 00:54:23 -07:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Stefan Monnier
25c09217a0 * lisp/xt-mouse.el (xterm-mouse-event-read): Remove.
(xterm-mouse--read-event-sequence-1000)
(xterm-mouse--read-event-sequence-1006): Use read-event instead.
2013-03-10 22:56:18 -04:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Stefan Monnier
f5695c9afd Misc minor changes.
* lisp/xt-mouse.el (xterm-mouse-translate-1, xterm-mouse-event-read):
Use read-event since we don't really want to read chars but bytes.
* lisp/emacs-lisp/macroexp.el (macroexp-let2): Use more informative names
for uninterned vars.
2012-07-17 04:15:06 -04:00
Chong Yidong
63408057e7 * xt-mouse.el: Implement extended mouse coordinates.
(xterm-mouse-translate): Move code into xterm-mouse-translate-1.
(xterm-mouse-translate-extended, xterm-mouse-translate-1)
(xterm-mouse--read-event-sequence-1000)
(xterm-mouse--read-event-sequence-1006): New functions.  For old
mouse protocol, handle M-mouse-X events correctly.
(xterm-mouse-event): New arg specifying mouse protocol.
(turn-on-xterm-mouse-tracking-on-terminal)
(turn-off-xterm-mouse-tracking-on-terminal): Send DEC 1006
sequence to toggle extended coordinates on newer XTerms.  This
appears to be harmless on terminals which do not support this.

Fixes: debbugs:10642
2012-07-14 23:40:12 +08:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Chong Yidong
06e21633a4 Fix minor mode docstrings for the new meaning of a nil ARG.
* abbrev.el (abbrev-mode):
* allout.el (allout-mode):
* autoinsert.el (auto-insert-mode):
* autoarg.el (autoarg-mode, autoarg-kp-mode):
* autorevert.el (auto-revert-mode, auto-revert-tail-mode)
(global-auto-revert-mode):
* battery.el (display-battery-mode):
* composite.el (global-auto-composition-mode)
(auto-composition-mode):
* delsel.el (delete-selection-mode):
* desktop.el (desktop-save-mode):
* dired-x.el (dired-omit-mode):
* dirtrack.el (dirtrack-mode):
* doc-view.el (doc-view-minor-mode):
* double.el (double-mode):
* electric.el (electric-indent-mode, electric-pair-mode):
* emacs-lock.el (emacs-lock-mode):
* epa-hook.el (auto-encryption-mode):
* follow.el (follow-mode):
* font-core.el (font-lock-mode):
* frame.el (auto-raise-mode, auto-lower-mode, blink-cursor-mode):
* help.el (temp-buffer-resize-mode):
* hilit-chg.el (highlight-changes-mode)
(highlight-changes-visible-mode):
* hi-lock.el (hi-lock-mode):
* hl-line.el (hl-line-mode, global-hl-line-mode):
* icomplete.el (icomplete-mode):
* ido.el (ido-everywhere):
* image-file.el (auto-image-file-mode):
* image-mode.el (image-minor-mode):
* iswitchb.el (iswitchb-mode):
* jka-cmpr-hook.el (auto-compression-mode):
* linum.el (linum-mode):
* longlines.el (longlines-mode):
* master.el (master-mode):
* mb-depth.el (minibuffer-depth-indicate-mode):
* menu-bar.el (menu-bar-mode):
* minibuf-eldef.el (minibuffer-electric-default-mode):
* mouse-sel.el (mouse-sel-mode):
* msb.el (msb-mode):
* mwheel.el (mouse-wheel-mode):
* outline.el (outline-minor-mode):
* paren.el (show-paren-mode):
* recentf.el (recentf-mode):
* reveal.el (reveal-mode, global-reveal-mode):
* rfn-eshadow.el (file-name-shadow-mode):
* ruler-mode.el (ruler-mode):
* savehist.el (savehist-mode):
* scroll-all.el (scroll-all-mode):
* scroll-bar.el (scroll-bar-mode):
* server.el (server-mode):
* shell.el (shell-dirtrack-mode):
* simple.el (auto-fill-mode, transient-mark-mode)
(visual-line-mode, overwrite-mode, binary-overwrite-mode)
(line-number-mode, column-number-mode, size-indication-mode)
(auto-save-mode, normal-erase-is-backspace-mode, visible-mode):
* strokes.el (strokes-mode):
* time.el (display-time-mode):
* t-mouse.el (gpm-mouse-mode):
* tool-bar.el (tool-bar-mode):
* tooltip.el (tooltip-mode):
* type-break.el (type-break-mode-line-message-mode)
(type-break-query-mode):
* view.el (view-mode):
* whitespace.el (whitespace-mode, whitespace-newline-mode)
(global-whitespace-mode, global-whitespace-newline-mode):
* xt-mouse.el (xterm-mouse-mode): Doc fix.

* emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Fix
autogenerated docstring.
2011-10-19 08:54:24 -04:00
Chong Yidong
7be1c708c5 Merge from emacs-23 branch 2011-08-09 18:13:11 -04:00
Andreas Schwab
29bbcfa705 Fixes: debbugs:6594
* lisp/xt-mouse.el (xterm-mouse-event-read): Try to recover the raw
character.
2011-07-28 20:40:28 +02:00
Juanma Barranquero
06b605171f lisp/*.el: Lexical-binding cleanup. 2011-04-19 15:44:55 +02:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
0d9f702fd0 Nuke arch-tags. 2011-01-15 15:16:57 -08:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Jan D
243881ed13 * xt-mouse.el (xterm-mouse-event-read): Fix for characters > 127
now that unicode is used (Bug#6594).
2010-07-14 19:53:42 +02:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Dan Nicolaescu
393439a343 (turn-on-xterm-mouse-tracking-on-terminal)
(turn-off-xterm-mouse-tracking-on-terminal): Do not turn on the
mode on the initial terminal.
2009-02-05 07:12:27 +00:00
Glenn Morris
ae940284fa Add 2009 to copyright years. 2009-01-05 03:18:22 +00:00
Stefan Monnier
d63ddb2c67 (turn-on-xterm-mouse-tracking, turn-off-xterm-mouse-tracking):
Use terminal-list.
2008-06-10 21:56:13 +00:00
Glenn Morris
eb3fa2cfcf Switch to recommended form of GPLv3 permissions notice. 2008-05-06 08:06:51 +00:00
Stefan Monnier
146df84586 (xterm-mouse-mode): Use delete-terminal-functions.
(xterm-mouse-handle-delete-frame): Delete.
2008-03-29 02:15:56 +00:00
Andreas Schwab
318f2a46e0 (xterm-mouse-event): Avoid error with buttons > 5. 2008-03-24 09:28:05 +00:00
Miles Bader
59ce725a3b Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Glenn Morris
409cc4a3ea Add 2008 to copyright years. 2008-01-07 02:45:14 +00:00
Stefan Monnier
af020a0464 Don't change the global function-key-map anny more.
(xterm-mouse-mode): Use terminal-init-xterm-hook.  Don't use
after-make-frame-functions now that term/xterm.el calls us directly.
(turn-on-xterm-mouse-tracking, turn-off-xterm-mouse-tracking):
Use turn-*-xterm-mouse-tracking-on-terminal.  Only once per terminal.
(turn-on-xterm-mouse-tracking-on-terminal): Make param optional.
Setup input-decode-map and remember that xterm-mouse-mode was
enabled in this terminal.
(turn-off-xterm-mouse-tracking-on-terminal): Only disable on those
terminals where it has been enabled.
2007-10-18 19:06:44 +00:00
Dan Nicolaescu
23d4cba5c7 * xt-mouse.el (xterm-mouse-mode): Re-enable suspend-tty-functions.
* term.c (Fsuspend_tty): Run suspend-tty-functions before cleaning
up the tty state.
2007-09-21 20:19:10 +00:00
Dan Nicolaescu
9f596249ba Delete add-hook calls that were moved to
xterm-mouse-mode.
(xterm-mouse-mode): Disable resume-tty-functions, explain why it
does not work.
2007-09-17 06:54:23 +00:00
Dan Nicolaescu
b9451e8538 Delete add-hook calls that were moved to
xterm-mouse-mode.
2007-09-17 06:34:16 +00:00
Dan Nicolaescu
aaeefd66c5 * xt-mouse.el (xterm-mouse-mode): Add hooks here not at the top
level.  Remove the hooks when turning off the mode.

* term/xterm.el: Require xt-mouse at compile time.
(terminal-init-xterm): Turn on xterm mouse tracking for this
terminal if xterm-mouse-mode is enabled.
2007-09-15 00:27:38 +00:00
Dan Nicolaescu
e4019195fd * server.el (server-start, server-unload-hook): Undo previous
change.

* xt-mouse.el: Undo previous change.

* term.c (Vsuspend_tty_functions, Vresume_tty_functions)
(syms_of_term, Fsuspend_tty, Fresume_tty): Undo previous change.
2007-09-04 23:28:49 +00:00
Dan Nicolaescu
92cd6a7c40 * server.el (server-start, server-unload-hook):
suspend-tty-functions has been renamed to suspend-tty-hook.

* xt-mouse.el: Likewise. resume-tty-functions has been renamed to
resume-tty-hook.

* term.c (Vsuspend_tty_hook): Rename from Vsuspend_tty_functions.
(Vresume_tty_hook): Rename from Vresume_tty_functions.
(syms_of_term): Rename suspend-tty-functions to suspend-tty-hook
and resume-tty-function to resume-tty-hook.
(Fsuspend_tty, Fresume_tty): Use new names.
2007-09-04 15:44:11 +00:00
Miles Bader
aaf34461ff Merge from emacs--devo--0
Patches applied:

 * emacs--devo--0  (patch 846-851)

   - Update from CVS
   - Merge from emacs--rel--22

 * emacs--rel--22  (patch 88-92)

   - Update from CVS
   - Merge from gnus--rel--5.10

 * gnus--rel--5.10  (patch 242-244)

   - Update from CVS

Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-31
2007-08-13 13:51:08 +00:00
Miles Bader
37cc095b6a Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-851
2007-08-13 13:41:28 +00:00
Glenn Morris
4837b516ea Replace `iff' in doc-strings and comments. 2007-08-08 07:40:09 +00:00
Miles Bader
9899d01a0c Merge from emacs--devo--0
Patches applied:

 * emacs--devo--0  (patch 824-838)

   - Update from CVS
   - Merge from emacs--rel--22
   - Remove lisp/erc/erc-nicklist.el
   - Update some .arch-inventory files
   - Fix void function definition error in cus-edit.el
   - Restore lisp/emacs-lisp/cl-loaddefs.el

 * emacs--rel--22  (patch 70-83)

   - Update from CVS
   - Remove lisp/erc/erc-nicklist.el
   - Update some .arch-inventory files
   - Indicate that emacs--devo--0--patch-834 does not need to be applied
   - Merge from gnus--rel--5.10
   - Restore lisp/emacs-lisp/cl-loaddefs.el

 * gnus--rel--5.10  (patch 239-241)

   - Merge from emacs--devo--0
   - Update from CVS

Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-28
2007-07-31 05:50:45 +00:00
Miles Bader
9aecacd08a Merge from emacs--rel--22
Patches applied:

 * emacs--rel--22  (patch 70-73)

   - Update from CVS

2007-07-25  Glenn Morris  <rgm@gnu.org>

   * Relicense all FSF files to GPLv3 or later.

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-828
2007-07-26 05:28:10 +00:00
Glenn Morris
b4aa60262c Switch license to GPLv3 or later. 2007-07-25 04:50:21 +00:00
Miles Bader
34c6724464 Merge from emacs--devo--0
Patches applied:

 * emacs--devo--0  (patch 771-780)

   - Update from CVS
   - Merge from emacs--rel--22
   - Merge from emacs--rel--22, gnus--rel--5.10
   - Fix tq.el edge case

 * emacs--rel--22  (patch 26-32)

   - Update from CVS
   - lisp/vc-hooks.el (vc-find-root): Fix file attribute test

 * gnus--rel--5.10  (patch 224-225)

   - Merge from emacs--devo--0, emacs--rel--22
   - Update from CVS

Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-18
2007-05-30 14:44:47 +00:00
Stefan Monnier
816718041b (xterm-mouse-truncate-wrap): New function.
(xterm-mouse-event): Use it.
2007-05-25 15:05:39 +00:00
Stefan Monnier
6ab93c85b8 (xterm-mouse-truncate-wrap): New function.
(xterm-mouse-event): Use it.
2007-05-25 14:34:35 +00:00
Miles Bader
7be1c21aed Merged from emacs--devo--0
Patches applied:

 * emacs@sv.gnu.org/emacs--devo--0--patch-744
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-745
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-746
   Merge from emacs--rel--22

 * emacs@sv.gnu.org/emacs--devo--0--patch-747
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-748
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-749
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-750
   Merge from emacs--rel--22

 * emacs@sv.gnu.org/emacs--devo--0--patch-751
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-752
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-753
   Merge from emacs--rel--22

 * emacs@sv.gnu.org/emacs--devo--0--patch-754
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-755
   Merge from emacs--rel--22

 * emacs@sv.gnu.org/emacs--devo--0--patch-756
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-757
   Update from CVS: lisp/textmodes/sgml-mode.el: Revert last change.

 * emacs@sv.gnu.org/emacs--devo--0--patch-758
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-759
   Merge from emacs--rel--22

 * emacs@sv.gnu.org/emacs--devo--0--patch-760
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-761
   Update from CVS

 * emacs@sv.gnu.org/emacs--rel--22--patch-14
   Update from CVS

 * emacs@sv.gnu.org/emacs--rel--22--patch-15
   Update from CVS

 * emacs@sv.gnu.org/emacs--rel--22--patch-16
   Update from CVS: src/xterm.c (XTread_socket): Revert last change.

 * emacs@sv.gnu.org/emacs--rel--22--patch-17
   Update from CVS

 * emacs@sv.gnu.org/emacs--rel--22--patch-18
   Update from CVS

 * emacs@sv.gnu.org/emacs--rel--22--patch-19
   Update from CVS

 * emacs@sv.gnu.org/emacs--rel--22--patch-20
   Update from CVS

 * emacs@sv.gnu.org/emacs--rel--22--patch-21
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-221
   Update from CVS

Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-12
Creator:  Karoly Lorentey <karoly@lorentey.hu>
2007-05-20 23:29:14 +00:00
Nick Roberts
315c417c80 (xterm-mouse-debug-buffer): New variable.
(xterm-mouse-translate): Use it.
2007-05-12 09:39:06 +00:00