emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp/gnus ChangeLog ecomplete.el gnus-art...


From: Katsumi Yamaoka
Subject: [Emacs-diffs] emacs/lisp/gnus ChangeLog ecomplete.el gnus-art...
Date: Wed, 09 Sep 2009 09:28:44 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Katsumi Yamaoka <yamaoka>       09/09/09 09:28:44

Modified files:
        lisp/gnus      : ChangeLog ecomplete.el gnus-art.el gnus-util.el 
                         mm-encode.el mml.el 

Log message:
        2009-09-09  Katsumi Yamaoka  <address@hidden>
        
        * 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  <address@hidden>
        
        * mm-encode.el (mm-encode-buffer): Don't force 7bit encoding since MTA
        may break data.  Suggested by Dmitri Paduchikh <address@hidden>.
        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  <address@hidden>
        
        * gnus-art.el (gnus-article-read-summary-keys):
        Fix gnus-buffer-configuration's value temporarily used.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/gnus/ChangeLog?cvsroot=emacs&r1=1.826&r2=1.827
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/gnus/ecomplete.el?cvsroot=emacs&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/gnus/gnus-art.el?cvsroot=emacs&r1=1.184&r2=1.185
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/gnus/gnus-util.el?cvsroot=emacs&r1=1.74&r2=1.75
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/gnus/mm-encode.el?cvsroot=emacs&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/gnus/mml.el?cvsroot=emacs&r1=1.63&r2=1.64

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/ChangeLog,v
retrieving revision 1.826
retrieving revision 1.827
diff -u -b -r1.826 -r1.827
--- ChangeLog   4 Sep 2009 02:47:26 -0000       1.826
+++ ChangeLog   9 Sep 2009 09:28:43 -0000       1.827
@@ -1,3 +1,20 @@
+2009-09-09  Katsumi Yamaoka  <address@hidden>
+
+       * 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  <address@hidden>
+
+       * mm-encode.el (mm-encode-buffer): Don't force 7bit encoding since MTA
+       may break data.  Suggested by Dmitri Paduchikh <address@hidden>.
+       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  <address@hidden>
 
        * 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  <address@hidden>
+
+       * gnus-art.el (gnus-article-read-summary-keys):
+       Fix gnus-buffer-configuration's value temporarily used.
+
 2009-09-02  Glenn Morris  <address@hidden>
 
        * gnus-util.el (gnus-float-time): New function.

Index: ecomplete.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/ecomplete.el,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- ecomplete.el        2 Sep 2009 03:26:30 -0000       1.7
+++ ecomplete.el        9 Sep 2009 09:28:43 -0000       1.8
@@ -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))

Index: gnus-art.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/gnus-art.el,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -b -r1.184 -r1.185
--- gnus-art.el 2 Sep 2009 03:04:16 -0000       1.184
+++ gnus-art.el 9 Sep 2009 09:28:44 -0000       1.185
@@ -6367,9 +6367,9 @@
                 (gnus-configure-windows 'article)
                 (unless (setq win (get-buffer-window summary-buffer 'visible))
                   (let ((gnus-buffer-configuration
-                         '(article ((vertical 1.0
+                         '((article ((vertical 1.0
                                               (summary 0.25 point)
-                                              (article 1.0))))))
+                                               (article 1.0)))))))
                     (gnus-configure-windows 'article))
                   (setq win (get-buffer-window summary-buffer 'visible)))
                 (gnus-select-frame-set-input-focus (window-frame win))

Index: gnus-util.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/gnus-util.el,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -b -r1.74 -r1.75
--- gnus-util.el        2 Sep 2009 06:38:07 -0000       1.74
+++ gnus-util.el        9 Sep 2009 09:28:44 -0000       1.75
@@ -285,12 +285,14 @@
        (and (= (car fdate) (car date))
             (> (nth 1 fdate) (nth 1 date))))))
 
-(defun gnus-float-time (&optional time)
+(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.
 

Index: mm-encode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/mm-encode.el,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- mm-encode.el        5 Jan 2009 03:22:08 -0000       1.22
+++ mm-encode.el        9 Sep 2009 09:28:44 -0000       1.23
@@ -137,22 +137,19 @@
    (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)
+  (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)))
-        (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)
+                           (mm-content-transfer-encoding mime-type))))
+     mime-type)
     encoding))
 
 (defun mm-insert-headers (type encoding &optional file)

Index: mml.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/mml.el,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- mml.el      1 Sep 2009 07:59:50 -0000       1.63
+++ mml.el      9 Sep 2009 09:28:44 -0000       1.64
@@ -585,7 +585,9 @@
                        (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))))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]