[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Suspicious code
From: |
Stefan Monnier |
Subject: |
Suspicious code |
Date: |
Wed, 28 Oct 2009 15:08:41 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
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))
- Suspicious code,
Stefan Monnier <=