[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
The correct patch
From: |
Olive |
Subject: |
The correct patch |
Date: |
Tue, 29 Mar 2005 22:53:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 |
I submited a patch to correct the fact that the standard tex-mode fails
for files containing special characters. I submited here the correct (I
hope) patch (I have forget a few things in the last patch). I have also
correct a bug which prevent tex-region to work.
In this patch I have replaced the call to "comint-quote-argument" with
"shell-quote-argument" which I think is much better.
Note that some implementation of tex fails for files containing special
characters (TeTeX for instance); in this case nothing can be done in emacs.
This patch is (I think) of some importance for user of MS-Windows due to
the spaces present in "Documents and Settings") (I have not tested in
under Windows myself; I much prefer GNU/Linux).
I am currenctly implementating forward and inverse search with the
standard TeX mode. This is not in this patch (since it does not correct
a bug) but if someone is interested, just mail me (and please don't tell
me to use auctex).
Olive
*** tex-mode.el.orig 2005-03-29 22:17:07.000000000 +0200
--- tex-mode.el 2005-03-29 22:23:30.000000000 +0200
***************
*** 781,787 ****
(setq tex-command latex-run-command)
(setq tex-start-of-header "\\\\document\\(style\\|class\\)")
(setq tex-end-of-header "\\\\begin\\s-*{document}")
! (setq tex-trailer "\\end\\s-*{document}\n")
;; A line containing just $$ is treated as a paragraph separator.
;; A line starting with $$ starts a paragraph,
;; but does not separate paragraphs if it has more stuff on it.
--- 781,787 ----
(setq tex-command latex-run-command)
(setq tex-start-of-header "\\\\document\\(style\\|class\\)")
(setq tex-end-of-header "\\\\begin\\s-*{document}")
! (setq tex-trailer "\\end{document}\n")
;; A line containing just $$ is treated as a paragraph separator.
;; A line starting with $$ starts a paragraph,
;; but does not separate paragraphs if it has more stuff on it.
***************
*** 1352,1359 ****
(concat
(if file
(if star (concat (substring cmd 0 star)
! file (substring cmd (1+ star)))
! (concat cmd " " file))
cmd)
(if background "&" ""))))
;; Switch to buffer before checking for subproc output in it.
--- 1352,1359 ----
(concat
(if file
(if star (concat (substring cmd 0 star)
! (shell-quote-argument file) (substring cmd
(1+ star)))
! (concat cmd " " (shell-quote-argument file)))
cmd)
(if background "&" ""))))
;; Switch to buffer before checking for subproc output in it.
***************
*** 1444,1456 ****
(compile-command
(if star
(concat (substring command 0 star)
! (comint-quote-filename file)
(substring command (1+ star)))
(concat command " "
(if (< 0 (length tex-start-options-string))
(concat
(shell-quote-argument tex-start-options-string) " "))
! (comint-quote-filename file)))))
(tex-send-tex-command compile-command dir)))
(defun tex-send-tex-command (cmd &optional dir)
--- 1444,1456 ----
(compile-command
(if star
(concat (substring command 0 star)
! (shell-quote-argument file)
(substring command (1+ star)))
(concat command " "
(if (< 0 (length tex-start-options-string))
(concat
(shell-quote-argument tex-start-options-string) " "))
! (shell-quote-argument file)))))
(tex-send-tex-command compile-command dir)))
(defun tex-send-tex-command (cmd &optional dir)
- The correct patch,
Olive <=