Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
725b7428
Commit
725b7428
authored
Dec 29, 1996
by
Richard M. Stallman
Browse files
(tex-first-line-header-regexp): New variable.
(tex-region): Sometimes include the file's first line.
parent
d34c1b05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
lisp/textmodes/tex-mode.el
lisp/textmodes/tex-mode.el
+15
-0
No files found.
lisp/textmodes/tex-mode.el
View file @
725b7428
...
...
@@ -41,6 +41,13 @@ You can make this `/tmp' if your TEXINPUTS has no relative directories in it
and you don't try to apply \\[tex-region] or \\[tex-buffer] when there are
`\\input' commands with relative directories."
)
;;;###autoload
(
defvar
tex-first-line-header-regexp
nil
"Regexp for matching a first line which `tex-region' should include.
If this is non-nil, it should be a regular expression string;
if it matches the first line of the file,
`tex-region' always includes the first line in the TeX run."
)
;;;###autoload
(
defvar
tex-main-file
nil
"*The main TeX source file which includes this buffer's file.
...
...
@@ -1010,6 +1017,14 @@ The value of `tex-command' specifies the command to use to run TeX."
(
hbeg
(
point-min
))
(
hend
(
point-min
))
(
default-directory
zap-directory
))
(
goto-char
(
point-min
))
;; Maybe copy first line, such as `\input texinfo', to temp file.
(
and
tex-first-line-header-regexp
(
looking-at
tex-first-line-header-regexp
)
(
write-region
(
point
)
(
progn
(
forward-line
1
)
(
point
))
tex-out-file
nil
nil
))
;; Initialize the temp file with either the header or nothing
(
if
(
re-search-forward
tex-start-of-header
search-end
t
)
(
progn
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment