Synch with Gnus.
[elisp/gnus.git-] / lisp / gnus-msg.el
index 7ab899a..e5ca6ec 100644 (file)
@@ -110,7 +110,7 @@ the second with the current group name.")
   "If non-nil, automatically mark Gcc articles as read.")
 
 (defcustom gnus-group-posting-charset-alist
-  '(("^\\(no\\|fr\\|dk\\)\\.[^,]*\\(,[ \t\n]*\\(no\\|fr\\|dk\\)\\.[^,]*\\)*$" iso-8859-1 (iso-8859-1))
+  '(("^\\(no\\|fr\\)\\.[^,]*\\(,[ \t\n]*\\(no\\|fr\\)\\.[^,]*\\)*$" iso-8859-1 (iso-8859-1))
     ("^\\(fido7\\|relcom\\)\\.[^,]*\\(,[ \t\n]*\\(fido7\\|relcom\\)\\.[^,]*\\)*$" koi8-r (koi8-r))
     (message-this-is-mail nil nil)
     (message-this-is-news nil t))
@@ -259,10 +259,12 @@ Thank you for your help in stamping out bugs.
 (defun gnus-msg-mail (&rest args)
   "Start editing a mail message to be sent.
 Like `message-mail', but with Gnus paraphernalia, particularly the
-the Gcc: header for archiving purposes."
+Gcc: header for archiving purposes."
   (interactive)
   (gnus-setup-message 'message
-    (apply 'message-mail args)))
+    (apply 'message-mail args))
+  ;; COMPOSEFUNC should return t if succeed.  Undocumented ???
+  t)
 
 ;;;###autoload
 (define-mail-user-agent 'gnus-user-agent
@@ -1189,12 +1191,32 @@ this is a reply."
                  (sit-for 2))
                (when (and group-art gnus-inews-mark-gcc-as-read)
                  (let ((active (gnus-active group)))
-                   (when active
-                     (if (< (cdr active) (cdr group-art))
-                         (gnus-set-active group (cons (car active) 
-                                                      (cdr group-art))))
+                   (if active
+                       (if (< (cdr active) (cdr group-art))
+                           (gnus-set-active group (cons (car active) 
+                                                        (cdr group-art))))
+                     (gnus-activate-group group)))
+                 (let ((buffer (concat "*Summary " group "*"))
+                       (mark gnus-read-mark)
+                       (article (cdr group-art)))
+                   (unless 
+                       (and 
+                        (get-buffer buffer)
+                        (with-current-buffer buffer
+                          (when gnus-newsgroup-prepared
+                            (when (and gnus-newsgroup-auto-expire
+                                       (memq mark gnus-auto-expirable-marks))
+                              (setq mark gnus-expirable-mark))
+                            (setq mark (gnus-request-update-mark 
+                                        group article mark))
+                            (gnus-mark-article-as-read article mark)
+                            (setq gnus-newsgroup-active (gnus-active group))
+                            t)))
                      (gnus-group-make-articles-read group 
-                                                    (list (cdr group-art))))))
+                                                    (list article))
+                     (when (gnus-group-auto-expirable-p group)
+                       (gnus-add-marked-articles
+                        group 'expire (list article))))))
                (kill-buffer (current-buffer))))))))))
 
 (defun gnus-inews-insert-gcc ()