Importing Pterodactyl Gnus v0.91.
[elisp/gnus.git-] / lisp / gnus-sum.el
index 3320a50..b53eca2 100644 (file)
@@ -1028,6 +1028,8 @@ variable (string, integer, character, etc).")
 (defvar gnus-last-article nil)
 (defvar gnus-newsgroup-history nil)
 (defvar gnus-newsgroup-charset nil)
+(defvar gnus-newsgroup-ephemeral-charset nil)
+(defvar gnus-newsgroup-ephemeral-ignored-charsets nil)
 
 (defconst gnus-summary-local-variables
   '(gnus-newsgroup-name
@@ -6752,11 +6754,14 @@ to guess what the document format is."
        (delete-matching-lines "^\\(Path\\):\\|^From ")
        (widen))
       (unwind-protect
-          (if (gnus-group-read-ephemeral-group
-               name `(nndoc ,name (nndoc-address ,(get-buffer dig))
-                            (nndoc-article-type
-                             ,(if force 'digest 'guess))) t)
-              ;; Make all postings to this group go to the parent group.
+          (if (let ((gnus-newsgroup-ephemeral-charset gnus-newsgroup-charset)
+                   (gnus-newsgroup-ephemeral-ignored-charsets
+                    gnus-newsgroup-ignored-charsets))
+               (gnus-group-read-ephemeral-group
+                name `(nndoc ,name (nndoc-address ,(get-buffer dig))
+                             (nndoc-article-type
+                              ,(if force 'digest 'guess))) t))
+             ;; Make all postings to this group go to the parent group.
               (nconc (gnus-info-params (gnus-get-info name))
                      params)
             ;; Couldn't select this doc group.
@@ -7274,7 +7279,8 @@ and `request-accept' functions."
               (entry
                (gnus-gethash pto-group gnus-newsrc-hashtb))
               (info (nth 2 entry))
-              (to-group (gnus-info-group info)))
+               (to-group (gnus-info-group info))
+              to-marks)
          ;; Update the group that has been moved to.
          (when (and info
                     (memq action '(move copy)))
@@ -7282,6 +7288,7 @@ and `request-accept' functions."
              (push to-group to-groups))
 
            (unless (memq article gnus-newsgroup-unreads)
+             (push 'read to-marks)
              (gnus-info-set-read
               info (gnus-add-to-range (gnus-info-read info)
                                       (list (cdr art-group)))))
@@ -7309,6 +7316,7 @@ and `request-accept' functions."
                (when (memq article (symbol-value
                                     (intern (format "gnus-newsgroup-%s"
                                                     (caar marks)))))
+                  (push (cdar marks) to-marks)
                  ;; If the other group is the same as this group,
                  ;; then we have to add the mark to the list.
                  (when (equal to-group gnus-newsgroup-name)
@@ -7322,6 +7330,10 @@ and `request-accept' functions."
                   to-group (cdar marks) (list to-article) info))
                (setq marks (cdr marks)))
 
+              (gnus-request-set-mark to-group (list (list (list to-article)
+                                                          'set
+                                                          to-marks)))
+
              (gnus-dribble-enter
               (concat "(gnus-group-set-info '"
                       (gnus-prin1-to-string (gnus-get-info to-group))
@@ -9277,21 +9289,23 @@ If REVERSE, save parts that do not match TYPE."
   (let* ((name (and gnus-newsgroup-name
                   (gnus-group-real-name gnus-newsgroup-name)))
         (ignored-charsets 
-         (append
-          (and gnus-newsgroup-name
-               (or (gnus-group-find-parameter gnus-newsgroup-name
-                                              'ignored-charsets t)
-                   (let ((alist gnus-group-ignored-charsets-alist)
-                         elem (charsets nil))
-                     (while (setq elem (pop alist))
-                       (when (and name
-                                  (string-match (car elem) name))
-                        (setq alist nil
-                              charsets (cdr elem))))
-                     charsets)))
-          gnus-newsgroup-ignored-charsets)))
+         (or gnus-newsgroup-ephemeral-ignored-charsets
+             (append
+              (and gnus-newsgroup-name
+                   (or (gnus-group-find-parameter gnus-newsgroup-name
+                                                  'ignored-charsets t)
+                       (let ((alist gnus-group-ignored-charsets-alist)
+                          elem (charsets nil))
+                         (while (setq elem (pop alist))
+                           (when (and name
+                                      (string-match (car elem) name))
+                             (setq alist nil
+                                   charsets (cdr elem))))
+                         charsets))))
+             gnus-newsgroup-ignored-charsets)))
     (setq gnus-newsgroup-charset
-         (or (and gnus-newsgroup-name
+         (or gnus-newsgroup-ephemeral-charset
+             (and gnus-newsgroup-name
                   (or (gnus-group-find-parameter gnus-newsgroup-name
                                                  'charset)
                       (let ((alist gnus-group-charset-alist)