* Buttons in mml-preview buffer
@ 2003-04-22 18:52 Reiner Steib
2003-04-23 6:00 ` Kai Großjohann
0 siblings, 1 reply; 3+ messages in thread
From: Reiner Steib @ 2003-04-22 18:52 UTC (permalink / raw)
Hi,
I'd like to activate buttons in the mml-preview buffer, i.e. hitting
RET or mouse-2 should "Follow the link". I'm not familiar with
widget-* functions. Should be done in a different manner?
--8<---------------cut here---------------start------------->8---
--- mml.el 12 Apr 2003 21:42:35 -0000 6.72
+++ mml.el 22 Apr 2003 18:53:37 -0000
@@ -1076,6 +1076,14 @@
(mm-destroy-parts gnus-article-mime-handles)) nil t)
(setq buffer-read-only t)
(local-set-key "q" (lambda () (interactive) (kill-buffer nil)))
+ (local-set-key [return]
+ (lambda ()
+ (interactive)
+ (widget-button-press (point))))
+ (local-set-key gnus-mouse-2
+ (lambda (event)
+ (interactive "@e")
+ (widget-button-press (widget-event-point event))))
(goto-char (point-min)))))
(defun mml-validate ()
--8<---------------cut here---------------end--------------->8---
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Buttons in mml-preview buffer
2003-04-22 18:52 Buttons in mml-preview buffer Reiner Steib
@ 2003-04-23 6:00 ` Kai Großjohann
2003-04-23 12:59 ` Reiner Steib
0 siblings, 1 reply; 3+ messages in thread
From: Kai Großjohann @ 2003-04-23 6:00 UTC (permalink / raw)
Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:
> + (local-set-key [return]
Maybe better "\r" instead of [return]. (Your code might fail to bind
anything on a tty, though XEmacs may grok it.)
--
file-error; Data: (Opening input file no such file or directory ~/.signature)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Buttons in mml-preview buffer
2003-04-23 6:00 ` Kai Großjohann
@ 2003-04-23 12:59 ` Reiner Steib
0 siblings, 0 replies; 3+ messages in thread
From: Reiner Steib @ 2003-04-23 12:59 UTC (permalink / raw)
On Wed, Apr 23 2003, Kai Großjohann wrote:
> Maybe better "\r" instead of [return]. (Your code might fail to bind
> anything on a tty, though XEmacs may grok it.)
Thanks, I've committed the following:
--8<---------------cut here---------------start------------->8---
--- mml.el 12 Apr 2003 21:42:35 -0000 6.72
+++ mml.el 23 Apr 2003 10:46:23 -0000
@@ -1076,6 +1076,15 @@
(mm-destroy-parts gnus-article-mime-handles)) nil t)
(setq buffer-read-only t)
(local-set-key "q" (lambda () (interactive) (kill-buffer nil)))
+ (local-set-key "=" (lambda () (interactive) (delete-other-windows)))
+ (local-set-key "\r"
+ (lambda ()
+ (interactive)
+ (widget-button-press (point))))
+ (local-set-key gnus-mouse-2
+ (lambda (event)
+ (interactive "@e")
+ (widget-button-press (widget-event-point event) event)))
(goto-char (point-min)))))
(defun mml-validate ()
--8<---------------cut here---------------end--------------->8---
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-04-23 12:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-22 18:52 Buttons in mml-preview buffer Reiner Steib
2003-04-23 6:00 ` Kai Großjohann
2003-04-23 12:59 ` Reiner Steib
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 NNTP newsgroup(s).