unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: `Info-fontify-node' doesn't bind mouse-events in buffer
@ 2002-06-06  4:20 John Paul Wallington
  2002-06-07  0:45 ` Richard Stallman
  2002-06-07  0:46 ` Richard Stallman
  0 siblings, 2 replies; 4+ messages in thread
From: John Paul Wallington @ 2002-06-06  4:20 UTC (permalink / raw)
  Cc: emacs-devel

Please don't install the patch I sent to emacs-pretest-bug@gnu.org

The patch fixed the following symptoms:

C-h C-f gives us the FAQ in Info.  There are two headers, one in the
header-line and one in the buffer.  For the header in the buffer,
elements have a tooltip and a mouse face, but aren't clickable.

Unfortunately, the patch bound both [mouse-2] and [mouse-1].
I have realised it shouldn't bind [mouse-1].

A revised patch follows.  What do people think ?


2002-06-06  John Paul Wallington  <jpw@shootybangbang.com>

	* info.el (Info-fontify-node): Bind mouse events in the buffer.

Index: info.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/info.el,v
retrieving revision 1.302
diff -u -r1.302 info.el
*** info.el	3 Jun 2002 22:57:40 -0000	1.302
--- info.el	6 Jun 2002 04:11:43 -0000
***************
*** 2638,2654 ****
  				   'help-echo
  				   (concat "Go to node "
  					   (buffer-substring nbeg nend)))
! 		;; Don't bind mouse events on the header line if we
! 		;; aren't going to display the header line.
! 		(when Info-use-header-line
! 		  (let ((fun (cdr (assoc tag '(("Prev" . Info-prev)
! 					       ("Next" . Info-next)
! 					       ("Up" . Info-up))))))
! 		    (when fun
! 		      (let ((keymap (make-sparse-keymap)))
  			(define-key keymap [header-line mouse-1] fun)
! 			(define-key keymap [header-line mouse-2] fun)
! 			(put-text-property tbeg nend 'local-map keymap)))))
  		(if (not Info-use-header-line)
  		    ;; In case they switched Info-use-header-line off
  		    ;; in the middle of an Info session, some text
--- 2638,2653 ----
  				   'help-echo
  				   (concat "Go to node "
  					   (buffer-substring nbeg nend)))
! 		(let ((fun (cdr (assoc tag '(("Prev" . Info-prev)
! 					     ("Next" . Info-next)
! 					     ("Up" . Info-up))))))
! 		  (when fun
! 		    (let ((keymap (make-sparse-keymap)))
! 		      (define-key keymap [mouse-2] fun)
! 		      (when Info-use-header-line
  			(define-key keymap [header-line mouse-1] fun)
! 			(define-key keymap [header-line mouse-2] fun))
! 		      (put-text-property tbeg nend 'local-map keymap))))
  		(if (not Info-use-header-line)
  		    ;; In case they switched Info-use-header-line off
  		    ;; in the middle of an Info session, some text


-- 
John Paul Wallington

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: `Info-fontify-node' doesn't bind mouse-events in buffer
  2002-06-06  4:20 `Info-fontify-node' doesn't bind mouse-events in buffer John Paul Wallington
@ 2002-06-07  0:45 ` Richard Stallman
  2002-06-07  0:46 ` Richard Stallman
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2002-06-07  0:45 UTC (permalink / raw)
  Cc: emacs-pretest-bug, emacs-devel

It looks like a good idea to me.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: `Info-fontify-node' doesn't bind mouse-events in buffer
  2002-06-06  4:20 `Info-fontify-node' doesn't bind mouse-events in buffer John Paul Wallington
  2002-06-07  0:45 ` Richard Stallman
@ 2002-06-07  0:46 ` Richard Stallman
  2002-06-08  0:47   ` John Paul Wallington
  1 sibling, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2002-06-07  0:46 UTC (permalink / raw)
  Cc: emacs-pretest-bug, emacs-devel

I have not tested it but it looks good to me in principle.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: `Info-fontify-node' doesn't bind mouse-events in buffer
  2002-06-07  0:46 ` Richard Stallman
@ 2002-06-08  0:47   ` John Paul Wallington
  0 siblings, 0 replies; 4+ messages in thread
From: John Paul Wallington @ 2002-06-08  0:47 UTC (permalink / raw)
  Cc: emacs-pretest-bug, emacs-devel

> I have not tested it but it looks good to me in principle.

Could someone take a squizz at it and install it if appropriate ?

-- 
John Paul Wallington

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-06-08  0:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-06  4:20 `Info-fontify-node' doesn't bind mouse-events in buffer John Paul Wallington
2002-06-07  0:45 ` Richard Stallman
2002-06-07  0:46 ` Richard Stallman
2002-06-08  0:47   ` John Paul Wallington

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).