X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/d52969e8afaa19ed1acc01f4ff0bb651bf7869a7..0e963201d03d9229bb8ac4323291d2b0119526ed:/lisp/textmodes/makeinfo.el diff --git a/lisp/textmodes/makeinfo.el b/lisp/textmodes/makeinfo.el index 5cf1ea9c5f..16ce88dd83 100644 --- a/lisp/textmodes/makeinfo.el +++ b/lisp/textmodes/makeinfo.el @@ -1,10 +1,9 @@ ;;; makeinfo.el --- run makeinfo conveniently -;; Copyright (C) 1991, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +;; Copyright (C) 1991, 1993, 2001-2016 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. @@ -67,7 +66,7 @@ The name of the file is appended to this string, separated by a space." "String containing options for running `makeinfo'. Do not include `--footnote-style' or `--paragraph-indent'; the proper way to specify those is with the Texinfo commands -`@footnotestyle` and `@paragraphindent'." +`@footnotestyle' and `@paragraphindent'." :type 'string :group 'makeinfo) @@ -212,7 +211,7 @@ nonsensical results." (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)))) @@ -229,7 +228,7 @@ nonsensical results." "Make Info file from current buffer. Use the \\[next-error] command to move to the next error -\(if there are errors\)." +\(if there are errors)." (interactive) (cond ((null buffer-file-name) @@ -254,11 +253,12 @@ Use the \\[next-error] command to move to the next error (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'." @@ -289,5 +289,4 @@ line LINE of the window, or centered if LINE is nil." ;;; Place `provide' at end of file. (provide 'makeinfo) -;; arch-tag: 5f810713-3de2-4e20-8030-4bc3dd0d9604 ;;; makeinfo.el ends here