Suspicious code

View: New views
1 Messages — Rating Filter:   Alert me  

Suspicious code

by Stefan Monnier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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))