Ma Gnus v0.10 is begun
[gnus] / lisp / gnus-art.el
index fd9323f..6f32655 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-art.el --- article mode commands for Gnus
 
-;; Copyright (C) 1996-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2014 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -2666,7 +2666,7 @@ If READ-CHARSET, ask for a coding system."
                            (string-match "quoted-printable" type))))
        (article-goto-body)
        (quoted-printable-decode-region
-        (point) (point-max) (mm-charset-to-coding-system charset))))))
+        (point) (point-max) (mm-charset-to-coding-system charset nil t))))))
 
 (defun article-de-base64-unreadable (&optional force read-charset)
   "Translate a base64 article.
@@ -2697,7 +2697,8 @@ If READ-CHARSET, ask for a coding system."
          (narrow-to-region (point) (point-max))
          (base64-decode-region (point-min) (point-max))
          (mm-decode-coding-region
-          (point-min) (point-max) (mm-charset-to-coding-system charset)))))))
+          (point-min) (point-max)
+          (mm-charset-to-coding-system charset nil t)))))))
 
 (eval-when-compile
   (require 'rfc1843))
@@ -2896,6 +2897,13 @@ message header will be added to the bodies of the \"text/html\" parts."
                                          ((match-beginning 3) "&amp;")
                                          (t "<br>\n"))))
                   (goto-char (point-min))
+                  (while (re-search-forward "^[\t ]+" nil t)
+                    (dotimes (i (prog1
+                                    (current-column)
+                                  (delete-region (match-beginning 0)
+                                                 (match-end 0))))
+                      (insert "&nbsp;")))
+                  (goto-char (point-min))
                   (insert "<div align=\"left\">\n")
                   (goto-char (point-max))
                   (insert "</div>\n<hr>\n")
@@ -4388,7 +4396,6 @@ If variable `gnus-use-long-file-name' is non-nil, it is
   [?\S-\ ] gnus-article-goto-prev-page
   "\177" gnus-article-goto-prev-page
   [delete] gnus-article-goto-prev-page
-  [backspace] gnus-article-goto-prev-page
   "\C-c^" gnus-article-refer-article
   "h" gnus-article-show-summary
   "s" gnus-article-show-summary
@@ -4543,20 +4550,22 @@ commands:
                         nil)
                     (error "Action aborted"))
                 t)))
-       (with-current-buffer name
-         (set (make-local-variable 'gnus-article-edit-mode) nil)
-         (gnus-article-stop-animations)
-         (when gnus-article-mime-handles
-           (mm-destroy-parts gnus-article-mime-handles)
-           (setq gnus-article-mime-handles nil))
-         ;; Set it to nil in article-buffer!
-         (setq gnus-article-mime-handle-alist nil)
-         (buffer-disable-undo)
-         (setq buffer-read-only t)
-         (unless (derived-mode-p 'gnus-article-mode)
-           (gnus-article-mode))
-         (setq truncate-lines gnus-article-truncate-lines)
-         (current-buffer))
+       (let ((summary gnus-summary-buffer))
+         (with-current-buffer name
+           (set (make-local-variable 'gnus-article-edit-mode) nil)
+           (gnus-article-stop-animations)
+           (when gnus-article-mime-handles
+             (mm-destroy-parts gnus-article-mime-handles)
+             (setq gnus-article-mime-handles nil))
+           ;; Set it to nil in article-buffer!
+           (setq gnus-article-mime-handle-alist nil)
+           (buffer-disable-undo)
+           (setq buffer-read-only t)
+           (unless (derived-mode-p 'gnus-article-mode)
+             (gnus-article-mode))
+           (set (make-local-variable 'gnus-summary-buffer) summary)
+           (setq truncate-lines gnus-article-truncate-lines)
+           (current-buffer)))
       (let ((summary gnus-summary-buffer))
        (with-current-buffer (gnus-get-buffer-create name)
          (gnus-article-mode)
@@ -5241,7 +5250,8 @@ are decompressed."
       (switch-to-buffer (generate-new-buffer filename))
       (if (or coding-system
              (and charset
-                  (setq coding-system (mm-charset-to-coding-system charset))
+                  (setq coding-system (mm-charset-to-coding-system
+                                       charset nil t))
                   (not (eq coding-system 'ascii))))
          (progn
            (mm-enable-multibyte)