diff options
| author | Katsumi Yamaoka | 2009-09-09 09:28:43 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2009-09-09 09:28:43 +0000 |
| commit | de0bdfe7aa97030b6174aba37f245c2bbf2d4ee5 (patch) | |
| tree | d7955a763d1bb94432682f813ee6cc4eedb76bf5 | |
| parent | f9b7b5acb56f3d7a785d079eb13318e33bca9047 (diff) | |
| download | emacs-de0bdfe7aa97030b6174aba37f245c2bbf2d4ee5.tar.gz emacs-de0bdfe7aa97030b6174aba37f245c2bbf2d4ee5.zip | |
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.
| -rw-r--r-- | lisp/gnus/ChangeLog | 22 | ||||
| -rw-r--r-- | lisp/gnus/ecomplete.el | 13 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/gnus-util.el | 12 | ||||
| -rw-r--r-- | lisp/gnus/mm-encode.el | 25 | ||||
| -rw-r--r-- | lisp/gnus/mml.el | 4 |
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 @@ | |||
| 1 | 2009-09-09 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-util.el (gnus-float-time): Alias to float-time if it exists. | ||
| 4 | |||
| 5 | * ecomplete.el (with-no-warnings): Define it for old Emacsen. | ||
| 6 | (ecomplete-add-item): Don't use (featurep 'xemacs) to check if | ||
| 7 | float-time is available; suppress compile warning for time-to-seconds. | ||
| 8 | |||
| 9 | 2009-09-07 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 10 | |||
| 11 | * mm-encode.el (mm-encode-buffer): Don't force 7bit encoding since MTA | ||
| 12 | may break data. Suggested by Dmitri Paduchikh <dpaduch@k66.ru>. | ||
| 13 | Add the optional argument `encoding' that overrides the default. | ||
| 14 | |||
| 15 | * mml.el (mml-generate-mime-1): Pass encoding defined by a user to | ||
| 16 | mm-encode-buffer. | ||
| 17 | |||
| 1 | 2009-09-04 Glenn Morris <rgm@gnu.org> | 18 | 2009-09-04 Glenn Morris <rgm@gnu.org> |
| 2 | 19 | ||
| 3 | * qp.el (quoted-printable-encode-string): Use mm-enable-multibyte, or | 20 | * qp.el (quoted-printable-encode-string): Use mm-enable-multibyte, or |
| @@ -15,6 +32,11 @@ | |||
| 15 | * rfc2047.el (rfc2047-encode-message-header): Use default-value rather | 32 | * rfc2047.el (rfc2047-encode-message-header): Use default-value rather |
| 16 | than default-enable-multibyte-characters. | 33 | than default-enable-multibyte-characters. |
| 17 | 34 | ||
| 35 | 2009-09-02 Karl Kleinpaste <karl@kleinpaste.org> | ||
| 36 | |||
| 37 | * gnus-art.el (gnus-article-read-summary-keys): | ||
| 38 | Fix gnus-buffer-configuration's value temporarily used. | ||
| 39 | |||
| 18 | 2009-09-02 Glenn Morris <rgm@gnu.org> | 40 | 2009-09-02 Glenn Morris <rgm@gnu.org> |
| 19 | 41 | ||
| 20 | * gnus-util.el (gnus-float-time): New function. | 42 | * 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 @@ | |||
| 27 | (eval-when-compile | 27 | (eval-when-compile |
| 28 | (require 'cl)) | 28 | (require 'cl)) |
| 29 | 29 | ||
| 30 | (eval-when-compile | ||
| 31 | (unless (fboundp 'with-no-warnings) | ||
| 32 | (defmacro with-no-warnings (&rest body) | ||
| 33 | `(progn ,@body)))) | ||
| 34 | |||
| 30 | (defgroup ecomplete nil | 35 | (defgroup ecomplete nil |
| 31 | "Electric completion of email addresses and the like." | 36 | "Electric completion of email addresses and the like." |
| 32 | :group 'mail) | 37 | :group 'mail) |
| @@ -56,9 +61,11 @@ | |||
| 56 | (defun ecomplete-add-item (type key text) | 61 | (defun ecomplete-add-item (type key text) |
| 57 | (let ((elems (assq type ecomplete-database)) | 62 | (let ((elems (assq type ecomplete-database)) |
| 58 | (now (string-to-number | 63 | (now (string-to-number |
| 59 | (format "%.0f" (if (featurep 'xemacs) | 64 | (format "%.0f" (if (and (fboundp 'float-time) |
| 60 | (time-to-seconds (current-time)) | 65 | (subrp (symbol-function 'float-time))) |
| 61 | (float-time))))) | 66 | (float-time) |
| 67 | (with-no-warnings | ||
| 68 | (time-to-seconds (current-time))))))) | ||
| 62 | entry) | 69 | entry) |
| 63 | (unless elems | 70 | (unless elems |
| 64 | (push (setq elems (list type)) ecomplete-database)) | 71 | (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'." | |||
| 6367 | (gnus-configure-windows 'article) | 6367 | (gnus-configure-windows 'article) |
| 6368 | (unless (setq win (get-buffer-window summary-buffer 'visible)) | 6368 | (unless (setq win (get-buffer-window summary-buffer 'visible)) |
| 6369 | (let ((gnus-buffer-configuration | 6369 | (let ((gnus-buffer-configuration |
| 6370 | '(article ((vertical 1.0 | 6370 | '((article ((vertical 1.0 |
| 6371 | (summary 0.25 point) | 6371 | (summary 0.25 point) |
| 6372 | (article 1.0)))))) | 6372 | (article 1.0))))))) |
| 6373 | (gnus-configure-windows 'article)) | 6373 | (gnus-configure-windows 'article)) |
| 6374 | (setq win (get-buffer-window summary-buffer 'visible))) | 6374 | (setq win (get-buffer-window summary-buffer 'visible))) |
| 6375 | (gnus-select-frame-set-input-focus (window-frame win)) | 6375 | (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." | |||
| 285 | (and (= (car fdate) (car date)) | 285 | (and (= (car fdate) (car date)) |
| 286 | (> (nth 1 fdate) (nth 1 date)))))) | 286 | (> (nth 1 fdate) (nth 1 date)))))) |
| 287 | 287 | ||
| 288 | (defun gnus-float-time (&optional time) | 288 | (eval-and-compile |
| 289 | "Convert time value TIME to a floating point number. | 289 | (if (and (fboundp 'float-time) |
| 290 | (subrp (symbol-function 'float-time))) | ||
| 291 | (defalias 'gnus-float-time 'float-time) | ||
| 292 | (defun gnus-float-time (&optional time) | ||
| 293 | "Convert time value TIME to a floating point number. | ||
| 290 | TIME defaults to the current time." | 294 | TIME defaults to the current time." |
| 291 | (if (featurep 'xemacs) | 295 | (with-no-warnings (time-to-seconds (or time (current-time))))))) |
| 292 | (time-to-seconds (or time (current-time))) | ||
| 293 | (float-time time))) | ||
| 294 | 296 | ||
| 295 | ;;; Keymap macros. | 297 | ;;; Keymap macros. |
| 296 | 298 | ||
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'; | |||
| 137 | (t | 137 | (t |
| 138 | (error "Unknown encoding %s" encoding)))) | 138 | (error "Unknown encoding %s" encoding)))) |
| 139 | 139 | ||
| 140 | (defun mm-encode-buffer (type) | 140 | (defun mm-encode-buffer (type &optional encoding) |
| 141 | "Encode the buffer which contains data of MIME type TYPE. | 141 | "Encode the buffer which contains data of MIME type TYPE by ENCODING. |
| 142 | TYPE is a string or a list of the components. | 142 | TYPE is a string or a list of the components. |
| 143 | The optional ENCODING overrides the encoding determined according to | ||
| 144 | TYPE and `mm-content-transfer-encoding-defaults'. | ||
| 143 | The encoding used is returned." | 145 | The encoding used is returned." |
| 144 | (let* ((mime-type (if (stringp type) type (car type))) | 146 | (let ((mime-type (if (stringp type) type (car type)))) |
| 145 | (encoding | 147 | (mm-encode-content-transfer-encoding |
| 146 | (or (and (listp type) | 148 | (or encoding |
| 147 | (cadr (assq 'encoding type))) | 149 | (setq encoding (or (and (listp type) |
| 148 | (mm-content-transfer-encoding mime-type))) | 150 | (cadr (assq 'encoding type))) |
| 149 | (bits (mm-body-7-or-8))) | 151 | (mm-content-transfer-encoding mime-type)))) |
| 150 | ;; We force buffers that are 7bit to be unencoded, no matter | 152 | mime-type) |
| 151 | ;; what the preferred encoding is. | ||
| 152 | ;; Only if the buffers don't contain lone lines. | ||
| 153 | (when (and (eq bits '7bit) (not (mm-long-lines-p 76))) | ||
| 154 | (setq encoding bits)) | ||
| 155 | (mm-encode-content-transfer-encoding encoding mime-type) | ||
| 156 | encoding)) | 153 | encoding)) |
| 157 | 154 | ||
| 158 | (defun mm-insert-headers (type encoding &optional file) | 155 | (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." | |||
| 585 | (unless raw | 585 | (unless raw |
| 586 | (setq charset (mm-encode-body charset)))) | 586 | (setq charset (mm-encode-body charset)))) |
| 587 | (insert contents))))) | 587 | (insert contents))))) |
| 588 | (setq encoding (mm-encode-buffer type) | 588 | (if (setq encoding (cdr (assq 'encoding cont))) |
| 589 | (setq encoding (intern (downcase encoding)))) | ||
| 590 | (setq encoding (mm-encode-buffer type encoding) | ||
| 589 | coded (mm-string-as-multibyte (buffer-string)))) | 591 | coded (mm-string-as-multibyte (buffer-string)))) |
| 590 | (mml-insert-mime-headers cont type charset encoding nil) | 592 | (mml-insert-mime-headers cont type charset encoding nil) |
| 591 | (insert "\n" coded)))) | 593 | (insert "\n" coded)))) |