X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-msg.el;h=013eed8fdd0f50b6517d5029aa8d575a1328a4b0;hb=d75ad5fcb4dd6888ea4fd12cd17f27aac131ad53;hp=3443bf3f99bd38a45d5be06f6503ddbbe8d87ac7;hpb=b28454eed83f245c4160228b076134ce930b320a;p=gnus diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 3443bf3f9..013eed8fd 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -306,15 +306,12 @@ header line with the old Message-ID." (gnus-summary-select-article t) (set-buffer gnus-original-article-buffer) (message-supersede) - (push - `((lambda () - (gnus-cache-possibly-remove-article ,article nil nil nil t))) - message-send-actions) (push `((lambda () (when (buffer-name (get-buffer ,gnus-summary-buffer)) (save-excursion (set-buffer (get-buffer ,gnus-summary-buffer)) + (gnus-cache-possibly-remove-article ,article nil nil nil t) (gnus-summary-mark-as-read ,article gnus-canceled-mark))))) message-send-actions)))) @@ -407,8 +404,10 @@ header line with the old Message-ID." (message-mail (or to-address to-list)) ;; Arrange for mail groups that have no `to-address' to ;; get that when the user sends off the mail. - (push (list 'gnus-inews-add-to-address group) - message-send-actions)) + (when (and (not to-list) + (not to-address)) + (push (list 'gnus-inews-add-to-address pgroup) + message-send-actions))) (set-buffer gnus-article-copy) (message-wide-reply to-address))) (when yank @@ -471,16 +470,6 @@ If SILENT, don't prompt the user." ;; Use the normal select method. (t gnus-select-method)))) -(defun gnus-inews-narrow-to-headers () - (widen) - (narrow-to-region - (goto-char (point-min)) - (or (and (re-search-forward - (concat "^" (regexp-quote mail-header-separator) "$") nil t) - (match-beginning 0)) - (point-max))) - (goto-char (point-min))) - ;;; ;;; Check whether the message has been sent already. ;;; @@ -490,7 +479,7 @@ If SILENT, don't prompt the user." (defun gnus-inews-reject-message () "Check whether this message has already been sent." (when gnus-sent-message-ids-file - (let ((message-id (save-restriction (gnus-inews-narrow-to-headers) + (let ((message-id (save-restriction (message-narrow-to-headers) (mail-fetch-field "message-id"))) end) (when message-id @@ -530,11 +519,17 @@ If SILENT, don't prompt the user." (concat "Emacs " (substring emacs-version (match-beginning 1) (match-end 1)))) - ((string-match "\\([A-Z]*[Mm][Aa][Cc][Ss]\\)" emacs-version) + ((string-match "\\([A-Z]*[Mm][Aa][Cc][Ss]\\)[^(]*\\(\\((beta.*)\\|'\\)\\)?" + emacs-version) (concat (substring emacs-version (match-beginning 1) (match-end 1)) - (format " %d.%d" emacs-major-version emacs-minor-version))) + (format " %d.%d" emacs-major-version emacs-minor-version) + (if (match-beginning 3) + (substring emacs-version + (match-beginning 3) + (match-end 3)) + ""))) (t emacs-version)))) ;; Written by "Mr. Per Persson" . @@ -730,7 +725,9 @@ The current group name will be inserted at \"%s\".") (gnus-alive-p)) ;; This mail group doesn't have a `to-list', so we add one ;; here. Magic! - (gnus-group-add-parameter group (cons 'to-list to-address))))) + (when (gnus-y-or-n-p + (format "Do you want to add this as `to-list': %s " to-address)) + (gnus-group-add-parameter group (cons 'to-list to-address)))))) (defun gnus-put-message () "Put the current message in some group and return to Gnus." @@ -748,7 +745,7 @@ The current group name will be inserted at \"%s\".") (save-excursion (save-restriction (widen) - (gnus-inews-narrow-to-headers) + (message-narrow-to-headers) (let (gnus-deletable-headers) (if (message-news-p) (message-generate-headers message-required-news-headers) @@ -949,7 +946,7 @@ this is a reply." "Insert Gcc headers based on `gnus-outgoing-message-group'." (save-excursion (save-restriction - (gnus-inews-narrow-to-headers) + (message-narrow-to-headers) (let* ((group gnus-outgoing-message-group) (gcc (cond ((gnus-functionp group) @@ -1008,7 +1005,7 @@ this is a reply." (setq groups (list groups))) (save-excursion (save-restriction - (gnus-inews-narrow-to-headers) + (message-narrow-to-headers) (goto-char (point-max)) (insert "Gcc: ") (if (and gnus-newsgroup-name