From 0a2d78d3f04b29d2bfa1fb9f4a850d41f3a99a97 Mon Sep 17 00:00:00 2001 From: hayashi Date: Thu, 15 Jun 2000 03:25:07 +0000 Subject: [PATCH] * mail-mime-setup.el: Don't touch mail-signature. * semi-setup.el (mime-setup-enable-inline-image): Don't check window-system under XEmacs. * semi-def.el (select-menu-alist): Use device-on-window-system-p under XEmacs. * mime-view.el (mime-view-unbuttonize): Remove invisible text following XPM buttons. * semi-def.el (mime-create-xpm-buttton): Make an extent start-open. Put mime-button text-property for buttonize and unbuttonize. --- ChangeLog | 15 +++++++++++++++ emy.texi | 6 +++--- mail-mime-setup.el | 12 +----------- mime-view.el | 7 +++++++ semi-def.el | 41 ++++++++++++++++++++++++++--------------- semi-setup.el | 3 +-- 6 files changed, 53 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index aae5995..12f98a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2000-06-15 Yoshiki Hayashi + + * mail-mime-setup.el: Don't touch mail-signature. + * semi-setup.el (mime-setup-enable-inline-image): Don't check + window-system under XEmacs. + * semi-def.el (select-menu-alist): Use device-on-window-system-p + under XEmacs. + +2000-06-14 Yoshiki Hayashi + + * mime-view.el (mime-view-unbuttonize): Remove invisible text + following XPM buttons. + * semi-def.el (mime-create-xpm-buttton): Make an extent start-open. + Put mime-button text-property for buttonize and unbuttonize. + 2000-06-13 Yoshiki Hayashi * mime-edit.el (mime-transfer-level): Defcustomize. diff --git a/emy.texi b/emy.texi index a76a8e3..b9c539e 100644 --- a/emy.texi +++ b/emy.texi @@ -71,7 +71,7 @@ EMY is a MIME interface for Emacs. EMY provides SEMI API, which is specified in a separate document. @c @xref{(semi-api)Top}. -This manual correspond to EMY version @value{VERSION}. +This manual corresponds to EMY version @value{VERSION}. @end ifnottex @menu @@ -225,8 +225,8 @@ Before EMY 1.13.6, you need W- variants of SEMI to show buttons using widgets. From now on, you only need to set @code{mime-use-widget} to @code{t}. -Information of a part is displayed in buttons. What will be shown is -already defined. +A button is a place where information about a given part is displayed. +Its contents is already defined. [You should be able to customize button with format string. This might be implemented in later versions. If you diff --git a/mail-mime-setup.el b/mail-mime-setup.el index 710d15b..4acb278 100644 --- a/mail-mime-setup.el +++ b/mail-mime-setup.el @@ -45,17 +45,7 @@ 'mail-mode (function (lambda () (interactive) - (funcall send-mail-function) - ))) - - -;;; @ for signature -;;; - -(if mime-setup-use-signature - (setq mail-signature nil) - ) - + (funcall send-mail-function)))) ;;; @ end ;;; diff --git a/mime-view.el b/mime-view.el index c2e1655..9a4b0e3 100644 --- a/mime-view.el +++ b/mime-view.el @@ -999,6 +999,13 @@ With prefix, it prompts for coding-system." (point) 'mime-view-entity)) (goto-char point) (when (get-text-property (point) 'mime-button) + ;; Remove invisible text following XPM buttons. + (static-if (featurep 'xemacs) + (let ((extent (extent-at (point) nil 'invisible)) + (inhibit-read-only t)) + (if extent + (delete-region (extent-start-position extent) + (extent-end-position extent))))) (mime-preview-toggle-button 'hide)))))) diff --git a/semi-def.el b/semi-def.el index b145f5a..bfdfc8e 100644 --- a/semi-def.el +++ b/semi-def.el @@ -25,7 +25,7 @@ ;;; Code: (require 'poe) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'static)) (require 'custom) (defconst mime-user-interface-product ["EMY" (1 13 6) "Life is balance"] @@ -132,11 +132,15 @@ if the TTY frame is used." ;; `device-on-widow-system-p' must be checked at run-time. (if (device-on-window-system-p) (progn - (set-extent-properties (make-extent (point) - (progn - (insert "[" string "]") - (point))) - '(invisible t intangible t)) + (let ((old-point (point))) + (set-extent-properties (make-extent (point) + (progn + (insert "[" string "]") + (point))) + '(invisible t intangible t + start-open t)) + (add-text-properties old-point (point) + '(mime-button t start-open t))) (let* ((spec (list string mime-xpm-button-shadow-thickness mime-xpm-button-foreground @@ -280,11 +284,14 @@ if the TTY frame is used." ;;; @ menu ;;; -(if window-system - (if (featurep 'xemacs) - (defun select-menu-alist (title menu-alist) +(static-if (featurep 'xemacs) + (defun select-menu-alist (title menu-alist) + ;; XEmacs can have both X and tty frames at the same time with + ;; gnuclient. + (if (device-on-window-system-p) (let (ret) (popup-menu + ;; list* is CL function, but CL is a part of XEmacs. (list* title "---" (mapcar (function @@ -296,15 +303,19 @@ if the TTY frame is used." t))) menu-alist))) (recursive-edit) - ret)) + ret) + (cdr + (assoc (completing-read (concat title " : ") menu-alist) + menu-alist)))) + (if window-system (defun select-menu-alist (title menu-alist) (x-popup-menu (list '(1 1) (selected-window)) - (list title (cons title menu-alist))))) - (defun select-menu-alist (title menu-alist) - (cdr - (assoc (completing-read (concat title " : ") menu-alist) - menu-alist)))) + (list title (cons title menu-alist)))) + (defun select-menu-alist (title menu-alist) + (cdr + (assoc (completing-read (concat title " : ") menu-alist) + menu-alist))))) ;;; @ Other Utility diff --git a/semi-setup.el b/semi-setup.el index a5526fc..9580366 100644 --- a/semi-setup.el +++ b/semi-setup.el @@ -41,8 +41,7 @@ it is used as hook to set." ;; for image/* and X-Face (defvar mime-setup-enable-inline-image - (and window-system - (or (featurep 'xemacs) (featurep 'mule))) + (or (featurep 'xemacs) (and window-system (featurep 'mule))) "*If it is non-nil, semi-setup sets up to use mime-image.") (if mime-setup-enable-inline-image -- 1.7.10.4