From: yamaoka Date: Mon, 26 Jun 2000 22:56:03 +0000 (+0000) Subject: Sync. X-Git-Tag: t-gnus-6_14-quimby-before-AC-changed-~16 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a514e4423e94c77d41fe5f0add218ae91aceb77;p=elisp%2Fgnus.git- Sync. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 20687ce..0cf64e5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,31 @@ +2000-06-26 Dave Love + + * 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) : + 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 * nnimap.el (nnimap-request-post): Fix parenthesis. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 3c6bd3c..9e01c05 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -4418,7 +4418,7 @@ groups." "Exit the article editing without updating." (interactive) ;; We remove all text props from the article buffer. - (let ((buf (format "%s" (buffer-string))) + (let ((buf (buffer-substring-no-properties (point-min) (point-max))) (curbuf (current-buffer)) (p (point)) (window-start (window-start))) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 41448bb..34d7dbd 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -488,9 +488,8 @@ header line with the old Message-ID." (gnus-remove-text-with-property 'x-face-mule-bitmap-image) (insert (prog1 - (format "%s" (buffer-string)) - (erase-buffer))) - ) + (buffer-substring-no-properties (point-min) (point-max)) + (erase-buffer)))) ;; Find the original headers. (set-buffer gnus-original-article-buffer) (goto-char (point-min)) diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index f8bb43c..57129eb 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -815,8 +815,9 @@ If optional argument `EXTRA' is non-nil, it's a non-standard overview header." ((eq type 'f) (setq match (gnus-simplify-subject-fuzzy match)))) (let ((score (gnus-score-delta-default score)) - (header (format "%s" (downcase header))) + (header (downcase header)) new) + (set-text-properties 0 (length header) nil header) (when prompt (setq match (read-string (format "Match %s on %s, %s: " @@ -831,8 +832,7 @@ If optional argument `EXTRA' is non-nil, it's a non-standard overview header." (int-to-string match) match)))) - ;; Get rid of string props. - (setq match (format "%s" match)) + (set-text-properties 0 (length match) nil match) ;; If this is an integer comparison, we transform from string to int. (when (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) diff --git a/lisp/gnus-srvr.el b/lisp/gnus-srvr.el index 23a251c..0a7304f 100644 --- a/lisp/gnus-srvr.el +++ b/lisp/gnus-srvr.el @@ -728,7 +728,7 @@ buffer. (when (re-search-forward ": \\(.*\\)$" (gnus-point-at-eol) t) (gnus-group-prefixed-name (or name - (format "%s" (match-string 1))) + (match-string-no-properties 1)) gnus-browse-current-method))))) (defun gnus-browse-unsubscribe-group () diff --git a/lisp/imap.el b/lisp/imap.el index f8fe6a3..919a250 100644 --- a/lisp/imap.el +++ b/lisp/imap.el @@ -138,8 +138,6 @@ (eval-when-compile (require 'cl)) (eval-when-compile (require 'static)) -(eval-when-compile - (ignore-errors (require 'sasl))) (eval-and-compile (autoload 'open-ssl-stream "ssl") @@ -152,7 +150,8 @@ (autoload 'utf7-encode "utf7") (autoload 'utf7-decode "utf7") (autoload 'format-spec "format-spec") - (autoload 'format-spec-make "format-spec")) + (autoload 'format-spec-make "format-spec") + (autoload 'sasl-digest-md5-digest-response "sasl")) ;; User variables. diff --git a/lisp/message.el b/lisp/message.el index 33ba2eb..1de2986 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -36,25 +36,20 @@ ;;; 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)) @@ -1367,7 +1362,7 @@ should be sent in several parts. If it is nil, the size is unlimited." (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")) @@ -1464,8 +1459,8 @@ is used by default." (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." @@ -1520,6 +1515,7 @@ is used by default." (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 " *\\|")))) @@ -1865,8 +1861,15 @@ M-RET message-newline-and-reformat (break the line and reformat)." (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. @@ -1875,14 +1878,6 @@ M-RET message-newline-and-reformat (break the line and reformat)." (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]*\\|" @@ -4528,6 +4523,7 @@ that further discussion should take place only in " (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 @@ -5350,17 +5346,20 @@ regexp varstr." ;;; 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 diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 3feaee3..2f2c1f0 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -809,10 +809,12 @@ external if displayed external." (or mm-inline-large-images (and (< (glyph-width image) (window-pixel-width)) (< (glyph-height image) (window-pixel-height)))) - ;; Let's just inline everything under Emacs 21, since the image - ;; specification there doesn't actually get the width/height - ;; until you render the image. - t))) + (let* ((size (image-size image)) + (w (car size)) + (h (cdr size))) + (or mm-inline-large-images + (and (< h (1- (window-height))) ; Don't include mode line. + (< w (window-width)))))))) (defun mm-valid-image-format-p (format) "Say whether FORMAT can be displayed natively by Emacs."