;;; makeinfo.el --- run makeinfo conveniently
-;; Copyright (C) 1991, 1993, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1993, 2001-2015 Free Software Foundation, Inc.
;; Author: Robert J. Chassell
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
;; Keywords: docs convenience
;; This file is part of GNU Emacs.
(with-current-buffer buffer
(revert-buffer t t))
(setq buffer (find-file-noselect makeinfo-output-file-name)))
- (if (window-dedicated-p (selected-window))
+ (if (window-dedicated-p)
(switch-to-buffer-other-window buffer)
(switch-to-buffer buffer)))
(goto-char (point-min))))
(setq makeinfo-output-node-name (makeinfo-current-node))
(save-excursion
- (makeinfo-compile
- (concat makeinfo-run-command " " makeinfo-options
- " " buffer-file-name)
- nil
- 'makeinfo-compilation-sentinel-buffer)))
+ (let ((default-directory (file-name-directory buffer-file-name)))
+ (makeinfo-compile
+ (concat makeinfo-run-command " " makeinfo-options
+ " " (file-name-nondirectory buffer-file-name))
+ nil
+ 'makeinfo-compilation-sentinel-buffer))))
(defun makeinfo-compilation-sentinel-buffer (proc msg)
"Sentinel for `makeinfo-compile' run from `makeinfo-buffer'."
;;; Place `provide' at end of file.
(provide 'makeinfo)
-;; arch-tag: 5f810713-3de2-4e20-8030-4bc3dd0d9604
;;; makeinfo.el ends here