all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Patch for tex-mode.el (more compatibility with AUCTeX)
@ 2004-11-27 23:40 Markus Rost
  2004-11-28 11:47 ` David Kastrup
  2004-11-29  6:11 ` Richard Stallman
  0 siblings, 2 replies; 4+ messages in thread
From: Markus Rost @ 2004-11-27 23:40 UTC (permalink / raw)


Currently tex-mode supports the variable TeX-master (from AUCTeX) if
it is a string.  See lines 1694-1698 in tex-mode.el.  I suggest to
support the variable TeX-master also if it is set to 't.  In that case
the "master" of the file is the file itself, so the right thing is to
run TeX on the buffer's file.  What about the following patch for
tex-mode.el?  Stefan?

I have a bunch of old .tex files which have Local Variable sections
created by AUCTeX.  The patch would make tex-mode handle those files
better.


	* textmodes/tex-mode.el (tex-main-file): Add a compatibility with
	AUCTeX.


===Buffer *vc-diff*=========================================
*** tex-mode.el.~1.150.~	Mon Oct 25 16:35:24 2004
--- tex-mode.el	Sat Nov 27 18:20:28 2004
***************
*** 1700,1709 ****
  		   (if (not buffer-file-name)
  		       (error "Buffer is not associated with any file")
  		     (file-relative-name
! 		      (if (save-excursion
! 			    (goto-char (point-min))
! 			    (re-search-forward tex-start-of-header
! 					       (+ (point) 10000) t))
  			  ;; This is the main file.
  			  buffer-file-name
  			;; This isn't the main file, let's try to find better,
--- 1700,1713 ----
  		   (if (not buffer-file-name)
  		       (error "Buffer is not associated with any file")
  		     (file-relative-name
! 		      (if (or
! 			   ;; Compatibility with AUCTeX.
! 			   (with-no-warnings
! 			    (and (boundp 'TeX-master) (eq TeX-master t)))
! 			   (save-excursion
! 			     (goto-char (point-min))
! 			     (re-search-forward tex-start-of-header
! 						(+ (point) 10000) t)))
  			  ;; This is the main file.
  			  buffer-file-name
  			;; This isn't the main file, let's try to find better,
============================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-11-29 21:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-27 23:40 Patch for tex-mode.el (more compatibility with AUCTeX) Markus Rost
2004-11-28 11:47 ` David Kastrup
2004-11-29  6:11 ` Richard Stallman
2004-11-29 21:08   ` Markus Rost

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.