From 70f6144dbd8ab3f9f1d57f65cc795a6e78c4c4d9 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 15 Apr 2011 09:42:51 -0300 Subject: [PATCH] * lisp/gnus/gnus-draft.el (gnus-draft-setup): New arg `dont-pop'. (gnus-draft-send): Use it to avoid popping up frames from gnus-group-send-queue. * lisp/gnus/gnus.el (gnus-splash-svg-color-symbols): Don't use insert-file from Lisp. * lisp/gnus/message.el (message-bogus-system-names): Replace ^...$ => \`...\'. --- lisp/gnus/ChangeLog | 10 ++++++++++ lisp/gnus/gnus-draft.el | 10 +++++++--- lisp/gnus/gnus.el | 8 +++++--- lisp/gnus/message.el | 2 +- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index cc5156610be..6522e57198d 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,13 @@ +2011-04-15 Stefan Monnier + + * message.el (message-bogus-system-names): Replace ^...$ => \`...\'. + + * gnus.el (gnus-splash-svg-color-symbols): Don't use insert-file from Lisp. + + * gnus-draft.el (gnus-draft-setup): New arg `dont-pop'. + (gnus-draft-send): Use it to avoid popping + up frames from gnus-group-send-queue. + 2011-04-14 Teodor Zlatanov * gnus-registry.el: Updated gnus-registry docs. diff --git a/lisp/gnus/gnus-draft.el b/lisp/gnus/gnus-draft.el index b613b6eaf36..1709b1c4a05 100644 --- a/lisp/gnus/gnus-draft.el +++ b/lisp/gnus/gnus-draft.el @@ -149,7 +149,7 @@ Obeys the standard process/prefix convention." gnus-agent-queue-mail)) (rfc2047-encode-encoded-words nil) type method move-to) - (gnus-draft-setup article (or group "nndraft:queue")) + (gnus-draft-setup article (or group "nndraft:queue") nil 'dont-pop) ;; We read the meta-information that says how and where ;; this message is to be sent. (save-restriction @@ -245,11 +245,15 @@ Obeys the standard process/prefix convention." :type 'hook) -(defun gnus-draft-setup (narticle group &optional restore) +(defun gnus-draft-setup (narticle group &optional restore dont-pop) + "Setup a mail draft buffer. +If DONT-POP is nil, display the buffer after setting it up." (let (ga) (gnus-setup-message 'forward (let ((article narticle)) - (message-mail) + (message-mail nil nil nil nil + (if dont-pop + (lambda (buf) (set-buffer (get-buffer-create buf))))) (let ((inhibit-read-only t)) (erase-buffer)) (if (not (gnus-request-restore-buffer article group)) diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index d4ecd89db92..f68ea41e6bd 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -1107,16 +1107,18 @@ be set in `.emacs' instead." (set-buffer-modified-p t))) (defun gnus-splash-svg-color-symbols (list) - "Do color-symbol search-and-replace in svg file" + "Do color-symbol search-and-replace in svg file." (let ((type (plist-get (cdr list) :type)) (file (plist-get (cdr list) :file)) (color-symbols (plist-get (cdr list) :color-symbols))) (if (string= type "svg") - (let ((data (with-temp-buffer (insert-file file) (buffer-string)))) + (let ((data (with-temp-buffer (insert-file-contents file) + (buffer-string)))) (mapc (lambda (rule) (setq data (replace-regexp-in-string (concat "fill:" (car rule)) - (concat "fill:" (cdr rule)) data))) color-symbols) + (concat "fill:" (cdr rule)) data))) + color-symbols) (cons (car list) (list :type type :data data))) list))) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 6d9fd712c33..0971aed0e02 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -1882,7 +1882,7 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'." (defvar message-send-mail-real-function nil "Internal send mail function.") -(defvar message-bogus-system-names "^localhost\\.\\|\\.local$" +(defvar message-bogus-system-names "\\`localhost\\.\\|\\.local\\'" "The regexp of bogus system names.") (defcustom message-valid-fqdn-regexp -- 2.39.2