summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
authorKatsumi Yamaoka <yamaoka@jpl.org>2009-09-09 09:28:43 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2009-09-09 09:28:43 +0000
commitde0bdfe7aa97030b6174aba37f245c2bbf2d4ee5 (patch)
treed7955a763d1bb94432682f813ee6cc4eedb76bf5 /lisp/gnus
parentf9b7b5acb56f3d7a785d079eb13318e33bca9047 (diff)
2009-09-09 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-util.el (gnus-float-time): Alias to float-time if it exists. * ecomplete.el (with-no-warnings): Define it for old Emacsen. (ecomplete-add-item): Don't use (featurep 'xemacs) to check if float-time is available; suppress compile warning for time-to-seconds. 2009-09-07 Katsumi Yamaoka <yamaoka@jpl.org> * mm-encode.el (mm-encode-buffer): Don't force 7bit encoding since MTA may break data. Suggested by Dmitri Paduchikh <dpaduch@k66.ru>. Add the optional argument `encoding' that overrides the default. * mml.el (mml-generate-mime-1): Pass encoding defined by a user to mm-encode-buffer. 2009-09-02 Karl Kleinpaste <karl@kleinpaste.org> * gnus-art.el (gnus-article-read-summary-keys): Fix gnus-buffer-configuration's value temporarily used.
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/ChangeLog22
-rw-r--r--lisp/gnus/ecomplete.el13
-rw-r--r--lisp/gnus/gnus-art.el6
-rw-r--r--lisp/gnus/gnus-util.el12
-rw-r--r--lisp/gnus/mm-encode.el25
-rw-r--r--lisp/gnus/mml.el4
6 files changed, 56 insertions, 26 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index d1ac4e06f62..957881ef420 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,20 @@
+2009-09-09 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-util.el (gnus-float-time): Alias to float-time if it exists.
+
+ * ecomplete.el (with-no-warnings): Define it for old Emacsen.
+ (ecomplete-add-item): Don't use (featurep 'xemacs) to check if
+ float-time is available; suppress compile warning for time-to-seconds.
+
+2009-09-07 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * mm-encode.el (mm-encode-buffer): Don't force 7bit encoding since MTA
+ may break data. Suggested by Dmitri Paduchikh <dpaduch@k66.ru>.
+ Add the optional argument `encoding' that overrides the default.
+
+ * mml.el (mml-generate-mime-1): Pass encoding defined by a user to
+ mm-encode-buffer.
+
2009-09-04 Glenn Morris <rgm@gnu.org>
* qp.el (quoted-printable-encode-string): Use mm-enable-multibyte, or
@@ -15,6 +32,11 @@
* rfc2047.el (rfc2047-encode-message-header): Use default-value rather
than default-enable-multibyte-characters.
+2009-09-02 Karl Kleinpaste <karl@kleinpaste.org>
+
+ * gnus-art.el (gnus-article-read-summary-keys):
+ Fix gnus-buffer-configuration's value temporarily used.
+
2009-09-02 Glenn Morris <rgm@gnu.org>
* gnus-util.el (gnus-float-time): New function.
diff --git a/lisp/gnus/ecomplete.el b/lisp/gnus/ecomplete.el
index c2a22e3230c..ece8f2deff4 100644
--- a/lisp/gnus/ecomplete.el
+++ b/lisp/gnus/ecomplete.el
@@ -27,6 +27,11 @@
(eval-when-compile
(require 'cl))
+(eval-when-compile
+ (unless (fboundp 'with-no-warnings)
+ (defmacro with-no-warnings (&rest body)
+ `(progn ,@body))))
+
(defgroup ecomplete nil
"Electric completion of email addresses and the like."
:group 'mail)
@@ -56,9 +61,11 @@
(defun ecomplete-add-item (type key text)
(let ((elems (assq type ecomplete-database))
(now (string-to-number
- (format "%.0f" (if (featurep 'xemacs)
- (time-to-seconds (current-time))
- (float-time)))))
+ (format "%.0f" (if (and (fboundp 'float-time)
+ (subrp (symbol-function 'float-time)))
+ (float-time)
+ (with-no-warnings
+ (time-to-seconds (current-time)))))))
entry)
(unless elems
(push (setq elems (list type)) ecomplete-database))
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index dac62029e33..aa4b57ab3e0 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -6367,9 +6367,9 @@ not have a face in `gnus-article-boring-faces'."
(gnus-configure-windows 'article)
(unless (setq win (get-buffer-window summary-buffer 'visible))
(let ((gnus-buffer-configuration
- '(article ((vertical 1.0
- (summary 0.25 point)
- (article 1.0))))))
+ '((article ((vertical 1.0
+ (summary 0.25 point)
+ (article 1.0)))))))
(gnus-configure-windows 'article))
(setq win (get-buffer-window summary-buffer 'visible)))
(gnus-select-frame-set-input-focus (window-frame win))
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index bd870a2f1c8..3766b3bd59d 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -285,12 +285,14 @@ Symbols are also allowed; their print names are used instead."
(and (= (car fdate) (car date))
(> (nth 1 fdate) (nth 1 date))))))
-(defun gnus-float-time (&optional time)
- "Convert time value TIME to a floating point number.
+(eval-and-compile
+ (if (and (fboundp 'float-time)
+ (subrp (symbol-function 'float-time)))
+ (defalias 'gnus-float-time 'float-time)
+ (defun gnus-float-time (&optional time)
+ "Convert time value TIME to a floating point number.
TIME defaults to the current time."
- (if (featurep 'xemacs)
- (time-to-seconds (or time (current-time)))
- (float-time time)))
+ (with-no-warnings (time-to-seconds (or time (current-time)))))))
;;; Keymap macros.
diff --git a/lisp/gnus/mm-encode.el b/lisp/gnus/mm-encode.el
index 39b83ff1c3c..0d41caaf484 100644
--- a/lisp/gnus/mm-encode.el
+++ b/lisp/gnus/mm-encode.el
@@ -137,22 +137,19 @@ ENCODING can be: nil (do nothing); one of `quoted-printable', `base64';
(t
(error "Unknown encoding %s" encoding))))
-(defun mm-encode-buffer (type)
- "Encode the buffer which contains data of MIME type TYPE.
+(defun mm-encode-buffer (type &optional encoding)
+ "Encode the buffer which contains data of MIME type TYPE by ENCODING.
TYPE is a string or a list of the components.
+The optional ENCODING overrides the encoding determined according to
+TYPE and `mm-content-transfer-encoding-defaults'.
The encoding used is returned."
- (let* ((mime-type (if (stringp type) type (car type)))
- (encoding
- (or (and (listp type)
- (cadr (assq 'encoding type)))
- (mm-content-transfer-encoding mime-type)))
- (bits (mm-body-7-or-8)))
- ;; We force buffers that are 7bit to be unencoded, no matter
- ;; what the preferred encoding is.
- ;; Only if the buffers don't contain lone lines.
- (when (and (eq bits '7bit) (not (mm-long-lines-p 76)))
- (setq encoding bits))
- (mm-encode-content-transfer-encoding encoding mime-type)
+ (let ((mime-type (if (stringp type) type (car type))))
+ (mm-encode-content-transfer-encoding
+ (or encoding
+ (setq encoding (or (and (listp type)
+ (cadr (assq 'encoding type)))
+ (mm-content-transfer-encoding mime-type))))
+ mime-type)
encoding))
(defun mm-insert-headers (type encoding &optional file)
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index bac8a5aaaf0..f397ef2b479 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -585,7 +585,9 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
(unless raw
(setq charset (mm-encode-body charset))))
(insert contents)))))
- (setq encoding (mm-encode-buffer type)
+ (if (setq encoding (cdr (assq 'encoding cont)))
+ (setq encoding (intern (downcase encoding))))
+ (setq encoding (mm-encode-buffer type encoding)
coded (mm-string-as-multibyte (buffer-string))))
(mml-insert-mime-headers cont type charset encoding nil)
(insert "\n" coded))))