+2000-06-26 Dave Love <fx@gnu.org>
+
+ * mm-decode.el (mm-image-fit-p): Use `image-size' in Emacs.
+
+ * message.el: Remove unnecessary `require'ments. Defvar
+ gnus-list-identifiers when compiling. Don't try to autoload
+ variable `gnus-list-identifiers'. Autoload
+ gnus-group-name-charset.
+ (message-fetch-field): Don't assume `format' removes text
+ properties.
+ (message-strip-list-identifiers, message-reply, message-followup):
+ Require gnus-sum.
+ (message-mode): Tidy XEmacs conditionals.
+ (message-replace-chars-in-string): Use subst-char-in-string when
+ available.
+
+ * gnus-xmas.el (gnus-xmas-define) <match-string-no-properties>:
+ Define if necessary.
+
+ * gnus-art.el (gnus-article-edit-exit): Don't assume `format'
+ removes text properties.
+
+ * gnus-srvr.el (gnus-browse-group-name): Likewise.
+
+ * gnus-msg.el (gnus-copy-article-buffer): Likewise.
+
+ * gnus-score.el (gnus-summary-score-entry): Likewise.
+
2000-06-26 11:18:57 Katsumi Yamaoka <yamaoka@jpl.org>
* nnimap.el (nnimap-request-post): Fix parenthesis.
;;; Code:
-(eval-when-compile (require 'cl))
-(eval-when-compile (require 'smtp))
+(eval-when-compile
+ (require 'cl)
+ (require 'smtp)
+ (defvar gnus-list-identifiers)) ; gnus-sum is required where necessary
(require 'mailheader)
(require 'nnheader)
-(require 'easymenu)
-(if (string-match "XEmacs\\|Lucid" emacs-version)
- (require 'mail-abbrevs)
- (require 'mailabbrev))
(require 'mime-edit)
(eval-when-compile (require 'static))
;; Avoid byte-compile warnings.
(eval-when-compile
(require 'mail-parse)
- (require 'mm-bodies)
- (require 'mm-encode)
- (require 'mml)
- )
+ (require 'mml))
(defgroup message '((user-mail-address custom-variable)
(user-full-name custom-variable))
(autoload 'gnus-request-post "gnus-int")
(autoload 'gnus-copy-article-buffer "gnus-msg")
(autoload 'gnus-alive-p "gnus-util")
- (autoload 'gnus-list-identifiers "gnus-sum")
+ (autoload 'gnus-group-name-charset "gnus-group")
(autoload 'rmail-output "rmail")
(autoload 'mu-cite-original "mu-cite"))
(when value
(while (string-match "\n[\t ]+" value)
(setq value (replace-match " " t t value)))
- ;; We remove all text props.
- (format "%s" value))))
+ (set-text-properties 0 (length value) nil value)
+ value)))
(defun message-narrow-to-field ()
"Narrow the buffer to the header on the current line."
(defun message-strip-list-identifiers (subject)
"Remove list identifiers in `gnus-list-identifiers'."
+ (require 'gnus-sum) ; for gnus-list-identifiers
(let ((regexp (if (stringp gnus-list-identifiers)
gnus-list-identifiers
(mapconcat 'identity gnus-list-identifiers " *\\|"))))
(copy-sequence message-startup-parameter-alist))
;;(when (fboundp 'mail-hist-define-keys)
;; (mail-hist-define-keys))
- (when (string-match "XEmacs\\|Lucid" emacs-version)
- (message-setup-toolbar))
+ (if (featurep 'xemacs)
+ (message-setup-toolbar)
+ (set (make-local-variable 'font-lock-defaults)
+ '((message-font-lock-keywords
+ message-font-lock-keywords-1
+ message-font-lock-keywords-2)
+ nil nil nil nil
+ (font-lock-mark-block-function . mark-paragraph))))
+ (set (make-local-variable 'message-font-lock-last-position) nil)
(easy-menu-add message-mode-menu message-mode-map)
(easy-menu-add message-mode-field-menu message-mode-map)
;; Allow mail alias things.
(mail-abbrevs-setup)
(mail-aliases-setup)))
(message-set-auto-save-file-name)
- (unless (string-match "XEmacs" emacs-version)
- (set (make-local-variable 'font-lock-defaults)
- '((message-font-lock-keywords
- message-font-lock-keywords-1
- message-font-lock-keywords-2)
- nil nil nil nil
- (font-lock-mark-block-function . mark-paragraph))))
- (set (make-local-variable 'message-font-lock-last-position) nil)
(make-local-variable 'adaptive-fill-regexp)
(setq adaptive-fill-regexp
(concat "[ \t]*[-a-z0-9A-Z]*\\(>[ \t]*\\)+[ \t]*\\|"
(defun message-reply (&optional to-address wide)
"Start editing a reply to the article in the current buffer."
(interactive)
+ (require 'gnus-sum) ; for gnus-list-identifiers
(let ((cur (current-buffer))
from subject date
references message-id follow-to
;;; Miscellaneous functions
;; stolen (and renamed) from nnheader.el
-(defun message-replace-chars-in-string (string from to)
- "Replace characters in STRING from FROM to TO."
- (let ((string (substring string 0)) ;Copy string.
- (len (length string))
- (idx 0))
- ;; Replace all occurrences of FROM with TO.
- (while (< idx len)
- (when (= (aref string idx) from)
- (aset string idx to))
- (setq idx (1+ idx)))
- string))
+(if (fboundp 'subst-char-in-string)
+ (defsubst message-replace-chars-in-string (string from to)
+ (subst-char-in-string from to string))
+ (defun message-replace-chars-in-string (string from to)
+ "Replace characters in STRING from FROM to TO."
+ (let ((string (substring string 0)) ;Copy string.
+ (len (length string))
+ (idx 0))
+ ;; Replace all occurrences of FROM with TO.
+ (while (< idx len)
+ (when (= (aref string idx) from)
+ (aset string idx to))
+ (setq idx (1+ idx)))
+ string)))
;;;
;;; MIME functions