all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: bugs@gnus.org
Cc: emacs-devel@gnu.org
Subject: Suspicious code
Date: Wed, 28 Oct 2009 15:08:44 -0400	[thread overview]
Message-ID: <jwvy6mvtk70.fsf-monnier+emacs@gnu.org> (raw)

Can anyone fix the code below or add comments explaining why
it's correct?

Thank you,


        Stefan


--- lisp/gnus/gnus-start.el	9 Jan 2009 03:01:50 -0000	1.65
+++ lisp/gnus/gnus-start.el	28 Oct 2009 18:47:33 -0000
@@ -3058,6 +3041,7 @@
       nil)
      (t
       (save-excursion
+        ;; Shouldn't we set-buffer before saving the restriction?  --Stef
 	(save-restriction
 	  (set-buffer nntp-server-buffer)
 	  (goto-char (point-min))

--- lisp/gnus/gnus-uu.el	5 Jan 2009 03:22:06 -0000	1.36
+++ lisp/gnus/gnus-uu.el	28 Oct 2009 18:47:36 -0000
@@ -873,10 +869,11 @@
 	(set-buffer "*gnus-uu-body*")
 	(goto-char (setq beg (point-max)))
 	(save-excursion
+          ;; Shouldn't we set-buffer before saving the restriction?  --Stef
 	  (save-restriction
 	    (set-buffer buffer)
 	    (let (buffer-read-only)
@@ -1983,6 +1966,7 @@
 		  (gnus-uu-choose-action file-name gnus-uu-ext-to-mime-list)
 		  file-name))
   (insert (format "Content-Transfer-Encoding: %s\n\n" encoding))
+  ;; Shouldn't we set-buffer before saving the restriction?  --Stef
   (save-restriction
     (set-buffer gnus-message-buffer)
     (goto-char (point-min))




             reply	other threads:[~2009-10-28 19:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28 19:08 Stefan Monnier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-10-28 19:08 Suspicious code Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvy6mvtk70.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=bugs@gnus.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.