]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/makeinfo.el
Merge from origin/emacs-24
[gnu-emacs] / lisp / textmodes / makeinfo.el
index 4b57e0b97463d9c9e28f8b802aa416370c5652b9..d62929b95b55f2edc886124da4ae0a49bc22c0b8 100644 (file)
@@ -1,9 +1,9 @@
 ;;; makeinfo.el --- run makeinfo conveniently
 
-;; Copyright (C) 1991, 1993, 2001-2013 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.
@@ -253,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'."