From f698a68894e9a90f9f79ae9ab9047dad09a0607b Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 10 Sep 2001 17:13:03 +0000 Subject: [PATCH] Synch up with semi-1_14. --- ChangeLog | 33 +++++++++++++++++++++++++++++++++ mime-bbdb.el | 11 ++++++++--- mime-edit.el | 2 +- mime-view.el | 58 +++++++++++++++++++++++++++++++++++++++++----------------- semi-def.el | 2 +- 5 files changed, 84 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2346d56..6925453 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,20 @@ `mime-setup-enable-inline-html', `mime-setup-enable-vcard', and `mime-setup-enable-pgp' until when `mime-view' is loaded. +2001-08-10 Kenichi OKADA + + * semi-def.el (mime-browse-url-regexp): Allow nntps and ftps. + +2001-06-12 Yuuichi Teranishi + + * mime-view.el (mime-display-multipart/related): When "start" + parameter specifies part, treat the part as root. + +2001-06-12 Akihiro Arisawa + + * mime-view.el (mime-display-multipart/related): New function; set up + for `mime-preview-condition'. + 2001-06-02 Daiki Ueno * pgg.texi (Registering backend): New section. @@ -47,6 +61,25 @@ * SEMI-ELS (semi-modules-to-compile): Don't compile smime.el. +2001-04-19 Katsumi Yamaoka + + * mime-bbdb.el: Load "bbdb-hooks" when the symbol function + `bbdb-extract-field-value' is not bound or it is set up as an + autoloaded function. [cf. ] + +2001-04-17 YAMASHITA Junji + + * semi-def.el (mime-browse-url-regexp): Allow https. + +2001-03-06 Hiroya Murata + + * mime-edit.el (mime-edit-set-parameter): Get rid of the duplicated + optional fields. + +2000-12-28 MORIOKA Tomohiko + + * mime-view.el: Revert to use `static'. + 2000-12-26 Daiki Ueno * pgg-pgp.el (pgg-pgp-messages-coding-system): Abolish. diff --git a/mime-bbdb.el b/mime-bbdb.el index d73fe18..a6b370c 100644 --- a/mime-bbdb.el +++ b/mime-bbdb.el @@ -99,10 +99,15 @@ For framepop users: If empty, `framepop-banish' is used instead.") (progn ;; (require 'bbdb-hooks) ; not provided. ;; (or (fboundp 'bbdb-extract-field-value) ; defined as autoload - (or (fboundp 'bbdb-header-start) - (load "bbdb-hooks")) + + ;; almost BBDB functions are autoloaded. + ;; (or (fboundp 'bbdb-header-start) + (or (and (fboundp 'bbdb-extract-field-value) + (not (eq 'autoload (car-safe (symbol-function + 'bbdb-extract-field-value))))) + (load "bbdb-hooks")) (fset 'tm:bbdb-extract-field-value - (symbol-function 'bbdb-extract-field-value)) + (symbol-function 'bbdb-extract-field-value)) (defun bbdb-extract-field-value (field) (let ((value (tm:bbdb-extract-field-value field))) (and value diff --git a/mime-edit.el b/mime-edit.el index f665573..10052ef 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -1388,7 +1388,7 @@ Nil if no such parameter." ;; Change value (concat (substring ctype 0 (match-beginning 1)) parameter "=" value - (substring contype (match-end 1)) + (substring ctype (match-end 1)) opt-fields) (concat ctype "; " parameter "=" value opt-fields) ))) diff --git a/mime-view.el b/mime-view.el index aa6624b..9d85a7d 100644 --- a/mime-view.el +++ b/mime-view.el @@ -33,6 +33,8 @@ (require 'alist) (require 'mime-conf) +(eval-when-compile (require 'static)) + ;;; @ version ;;; @@ -355,14 +357,14 @@ mother-buffer." (with-temp-buffer (insert-file-contents file) (setq mime-situation-examples-file-coding-system - (and (boundp 'buffer-file-coding-system) - buffer-file-coding-system) - ;; (static-cond - ;; ((boundp 'buffer-file-coding-system) - ;; (symbol-value 'buffer-file-coding-system)) - ;; ((boundp 'file-coding-system) - ;; (symbol-value 'file-coding-system)) - ;; (t nil)) + (static-cond + ((boundp 'buffer-file-coding-system) + (symbol-value 'buffer-file-coding-system)) + ((boundp 'file-coding-system) + (symbol-value 'file-coding-system)) + (t nil)) + ;; (and (boundp 'buffer-file-coding-system) + ;; buffer-file-coding-system) ) (condition-case error (eval-buffer) @@ -414,15 +416,15 @@ mother-buffer." (insert "\n;;; " (file-name-nondirectory file) " ends here.\n") - (setq buffer-file-coding-system - mime-situation-examples-file-coding-system) - ;; (static-cond - ;; ((boundp 'buffer-file-coding-system) - ;; (setq buffer-file-coding-system - ;; mime-situation-examples-file-coding-system)) - ;; ((boundp 'file-coding-system) - ;; (setq file-coding-system - ;; mime-situation-examples-file-coding-system))) + (static-cond + ((boundp 'buffer-file-coding-system) + (setq buffer-file-coding-system + mime-situation-examples-file-coding-system)) + ((boundp 'file-coding-system) + (setq file-coding-system + mime-situation-examples-file-coding-system))) + ;; (setq buffer-file-coding-system + ;; mime-situation-examples-file-coding-system) (setq buffer-file-name file) (save-buffer))))) @@ -713,6 +715,12 @@ Each elements are regexp of field-name.") (ctree-set-calist-strictly 'mime-preview-condition + '((type . multipart)(subtype . related) + (body . visible) + (body-presentation-method . mime-display-multipart/related))) + +(ctree-set-calist-strictly + 'mime-preview-condition '((type . multipart)(subtype . t) (body . visible) (body-presentation-method . mime-display-multipart/mixed))) @@ -869,6 +877,22 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." situations (cdr situations) i (1+ i))))) +(defun mime-display-multipart/related (entity situation) + (let* ((param-start (mime-parse-msg-id + (std11-lexical-analyze + (cdr (assoc "start" + (mime-content-type-parameters + (mime-entity-content-type entity))))))) + (start (or (and param-start (mime-find-entity-from-content-id + param-start + entity)) + (car (mime-entity-children entity)))) + (original-major-mode-cell (assq 'major-mode situation)) + (default-situation (cdr (assq 'childrens-situation situation)))) + (if original-major-mode-cell + (setq default-situation + (cons original-major-mode-cell default-situation))) + (mime-display-entity start nil default-situation))) ;;; @ acting-condition ;;; diff --git a/semi-def.el b/semi-def.el index d702729..cedf911 100644 --- a/semi-def.el +++ b/semi-def.el @@ -77,7 +77,7 @@ ;;; (defcustom mime-browse-url-regexp - (concat "\\(http\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):" + (concat "\\(https?\\|ftps?\\|file\\|gopher\\|news\\|nntps?\\|telnets?\\|wais\\|mailto\\):" "\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?" "[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]*[-a-zA-Z0-9_=#$@~`%&*+|\\/]") "Regexp to match URL in text body." -- 1.7.10.4