From: Richard M. Stallman Date: Mon, 7 Jul 2003 20:52:27 +0000 (+0000) Subject: (tex-main-file): Use with-no-warnings. X-Git-Tag: ttn-vms-21-2-B4~9451 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=96c0d9e9531ab90568efca4e2599fa18d8a5666e;p=emacs.git (tex-main-file): Use with-no-warnings. --- diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index a7b2d8e8f81..ca345f8b635 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1651,8 +1651,10 @@ of the current buffer." "Return the relative name of the main file." (let* ((file (or tex-main-file ;; Compatibility with AUCTeX. - (and (boundp 'TeX-master) (stringp TeX-master) - (set (make-local-variable 'tex-main-file) TeX-master)) + (with-no-warnings + (when (and (boundp 'TeX-master) (stringp TeX-master)) + (make-local-variable 'tex-main-file) + (setq tex-main-file TeX-master))) ;; Try to guess the main file. (if (not buffer-file-name) (error "Buffer is not associated with any file")