From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Console based mouse face highlighting. Date: Tue, 15 May 2007 09:11:31 +1200 Message-ID: <17992.53379.953892.751275@kahikatea.snap.net.nz> References: <17989.37070.393150.565546@kahikatea.snap.net.nz> <17990.21422.577087.305723@kahikatea.snap.net.nz> <17990.37305.657724.344516@kahikatea.snap.net.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1179177113 12907 80.91.229.12 (14 May 2007 21:11:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 14 May 2007 21:11:53 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 14 23:11:50 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hnhpd-0004wZ-8O for ged-emacs-devel@m.gmane.org; Mon, 14 May 2007 23:11:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HnhxQ-0007nN-Ea for ged-emacs-devel@m.gmane.org; Mon, 14 May 2007 17:19:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HnhxN-0007kL-AZ for emacs-devel@gnu.org; Mon, 14 May 2007 17:19:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HnhxK-0007b8-MM for emacs-devel@gnu.org; Mon, 14 May 2007 17:19:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HnhxK-0007an-Iv for emacs-devel@gnu.org; Mon, 14 May 2007 17:19:46 -0400 Original-Received: from viper.snap.net.nz ([202.37.101.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HnhpV-0008B6-7d; Mon, 14 May 2007 17:11:41 -0400 Original-Received: from kahikatea.snap.net.nz (173.63.255.123.dynamic.snap.net.nz [123.255.63.173]) by viper.snap.net.nz (Postfix) with ESMTP id 547CA3D912B; Tue, 15 May 2007 09:11:34 +1200 (NZST) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id D5E9A8F92B; Tue, 15 May 2007 09:11:32 +1200 (NZST) In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.1.50.198 X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:71069 Archived-At: > > -rw-r--r-- 1 nickrob nickrob 22289 2007-04-23 05:00 abbrev.c > > -rw-r--r-- 1 nickrob nickrob 185308 2007-05-09 23:02 abbrev.o > > -rw-r--r-- 1 nickrob nickrob 1311 2007-02-11 11:34 acldef.h > > -rw-r--r-- 1 nickrob nickrob 14768 2004-01-31 06:10 alloca.c > > > > The filenames have mouse face highlighting. > > Does the highlight show when you move the mouse pointer above any of > these names? > > > If I click on acldef.h > > Why do you need to click? Mouse highlight is supposed to happen > without any need to click. I'm getting closer. The help string appears now appears in the mini-buffer when the pointer is over highlighting and I don't have to click. The correct text is displayed with highlighting, however, it starts where the cursor is. The file msdos.c says: /* IT_write_glyphs writes at cursor position,... and I guess the same is true for write_glyphs in term.c. I don't quite follow what new_pos_X, new_pos_Y do, and their use appears to use dos calls. In term_mouse_show_face, I would like to do something like: /* write_glyphs writes at cursor position, so we need to temporarily move cursor coordinates to the beginning of the highlight region. */ /* Get cursor co-ordinates */ GET_CURSOR (pos_x, pos_y); save_x = pos_x; save_y = pos_x; pos_x = start_hpos + WINDOW_LEFT_EDGE_X (w); pos_y = row->y + WINDOW_TOP_EDGE_Y (w); cursor_to (pos_x, pos_y); draw_mouse_face = draw == DRAW_MOUSE_FACE; write_glyphs (row->glyphs[TEXT_AREA] + start_hpos, nglyphs); cursor_to (save_x, save_y); but I can't find a function that does the task of GET_CURSOR and when I do this without it, for some reason, the highlighting appears in the minibuffer where the help string is! Any ideas? -- Nick http://www.inet.net.nz/~nickrob