From a403261168fe5c6f27f8ca7fcfc65dafc9ca3991 Mon Sep 17 00:00:00 2001 From: Sam Steingold Date: Tue, 31 Oct 2000 21:31:55 +0000 Subject: [PATCH] use default-directory when tex-main-file has no directory --- lisp/ChangeLog | 5 +++++ lisp/textmodes/tex-mode.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e951b7ae8a0..29e40f668ee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-10-31 Sam Steingold + + * textmodes/tex-mode.el (tex-file): Use `default-directory' when + `tex-main-file' does not have directory in it. + 2000-10-31 Stefan Monnier * cus-edit.el (custom-mode-map): Switch back to a sparse keymap. diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index d39f40ad4ba..1faa2a257f0 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1528,7 +1528,8 @@ This function is more useful than \\[tex-buffer] when you need the `.aux' file of LaTeX to have the correct name." (interactive) (let* ((source-file (tex-main-file)) - (file-dir (expand-file-name (file-name-directory source-file)))) + (file-dir (expand-file-name (or (file-name-directory source-file) + default-directory)))) (if tex-offer-save (save-some-buffers)) (if (tex-shell-running) -- 2.39.5