From: Sam Steingold Date: Mon, 1 Jul 2002 19:55:45 +0000 (+0000) Subject: (tex-file): call `save-some-buffers' before `tex-main-file' X-Git-Tag: ttn-vms-21-2-B4~14359 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7abc9addc7501da288dd0af9fd2bdcf8bcca0c6d;p=emacs.git (tex-file): call `save-some-buffers' before `tex-main-file' --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 46b59aae07a..75c485878ac 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2002-07-01 Sam Steingold + + * textmodes/tex-mode.el (tex-file): Call `save-some-buffers' + before `tex-main-file' because if the current buffer is new, its + file might not exist yet, and then `tex-main-file' will + incorrectly return "foo.tex.tex". + 2002-07-01 Juanma Barranquero * ido.el (ido-minibuffer-setup-hook): Doc fix. @@ -27,7 +34,7 @@ * info.el (Info-index): Get immediate error if used in `dir'. - * textmodes/picture.el (picture-forward-column) + * textmodes/picture.el (picture-forward-column) (picture-move-down): Never deactivate the mark. 2002-06-30 Simon Josefsson diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 4d4a7d9302e..b78c50b2ec1 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -529,9 +529,9 @@ An alternative value is \" . \", if you use a font with a narrow period." (list (concat slash citations opt arg) 3 'font-lock-constant-face) ;; ;; Text between `` quotes ''. - (cons (concat (regexp-opt `("``" "\"<" "\"`" "<<" "«") t) - "[^'\">»]+" ;a bit pessimistic - (regexp-opt `("''" "\">" "\"'" ">>" "»") t)) + (cons (concat (regexp-opt `("``" "\"<" "\"`" "<<" "k") t) + "[^'\">{]+" ;a bit pessimistic + (regexp-opt `("''" "\">" "\"'" ">>" "{") t)) 'font-lock-string-face) ;; ;; Command names, special and general. @@ -1678,10 +1678,10 @@ See \\[tex-file] for an alternative." This function is more useful than \\[tex-buffer] when you need the `.aux' file of LaTeX to have the correct name." (interactive) + (when tex-offer-save + (save-some-buffers)) (let* ((source-file (tex-main-file)) (file-dir (file-name-directory (expand-file-name source-file)))) - (if tex-offer-save - (save-some-buffers)) (if (tex-shell-running) (tex-kill-job) (tex-start-shell))