From 9fe82b9d6afa6a94018faf4eef78375b9aeb5dda Mon Sep 17 00:00:00 2001 From: morioka Date: Sat, 21 Jun 1997 04:08:04 +0000 Subject: [PATCH] (mime-insert-button): New inline function. --- mime-def.el | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/mime-def.el b/mime-def.el index f86e8b9..3181194 100644 --- a/mime-def.el +++ b/mime-def.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: $Id: mime-def.el,v 0.51 1997-06-21 04:06:17 morioka Exp $ +;; Version: $Id: mime-def.el,v 0.52 1997-06-21 04:08:04 morioka Exp $ ;; Keywords: definition, MIME, multimedia, mail, news ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -89,6 +89,21 @@ ;;(add-text-properties from to (list 'keymap widget-keymap)) )) +(defsubst mime-insert-button (string function &optional data) + "Insert STRING as button with callback FUNCTION and DATA." + (save-restriction + (narrow-to-region (point)(point)) + (insert (concat "[" string "]")) + ;; (widget-push-button-value-create + ;; (widget-convert 'push-button + ;; :notify (lambda (&rest ignore) + ;; (mime-view-play-current-entity) + ;; ) + ;; string)) + (insert "\n") + (mime-add-button (point-min)(point-max) function data) + )) + (defvar mime-button-mother-dispatcher nil) (defun mime-button-dispatcher (event) -- 1.7.10.4