1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

(reftex-access-parse-file): Do not risk destroying an existing buffer.

This commit is contained in:
Reiner Steib 2007-07-22 18:55:07 +00:00
parent af849acd5d
commit 49bbf1b953
2 changed files with 7 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2007-07-22 Ralf Angeli <angeli@caeruleus.net>
* textmodes/reftex.el (reftex-access-parse-file): Do not risk
destroying an existing buffer.
2007-07-22 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* startup.el (command-line-x-option-alist): Use x-handle-no-bitmap-icon.

View File

@ -1331,10 +1331,8 @@ Valid actions are: readable, restore, read, kill, write."
(put docstruct-symbol 'modified nil)
(save-excursion
(if (file-writable-p file)
(progn
(with-temp-file file
(message "Writing parse file %s" (abbreviate-file-name file))
(set-buffer (get-buffer-create file))
(erase-buffer)
(insert (format ";; RefTeX parse info file\n"))
(insert (format ";; File: %s\n" master))
(insert (format ";; User: %s (%s)\n\n"
@ -1357,9 +1355,7 @@ Valid actions are: readable, restore, read, kill, write."
)
(t (print x))))
list))
(insert "))\n\n")
(write-region (point-min) (point-max) file nil 'silent)
(kill-buffer (current-buffer)))
(insert "))\n\n"))
(error "Cannot write to file %s" file)))
t))))