From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Olaf Rogalsky Newsgroups: gmane.emacs.bugs Subject: bug#29552: 27.0.50; [PATCH]: improved xterm mouse support Date: Mon, 04 Dec 2017 01:08:01 +0100 Message-ID: <874lp75pe3.fsf@aol.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1512346158 26579 195.159.176.226 (4 Dec 2017 00:09:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 4 Dec 2017 00:09:18 +0000 (UTC) To: 29552@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 04 01:09:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLeJr-0006Sj-AA for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Dec 2017 01:09:11 +0100 Original-Received: from localhost ([::1]:40605 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLeJw-0006tT-Lu for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Dec 2017 19:09:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLeJn-0006tB-RD for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 19:09:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLeJi-0008QN-Jv for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 19:09:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35302) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eLeJi-0008QH-FI for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 19:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eLeJi-0007Tv-9l for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 19:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Olaf Rogalsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Dec 2017 00:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29552 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.151234610528713 (code B ref -1); Mon, 04 Dec 2017 00:09:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Dec 2017 00:08:25 +0000 Original-Received: from localhost ([127.0.0.1]:43983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLeJ7-0007T3-2C for submit@debbugs.gnu.org; Sun, 03 Dec 2017 19:08:25 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLeJ4-0007Sp-L8 for submit@debbugs.gnu.org; Sun, 03 Dec 2017 19:08:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLeIw-0008E9-U9 for submit@debbugs.gnu.org; Sun, 03 Dec 2017 19:08:17 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:33557) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eLeIw-0008E5-QK for submit@debbugs.gnu.org; Sun, 03 Dec 2017 19:08:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLeIu-0006jC-2S for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 19:08:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLeIp-0008CB-0V for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 19:08:12 -0500 Original-Received: from mailout11.t-online.de ([194.25.134.85]:43712) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eLeIo-0008BV-Lq for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 19:08:06 -0500 Original-Received: from fwd20.aul.t-online.de (fwd20.aul.t-online.de [172.20.26.140]) by mailout11.t-online.de (Postfix) with SMTP id 93BDA42791B1 for ; Mon, 4 Dec 2017 01:08:03 +0100 (CET) Original-Received: from blaubaer (GobItuZOZh3z1B3sn19HAREzjCr7fLwXtmrax0u3An0KXKI79DVqeLDO-uTMGb5wy5@[84.57.183.159]) by fwd20.t-online.de with (TLSv1.2:DHE-RSA-AES256-SHA256 encrypted) esmtp id 1eLeIk-2dQH5c0; Mon, 4 Dec 2017 01:08:02 +0100 X-ID: GobItuZOZh3z1B3sn19HAREzjCr7fLwXtmrax0u3An0KXKI79DVqeLDO-uTMGb5wy5 X-TOI-MSGID: 31e1eb63-6f28-4a85-8775-5d7344d69fa7 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140660 Archived-At: Hi, as a follow up to bug#29104, I try to improve on the following two limitations of xterm-mouse-mode. 1. Clicks on the menubar only work partialy: they open up the left-most menu-bar item. After that one has to use the keyboard controls in order to navigate through the menus. 2. There is no highlighting of text with mouse-face property, when the mouse pointer is moved over those texts. With this patch selection of menus with the mouse and highlighting of text with mouse-face properties work as expected. For a demonstration of the new features, please follow this URL: https://youtu.be/1pp85OshsoA. This patch enables the `any-event tracking mode' of xterm: Whenever the mouse pointer is moved to a new character cell, an mouse-motion event is generated. This works at least since xterm-289 and since gnome-terminal 3.6.2 (both from 2013). Version 2.13.3 of the Konsole (KDE) application just ignores the enabling escape sequence of `any-event tracking mode'. I haven't tested newer versions of Konsole, but it is very likely, that they work. In the rest of this message, I will give some additional explanations to most of the hunks. Regards, Olaf 1. menu-bar.el @@ -2460,6 +2460,31 The new function `tty-menu-bar-open-with-mouse' takes a mouse event parameter and opens the menu-bar menu at the corresponding postion. The similar function `menu-bar-open' has no event parameter as argument and is therefore not suitable for mouse clicks. 2. xt-mouse.el @@ -67,6 +67,21 This hunk notifies the display engine, that we received a mouse event from the terminal. Here I have to convert x/y coordinates from beeing "window-relative" to "frame-relative". The actual work of displaying and updating menus and highlighting of text is already present in the display engine and was introduced with GPM mouse support -- I piggy-pack on this. 3. xt-mouse.el @@ -76,7 +91,10 Conform to the elisp manual and only generate mouse-movement events, when track-mouse is non-nil. 4. xt-mouse.el @@ -147,6 +165,14 Make "any-event tracking" of the mouse optional, since it might be annoying on a slow link. 5. xt-mouse.el @@ -322,7 +348,12 Define a minor mode key binding for mouse clicks on the menu-bar. 6. xt-mouse.el @@ -422,7 +465,8 Add the `any-event mouse tracking' enabling escape sequence to the terminal initialization. 7. keyboard.c @@ -652,6 +652,19 This hunk is not stricly neccessary. But without it, the vector `this_command_keys' can grow infinitely, when `track-mouse' is non-nil. In a series of mouse-movement events, I keep only the first and last one. 8. term.c @@ -793,8 +793,6 term.c @@ -851,7 +849,6 term.c @@ -2371,9 +2368,7 term.c @@ -2387,7 +2382,7 term.c @@ -2421,6 +2416,7 xdisp.c @@ -29568,9 +29568,7 Since this patch makes use of `tty_write_glyphs_with_face' and `tty_draw_row_with_mouse_face', which are otherwise only used by GPM, I make them generally available by taking them out of '#ifdef HAVE_GPM'. 9. term.c @@ -2798,12 +2796,17 The last seen xterm mouse x/y position is stored in terminal parameters. If the current terminal has enabled `xterm-mouse-mode', use that position. 10. xdisp.c @@ -31571,6 +31569,31 A lisp-ified version of note_mouse_highlight to be called from xterm-mouse-mode.el. This is the major entry point for all updates of the display engine. diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 972f84ee6c..0c40c4ba12 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -2460,6 +2460,31 @@ tty-menu--initial-menu-x =20 This is meant to be used only for debugging TTY menus.") =20 +(defun tty-menu-bar-open-with-mouse (event) + "Opens menu-bar menu on a TTY frame. + +If EVENT is a mouse-click on the menu-bar of a TTY frame, drop +down the corresponding menu." + (interactive "e") + (let* ((pos (event-start event)) + (frame (posn-window pos)) + (area (posn-area pos)) + (x (car (posn-x-y pos))) + (menu (menu-bar-menu-at-x-y x 0 frame))) + ;; Find first column of clicked menu-bar item. There must be a + ;; smarter way ... + (while (and (>=3D x 0) + (eq menu (menu-bar-menu-at-x-y (1- x) 0 frame))) + (setq x (1- x))) + (popup-menu (or + (lookup-key-ignore-too-long + global-map (vector 'menu-bar menu)) + (lookup-key-ignore-too-long + (current-local-map) (vector 'menu-bar menu)) + (cdar (minor-mode-key-binding (vector 'menu-bar menu))) + (mouse-menu-bar-map)) + (posn-at-x-y x 0 nil t) nil t))) + (defun menu-bar-open (&optional frame) "Start key navigation of the menu bar in FRAME. =20 @@ -2584,6 +2609,8 @@ tty-menu-navigation-map (define-key map [C-down-mouse-2] 'tty-menu-ignore) (define-key map [C-down-mouse-3] 'tty-menu-ignore) (define-key map [mouse-movement] 'tty-menu-mouse-movement) + ;; Do not deselect menu, when mouse is hovering over the menu-bar. + (define-key map [menu-bar mouse-movement] 'tty-menu-mouse-movement) map) "Keymap used while processing TTY menus.") =20 diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index d704cfa4e8..b1ecbb41d3 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -67,6 +67,21 @@ xterm-mouse-translate-1 ;; the value 'mouse-click. (when ev-command (put ev-command 'event-kind 'mouse-click)) =20 + ;; notify display engine to (de)highlight text with mouse-face + ;; property + (when ev-data + (let* ((window (posn-window ev-data)) + (x (+ (car (posn-x-y ev-data)) + (car (window-edges window)))) + (y (+ (cdr (posn-x-y ev-data)) + (cadr (window-edges window))))) + (and (with-current-buffer (window-buffer window) + header-line-format) + (not (eq ev-where 'mode-line)) + (not (eq ev-where 'header-line)) + (setq y (1+ y))) + (note-mouse-highlight (window-frame window) x y))) + (cond ((null event) nil) ;Unknown/bogus byte sequence! (is-down @@ -76,7 +91,10 @@ xterm-mouse-translate-1 ;; to guard against that. (copy-sequence event)) vec) - (is-move vec) + (is-move + (if track-mouse + vec + [])) (t (let* ((down (terminal-parameter nil 'xterm-mouse-last-down)) (down-data (nth 1 down)) @@ -147,6 +165,14 @@ xterm-mouse-utf-8 :risky t :group 'xterm) =20 +(defcustom xterm-mouse-highlight t + "Non-nil enables display of help-echo properties and +mouse-face highlighting for text under the mouse." + :version "27.1" + :type 'boolean + :risky t + :group 'xterm) + (defun xterm-mouse--read-coordinate () "Read a mouse coordinate from the current terminal. If `xterm-mouse-utf-8' was non-nil when @@ -266,8 +292,8 @@ xterm-mouse-event (left (nth 0 ltrb)) (top (nth 1 ltrb)) (posn (if w - (posn-at-x-y (- x left) (- y top) w t) - (append (list nil 'menu-bar) + (posn-at-x-y (- x left) (- y top) w t) + (append (list nil 'menu-bar) (nthcdr 2 (posn-at-x-y x y))))) (event (list type posn))) (setcar (nthcdr 3 posn) timestamp) @@ -322,7 +348,12 @@ xterm-mouse-mode single clicks are supported. When turned on, the normal xterm mouse functionality for such clicks is still available by holding down the SHIFT key while pressing the mouse button." - :global t :group 'mouse + :global t + :group 'mouse + :keymap (let ((map (make-sparse-keymap))) + (define-key map [menu-bar mouse-1] + 'tty-menu-bar-open-with-mouse) + map) (funcall (if xterm-mouse-mode 'add-hook 'remove-hook) 'terminal-init-xterm-hook 'turn-on-xterm-mouse-tracking-on-terminal) @@ -350,6 +381,12 @@ xterm-mouse-tracking-enable-sequence \"\\e[?1002h\" \"Mouse motion mode\": Enables reports for mouse motion events during dragging operations. =20 +\"\\e[?1003h\" \"Any event tracking mode\": Enables reports for + all mouse events. In particular all mouse motion + events will be reported and not only those during + dragging operations. This sequence enables + highlighting of text under the mouse cursor. + \"\\e[?1005h\" \"UTF-8 coordinate extension\": Enables an extension to the basic mouse mode, which uses UTF-8 characters to overcome the 223 row/column limit. @@ -368,18 +405,18 @@ xterm-mouse-tracking-enable-sequence (apply #'concat (xterm-mouse--tracking-sequence ?h))) =20 (defconst xterm-mouse-tracking-enable-sequence - "\e[?1000h\e[?1002h\e[?1005h\e[?1006h" + "\e[?1000h\e[?1002h\e[?1005h\e[?1006h\e[?1003h" "Control sequence to enable xterm mouse tracking. Enables basic mouse tracking, mouse motion events and finally extended tracking on terminals that support it. The following escape sequences are understood by modern xterms: =20 -\"\\e[?1000h\" \"Basic mouse mode\": Enables reports for mouse +\"\\e[?1000h\" \"Basic mouse mode\": Disables reports for mouse clicks. There is a limit to the maximum row/column position (<=3D 223), which can be reported in this basic mode. =20 -\"\\e[?1002h\" \"Mouse motion mode\": Enables reports for mouse +\"\\e[?1002h\" \"Mouse motion mode\": Disables reports for mouse motion events during dragging operations. =20 \"\\e[?1005h\" \"UTF-8 coordinate extension\": Enables an extension @@ -388,11 +425,17 @@ xterm-mouse-tracking-enable-sequence extension may conflict with non UTF-8 applications or non UTF-8 locales. =20 -\"\\e[?1006h\" \"SGR coordinate extension\": Enables a newer +\"\\e[?1006h\" \"SGR coordinate extension\": Disables a newer alternative extension to the basic mouse mode, which overcomes the 223 row/column limit without the drawbacks of the UTF-8 coordinate extension. =20 +\"\\e[?1003h\" \"Any event tracking mode\": Disables reports for + all mouse events, in particular mouse motion events + will allways be reported and not only during dragging + operations. This sequence disables highlighting of + text under the mouse cursor. + The two extension modes are mutually exclusive, where the last given escape sequence takes precedence over the former.") =20 @@ -408,7 +451,7 @@ xterm-mouse-tracking-disable-sequence (apply #'concat (nreverse (xterm-mouse--tracking-sequence ?l)))) =20 (defconst xterm-mouse-tracking-disable-sequence - "\e[?1006l\e[?1005l\e[?1002l\e[?1000l" + "\e[?1003l\e[?1006l\e[?1005l\e[?1002l\e[?1000l" "Reset the modes set by `xterm-mouse-tracking-enable-sequence'.") =20 (make-obsolete-variable @@ -422,7 +465,8 @@ xterm-mouse--tracking-sequence enable, ?l to disable)." (mapcar (lambda (code) (format "\e[?%d%c" code suffix)) - `(1000 1002 ,@(when xterm-mouse-utf-8 '(1005)) 1006))) + `(1000 1002 ,@(when xterm-mouse-utf-8 '(1005)) 1006 ,@(when + xterm-mouse-highlight '(1003))))) =20 (defun turn-on-xterm-mouse-tracking-on-terminal (&optional terminal) "Enable xterm mouse tracking on TERMINAL." diff --git a/src/keyboard.c b/src/keyboard.c index b18dc1abbe..31e4933c14 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -652,6 +652,19 @@ add_command_key (Lisp_Object key) if (this_command_key_count >=3D ASIZE (this_command_keys)) this_command_keys =3D larger_vector (this_command_keys, 1, -1); =20 + /* Only store the first and the last event in a series of mouse-moveme= nts. */ + if (EQ (EVENT_HEAD (key), Qmouse_movement) && this_command_key_count >= =3D 2) + { + Lisp_Object ev1 =3D AREF (this_command_keys, this_command_key_coun= t - 2); + Lisp_Object ev2 =3D AREF (this_command_keys, this_command_key_coun= t - 1); + if (EQ (EVENT_HEAD (ev1), Qmouse_movement) && + EQ (EVENT_HEAD (ev2), Qmouse_movement)) + { + ASET (this_command_keys, this_command_key_count - 1, key); + return; + } + } + ASET (this_command_keys, this_command_key_count, key); ++this_command_key_count; } diff --git a/src/term.c b/src/term.c index 06695d1ec6..f10259c08c 100644 --- a/src/term.c +++ b/src/term.c @@ -793,8 +793,6 @@ tty_write_glyphs (struct frame *f, struct glyph *stri= ng, int len) cmcheckmagic (tty); } =20 -#ifdef HAVE_GPM /* Only used by GPM code. */ - static void tty_write_glyphs_with_face (register struct frame *f, register struct gl= yph *string, register int len, register int face_id) @@ -851,7 +849,6 @@ tty_write_glyphs_with_face (register struct frame *f,= register struct glyph *str =20 cmcheckmagic (tty); } -#endif =20 /* An implementation of insert_glyphs for termcap frames. */ =20 @@ -2371,9 +2368,7 @@ frame's terminal). */) Mouse ***********************************************************************= / =20 -#ifdef HAVE_GPM - -#ifndef HAVE_WINDOW_SYSTEM +#if defined (HAVE_GPM) && !defined (HAVE_WINDOW_SYSTEM) void term_mouse_moveto (int x, int y) { @@ -2387,7 +2382,7 @@ term_mouse_moveto (int x, int y) last_mouse_x =3D x; last_mouse_y =3D y; */ } -#endif /* HAVE_WINDOW_SYSTEM */ +#endif /* HAVE_GPM && !HAVE_WINDOW_SYSTEM */ =20 /* Implementation of draw_row_with_mouse_face for TTY/GPM. */ void @@ -2421,6 +2416,7 @@ tty_draw_row_with_mouse_face (struct window *w, str= uct glyph_row *row, cursor_to (f, save_y, save_x); } =20 +#ifdef HAVE_GPM static bool term_mouse_movement (struct frame *frame, Gpm_Event *event) { @@ -2798,12 +2794,17 @@ mouse_get_xy (int *x, int *y) enum scroll_bar_part part_dummy; Time time_dummy; =20 - if (FRAME_TERMINAL (sf)->mouse_position_hook) + if (Fterminal_parameter (Qnil, Qxterm_mouse_mode)) + { + lmx =3D Fterminal_parameter (Qnil, Qxterm_mouse_x); + lmy =3D Fterminal_parameter (Qnil, Qxterm_mouse_y); + } + else if (FRAME_TERMINAL (sf)->mouse_position_hook) (*FRAME_TERMINAL (sf)->mouse_position_hook) (&sf, -1, &lisp_dummy, &part_dumm= y, - &lmx, &lmy, - &time_dummy); - if (!NILP (lmx)) + &lmx, &lmy, + &time_dummy); + if (INTEGERP (lmx) && INTEGERP (lmy)) { *x =3D XINT (lmx); *y =3D XINT (lmy); @@ -3064,7 +3065,7 @@ read_menu_input (struct frame *sf, int *x, int *y, = int min_y, int max_y, || sf !=3D SELECTED_FRAME ()) return MI_QUIT_MENU; if (EQ (cmd, Qtty_menu_mouse_movement)) - mouse_get_xy (x, y); + mouse_get_xy (x, y); else if (EQ (cmd, Qtty_menu_next_menu)) { usable_input =3D 0; @@ -4541,6 +4542,9 @@ bigger, or it may make it blink, or it may do nothi= ng at all. */); =20 DEFSYM (Qtty_mode_set_strings, "tty-mode-set-strings"); DEFSYM (Qtty_mode_reset_strings, "tty-mode-reset-strings"); + DEFSYM (Qxterm_mouse_mode, "xterm-mouse-mode"); + DEFSYM (Qxterm_mouse_x, "xterm-mouse-x"); + DEFSYM (Qxterm_mouse_y, "xterm-mouse-y"); =20 #ifndef MSDOS DEFSYM (Qtty_menu_next_item, "tty-menu-next-item"); diff --git a/src/xdisp.c b/src/xdisp.c index 016e7044ca..96fba761a6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -29568,9 +29568,7 @@ draw_row_with_mouse_face (struct window *w, int s= tart_x, struct glyph_row *row, return; } #endif -#if defined (HAVE_GPM) || defined (MSDOS) || defined (WINDOWSNT) tty_draw_row_with_mouse_face (w, row, start_hpos, end_hpos, draw); -#endif } =20 /* Display the active region described by mouse_face_* according to DRAW= . */ @@ -31571,6 +31569,31 @@ note_mouse_highlight (struct frame *f, int x, in= t y) define_frame_cursor1 (f, cursor, pointer); } =20 +DEFUN ("note-mouse-highlight", Fnote_mouse_highlight, Snote_mouse_highli= ght, + 3, 3, 0, + doc: /* Take proper action when the mouse has moved to position +X, Y on frame F with regards to highlighting portions of display that +have mouse-face properties. Also de-highlight portions of display +where the mouse was before, set the mouse pointer shape as appropriate +for the mouse coordinates, and activate help echo (tooltips). X and Y +can be negative or out of range. */) + (Lisp_Object frame, Lisp_Object x, Lisp_Object y) +{ + CHECK_FRAME(frame); + CHECK_NUMBER(x); + CHECK_NUMBER(y); + + /* silently do nothing, if frame is not on a terminal */ + if (XFRAME(frame)->output_method !=3D output_termcap && + XFRAME(frame)->output_method !=3D output_msdos_raw) + return Qnil; + + note_mouse_highlight(XFRAME(frame), XINT(x), XINT(y)); + fflush_unlocked(FRAME_TTY(XFRAME(frame))->output); + + return Qnil; +} + =20 /* EXPORT for RIF: Clear any mouse-face on window W. This function is part of the @@ -32253,6 +32276,8 @@ They are still logged to the *Messages* buffer. = */); defsubr (&Stool_bar_height); defsubr (&Slookup_image_map); #endif + + defsubr (&Snote_mouse_highlight); defsubr (&Sline_pixel_height); defsubr (&Sformat_mode_line); defsubr (&Sinvisible_p); --=20 Olaf Rogalsky Schw=C3=B6rhausgasse 5 89073 Ulm Germany