From: morioka Date: Sat, 21 Jun 1997 04:06:17 +0000 (+0000) Subject: (mime-add-button): Argument `func' was renamed to `function'; Use X-Git-Tag: semi-0_96~42 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c904b2aacf2051c0dbe4fc0fa18d4950b1ce5cf5;p=elisp%2Fsemi.git (mime-add-button): Argument `func' was renamed to `function'; Use overlay for `mime-button-mouse-face'. --- diff --git a/mime-def.el b/mime-def.el index 2550fec..f86e8b9 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.50 1997-05-09 01:22:21 morioka Exp $ +;; Version: $Id: mime-def.el,v 0.51 1997-06-21 04:06:17 morioka Exp $ ;; Keywords: definition, MIME, multimedia, mail, news ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -76,19 +76,17 @@ (defvar mime-button-mouse-face 'highlight "Face used for MIME-preview buffer mouse highlighting.") -(defsubst mime-add-button (from to func &optional data) - "Create a button between FROM and TO with callback FUNC and data DATA." - (and mime-button-face - (overlay-put (make-overlay from to) 'face mime-button-face)) - (let ((props (cons 'mime-button-callback - (cons func - (if data - (list 'mime-button-data data) - ))))) - (if mime-button-mouse-face - (setq props (cons 'mouse-face (cons mime-button-mouse-face props))) - ) - (add-text-properties from to props) +(defsubst mime-add-button (from to function &optional data) + "Create a button between FROM and TO with callback FUNCTION and DATA." + (let ((overlay (make-overlay from to))) + (and mime-button-face + (overlay-put overlay 'face mime-button-face)) + (and mime-button-mouse-face + (overlay-put overlay 'mouse-face mime-button-mouse-face)) + (add-text-properties from to (list 'mime-button-callback function)) + (and data + (add-text-properties from to (list 'mime-button-data data))) + ;;(add-text-properties from to (list 'keymap widget-keymap)) )) (defvar mime-button-mother-dispatcher nil)