]> git.eshelyaron.com Git - emacs.git/commitdiff
(tex-main-file): Add a compatibility with AUCTeX.
authorMarkus Rost <rost@math.uni-bielefeld.de>
Wed, 1 Dec 2004 04:08:34 +0000 (04:08 +0000)
committerMarkus Rost <rost@math.uni-bielefeld.de>
Wed, 1 Dec 2004 04:08:34 +0000 (04:08 +0000)
lisp/ChangeLog
lisp/textmodes/tex-mode.el

index a5be7b062ef9d2915aed3b464d369a738a5bf47c..491bfe9ace4af8ce620523b53e2c0dd6d106eb04 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-30  Markus Rost  <rost@ias.edu>
+
+       * textmodes/tex-mode.el (tex-main-file): Add a compatibility with
+       AUCTeX.
+
 2004-11-30  Jay Belanger  <belanger@truman.edu>
 
        * calc/calc-arith.el (math-possible-signs): Made stronger checks
index cb5bf24badd0a8a863dec3f9b6177adfbd3b3bc8..91b3d2afdfd6f20e60bb8885483b283efa6c1120 100644 (file)
@@ -1693,9 +1693,12 @@ of the current buffer."
   (let* ((file (or tex-main-file
                   ;; Compatibility with AUCTeX.
                   (with-no-warnings
-                   (when (and (boundp 'TeX-master) (stringp TeX-master))
-                     (make-local-variable 'tex-main-file)
-                     (setq tex-main-file TeX-master)))
+                   (when (boundp 'TeX-master)
+                     (cond ((stringp TeX-master)
+                            (make-local-variable 'tex-main-file)
+                            (setq tex-main-file TeX-master))
+                           ((and (eq TeX-master t) buffer-file-name)
+                            (file-relative-name buffer-file-name)))))
                   ;; Try to guess the main file.
                   (if (not buffer-file-name)
                       (error "Buffer is not associated with any file")