(mime-insert-button): Insert entity info as a invisible string under XEmacs.
authoryamaoka <yamaoka>
Tue, 10 Nov 1998 11:59:14 +0000 (11:59 +0000)
committeryamaoka <yamaoka>
Tue, 10 Nov 1998 11:59:14 +0000 (11:59 +0000)
ChangeLog
semi-def.el

index 3f48067..9d84ec3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1998-11-10  Katsumi Yamaoka   <yamaoka@jpl.org>
+
+       * semi-def.el (mime-insert-button): Insert entity info as a
+       invisible string under XEmacs.
+
 1998-11-08  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
        * mime-bbdb.el (mime-bbdb/update-record): Use
index 923739a..fc14d79 100644 (file)
   (save-restriction
     (narrow-to-region (point)(point))
     (mapcar #'(lambda (line)
-               (widget-create
-                'push-button
-                :action `(lambda (widget &optional event)
-                           (,function)
-                           )
-                :mouse-down-action `(lambda (widget event)
-                                      (let (buf point)
-                                        (save-window-excursion
-                                          (mouse-set-point event)
-                                          (setq buf (current-buffer)
-                                                point (point)))
-                                        (save-excursion
-                                          (set-buffer buf)
-                                          (goto-char point)
-                                          (,function)
-                                          )))
-                line)
-               (insert "\n")
-               )
-           (split-string string "\n"))
-    ;;(mime-add-button (point-min)(point-max) function data)
-    ))
+               (let ((start (point))
+                     end extent)
+                 (widget-create
+                  'push-button
+                  :action `(lambda (widget &optional event)
+                             (,function)
+                             )
+                  :mouse-down-action `(lambda (widget event)
+                                        (let (buf point)
+                                          (save-window-excursion
+                                            (mouse-set-point event)
+                                            (setq buf (current-buffer)
+                                                  point (point)))
+                                          (save-excursion
+                                            (set-buffer buf)
+                                            (goto-char point)
+                                            (,function)
+                                            )))
+                  line)
+                 (if (featurep 'xemacs)
+                     (progn
+                       (setq end (point))
+                       (insert (concat "[" line "]"))
+                       (while (setq extent (extent-at start nil nil extent))
+                         (set-extent-endpoints extent end (point)))
+                       (delete-region start end)))
+                 (insert "\n")))
+           (split-string string "\n"))))
 
 (defvar mime-button-mother-dispatcher nil)