* Suspicious code
@ 2009-10-28 19:08 Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2009-10-28 19:08 UTC (permalink / raw)
To: bugs; +Cc: emacs-devel
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))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Suspicious code
@ 2009-10-28 19:08 Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2009-10-28 19:08 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-devel
Can you fix the code below or add comments explaining why
it's correct?
Thank you,
Stefan
--- lisp/org/org.el 4 Oct 2009 01:36:08 -0000 1.56
+++ lisp/org/org.el 28 Oct 2009 18:47:51 -0000
@@ -17193,6 +17189,7 @@
'org-imenu t))
(setq m (get-text-property p 'org-imenu-marker))
(save-excursion
+ ;; Shouldn't the set-buffer be done before save-restriction? --Stef
(save-restriction
(set-buffer (marker-buffer m))
(goto-char m)
@@ -17207,6 +17204,7 @@
txt (buffer-substring-no-properties (or tp (point-min))
(or np (point-max))))
(save-excursion
+ ;; Shouldn't the set-buffer be done before save-restriction? --Stef
(save-restriction
(set-buffer (find-file-noselect
(let ((default-directory dir))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-28 19:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-28 19:08 Suspicious code Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
2009-10-28 19:08 Stefan Monnier
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.