"Stephen J. Turnbull" <stephen(a)xemacs.org> wrote:
>>>>> "Jerry" == Jerry James
<james(a)xemacs.org> writes:
Jerry> And what's up with XEmacs trying to save to .emacs-places
Jerry> after I explicitly told it NOT to, several times?
The hook that that applet installs on kill-emacs-hook is probably broken.
That's what I thought, too, but it doesn't appear to be so. Here is the
hook function, from xemacs-packages/edit-utils/saveplace.el:
(defun save-place-alist-to-file ()
(let ((file (expand-file-name save-place-file)))
(save-excursion
(message "Saving places to %s..." file)
(set-buffer (get-buffer-create " *Saved Places*"))
(delete-region (point-min) (point-max))
(print save-place-alist (current-buffer))
(let ((version-control
(cond
((null save-place-version-control) nil)
((eq 'never save-place-version-control) 'never)
((eq 'nospecial save-place-version-control) version-control)
(t
t))))
(write-file file)
(kill-buffer (current-buffer))
(message "Saving places to %s...done" file)))))
Does anybody see anything wrong with that code? It looks to me like all
the hassles I had are due to write-file and kill-buffer. What happens
if write-file or kill-buffer throws an error? We are processing a hook
function, after all.
Another oddity was that everytime I tried this, I got another buffer.
Soon I had " *Saved Places*", " *Saved Places*<2>", "
*Saved
Places*<3>", etc. I didn't think get-buffer-create was supposed to do
that. The docstring certainly doesn't suggest that that is acceptable
behavior.
--
Jerry James
http://www.ittc.ku.edu/~james/