浏览代码

org-odt.el: Fix Emacs bug #13197.

* org-odt.el (org-odt-cleanup-xml-buffers): Fix Emacs
Bug#13197 by setting the correct buffer before marking it
unmodified to silently kill him.

Thanks to Drew Adams for reporting this and to Jambunathan for
offering to fix it.
Bastien Guerry 12 年之前
父节点
当前提交
de84aadf8f
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      lisp/org-odt.el

+ 5 - 5
lisp/org-odt.el

@@ -439,11 +439,11 @@ values.  See Info node `(emacs) File Variables'."
 				"meta.xml" "styles.xml")))
 	       ;; kill all xml buffers
 	       (mapc (lambda (file)
-		       (let ((buf (find-file-noselect
-				   (expand-file-name file org-odt-zip-dir) t)))
-			 (when (buffer-name buf)
-			   (set-buffer-modified-p nil)
-			   (kill-buffer buf))))
+		       (with-current-buffer
+			   (find-file-noselect
+			    (expand-file-name file org-odt-zip-dir) t)
+			 (set-buffer-modified-p nil)
+			 (kill-buffer)))
 		     xml-files))
 	     ;; delete temporary directory.
 	     (delete-directory org-odt-zip-dir t)))))