changeset 51796:09e60f24d0c4

(tex-main-file): Use with-no-warnings.
author Richard M. Stallman <rms@gnu.org>
date Mon, 07 Jul 2003 20:52:27 +0000
parents cd4ac91f52c9
children 7ea30d8ab42d
files lisp/textmodes/tex-mode.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el	Mon Jul 07 20:50:15 2003 +0000
+++ b/lisp/textmodes/tex-mode.el	Mon Jul 07 20:52:27 2003 +0000
@@ -1651,8 +1651,10 @@
   "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")