summaryrefslogtreecommitdiff
path: root/lisp/textmodes/makeinfo.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2001-12-30 19:33:13 +0000
committerRichard M. Stallman <rms@gnu.org>2001-12-30 19:33:13 +0000
commite04fd7a4ff581c3323f672e301894479ed4e3a3e (patch)
treec0d4fb20b41a93a81dcd0381c6331011c6d1fd42 /lisp/textmodes/makeinfo.el
parent7ad0c1c3217f7e2b47ebd07a2bec02a9e04f7685 (diff)
downloademacs-e04fd7a4ff581c3323f672e301894479ed4e3a3e.tar.gz
emacs-e04fd7a4ff581c3323f672e301894479ed4e3a3e.tar.bz2
emacs-e04fd7a4ff581c3323f672e301894479ed4e3a3e.zip
(makeinfo-compilation-sentinel):
Display the output buffer in a more intelligent way.
Diffstat (limited to 'lisp/textmodes/makeinfo.el')
-rw-r--r--lisp/textmodes/makeinfo.el12
1 files changed, 8 insertions, 4 deletions
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 ()