From: Richard M. Stallman Date: Sun, 30 Dec 2001 19:33:13 +0000 (+0000) Subject: (makeinfo-compilation-sentinel): X-Git-Tag: ttn-vms-21-2-B4~17405 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e04fd7a4ff581c3323f672e301894479ed4e3a3e;p=emacs.git (makeinfo-compilation-sentinel): Display the output buffer in a more intelligent way. --- diff --git a/lisp/textmodes/makeinfo.el b/lisp/textmodes/makeinfo.el index 9370ee80894..b4857e0d143 100644 --- a/lisp/textmodes/makeinfo.el +++ b/lisp/textmodes/makeinfo.el @@ -193,10 +193,14 @@ command to gain use of `next-error'." (if (and makeinfo-temp-file (file-exists-p makeinfo-temp-file)) (delete-file makeinfo-temp-file)) ;; Always use the version on disk. - (if (get-file-buffer makeinfo-output-file-name) - (progn (set-buffer makeinfo-output-file-name) - (revert-buffer t t)) - (find-file makeinfo-output-file-name)) + (let ((buffer (get-file-buffer makeinfo-output-file-name))) + (if buffer + (with-current-buffer buffer + (revert-buffer t t)) + (setq buffer (find-file-noselect makeinfo-output-file-name))) + (if (window-dedicated-p (selected-window)) + (switch-to-buffer-other-window buffer) + (switch-to-buffer buffer))) (goto-char (point-min))) (defun makeinfo-buffer ()