Commit graph

114 commits

Author SHA1 Message Date
Sam Steingold
713f7b15b0 tex-shell-running: Check the process buffer too 2001-02-15 21:08:24 +00:00
Stefan Monnier
07c16ec439 (tex-start-shell): Obey shell-file-name.
(tex-main-file, tex-file): Simplify.
(tex-generate-zap-file-name): Use subst-char-in-string.
(tex-strip-dots): Remove.
2000-12-02 21:57:41 +00:00
Stefan Monnier
1598a9616b (tex-font-lock-keywords-1): Fix ARG regexp to skip quoted braces.
(tex-font-lock-keywords-2): Fix ARG regexp to skip quoted braces.
Remove `bf' and `it' from `bold' and `italic' (they were wrong and
are (correctly) handled separately).
Remove `caption' and `footnote' from `citations': they contain text.
Don't highlight `textmd', `texttt' and `textrm' with bold-italic.
(latex-skeleton-end-hook): New function.
(latex-mode): Use it.
(tex-start-tex-marker): Remove.
(tex-send-tex-command): Don't set tex-start-tex-marker.
(tex-error-parse-syntax-table): New var.
(tex-compilation-parse-errors): Use it.
Ignore tex-start-tex-marker.  Don't bother with marker-position.
(tex-validate-buffer): Don't bother with marker-position.
2000-11-22 21:38:04 +00:00
Stefan Monnier
ae523e577e (tex-mode-map): Remove `tex-compile', not ready for prime-time. 2000-11-14 11:50:40 +00:00
Stefan Monnier
bdbd960600 (tex-font-lock-keywords-1): Use `keep'
rather than `prepend' and add an interesting comment.
(tex-math-face, tex-font-lock-syntactic-face-function):
New face and function to use it.
(tex-define-common-keys, tex-mode-map): Use menu-item rather
than `menu-enable' symbol property.
(tex-mode-map): Bind {, (, [ and $ to skeleton-pair-insert-maybe.
(tex-mode): Add some latex-mode commands for auto-selection.
Use tex-font-lock-syntactic-face-function.
(tex-insert-quote): Simplify.
(tex-shell): New mode.
(tex-start-shell): Use it.
(tex-shell-proc, tex-shell-buf): New functions.
(tex-send-command): Use it.
(tex-main-file): Fix the meaning of the new arg REALFILE.
(tex-send-tex-command): New function split from `tex-start-tex'.
Set compilation-last-buffer and compilation-parsing-end.
2000-11-14 11:41:51 +00:00
Stefan Monnier
dd459839da (standard-latex-block-names): Add "math".
(latex-mode): Tweak tex-*-(head|trail)er regexps.
Tweak paragraph regexps to allow a leading [ \t]*.
(tex-latex-block): Insert a newline if necessary.
(latex-insert-item): Only insert a newline if necessary.
(tex-guess-main-file): New function.
(tex-main-file): Use it.  Add arg `realfile'.  Trim `.tex'.
Set tex-main-file if TeX-master is provided.
(tex-latex-indent-syntax-table): Map ( and ) to punctuation.
2000-11-10 10:25:00 +00:00
Sam Steingold
a403261168 use default-directory when tex-main-file has no directory 2000-10-31 21:31:55 +00:00
Stefan Monnier
ea590e1c63 Require CL when compiling.
(tex-mode-syntax-table): Init immediately.
(tex-mode-map): Bind M-RET to latex-insert-item.
(latex-mode): Set indent-line-function to latex-indent.
(tex-common-initialization): Don't setup the syntax-table any more.
(latex-insert-item): New skeleton.
(tex-next-unmatched-end): Fix copy/paste braino.
(latex-syntax-after, latex-skip-close-parens, latex-down-list)
(latex-indent, latex-find-indent): New functions.
(tex-indent-allhanging, tex-indent-arg, tex-latex-indent-syntax-table)
(tex-indent-item, tex-indent-item-re, tex-indent-basic): New vars.
(tex-compilation-parse-errors): Use with-syntax-table.
2000-10-15 03:48:17 +00:00
Stefan Monnier
53c4fe4786 (latex-metasection-list): New var.
(latex-imenu-create-index): Use it.
Move the regexp construction outside loops (and use push).
(tex-font-lock-keywords-1, tex-font-lock-keywords-2)
(tex-font-lock-keywords): Moved from font-lock.el.
(tex-comment-indent): Remove.
(tex-common-initialization): Don't set comment-indent-function.
(latex-block-default): New var.
(tex-latex-block): Use it to provide a default choice.
Add any unknown choice to latex-block-names.
Insert [...] after {...}.
(tex-last-unended-begin): Simplify regexp.
(tex-goto-last-unclosed-latex-block, latex-backward-sexp-1)
(latex-forward-sexp-1, latex-forward-sexp): New functions.
(latex-mode): Set forward-sexp-function.
2000-10-01 00:47:41 +00:00
Gerd Moellmann
4e9b8ebe4e (latex-outline-regexp): Don't use `list*';
it's a function from CL.
(latex-imenu-create-index): Replace eval-when-compile with progn
because latex-section-alist is not bound while compiling.
2000-09-29 08:46:30 +00:00
Stefan Monnier
d6709b8094 (latex-imenu-indent-string): Add a space.
(latex-outline-regexp): New var.
(latex-outline-level): New fun.
(latex-section-alist): New var.
(latex-imenu-create-index): Use it.  Use `push' as well.
(tex-shell-map): Initialize it properly.
(tex-mode): Minor stylistic change.
(plain-tex-mode): Use define-derived-mode.
(latex-mode): Use define-derived-mode.
Construct the paragraph regexps in a more readable way.
Set the buffer-local outline-{level,regexp} vars.
(slitex-mode): Derive from latex-mode.
(tex-common-initialization): Don't kill-all-vars anymore.
Add setting for comment-add and font-lock-defaults.
(tex-start-shell): Use with-current-buffer and don't re-init keymap.
(tex-main-file): New fun.  Obey TeX-master as well and remove `.tex'.
(tex-start-tex): New arg DIR (and send a chdir command for it).
Also display the shell buffer and save it in tex-last-buffer-texed.
(tex-region): Use expand-file-name rather than concat.
Remove code made useless by changes in tex-start-tex.
(tex-file): Use tex-main-file and adapt to new tex-start-tex.
2000-09-29 01:45:46 +00:00
Stefan Monnier
c0df1972b2 Don't quote lambda. 2000-08-16 21:05:37 +00:00
Gerd Moellmann
9920303f6d (tex-default-mode): Changed to latex-mode. 1999-11-01 12:34:43 +00:00
Richard M. Stallman
ee13a145ea (tex-compilation-parse-errors):
Use a marker instead of an integer for `compilation-parsing-end'.
1999-08-28 18:22:20 +00:00
Andreas Schwab
0959218256 (tex-start-shell): Use add-hook for
comint-input-filter-functions.  Make variables related to shell
directory tracking local.
1999-03-29 09:06:05 +00:00
Richard M. Stallman
c3ce7bf4ec (tex-run-command, latex-run-command)
(slitex-run-command, tex-command): Doc changes.
(tex-start-options-string): Autoload it.  Doc change.  Provide
a menu for customization.  Allow nil.  Quote backslashes only once.
(tex-start-tex): Handle nil value of tex-start-options-string
and apply shell-quote-argument to it.
1999-02-16 10:39:24 +00:00
Richard M. Stallman
bed1b0c890 When compiling, require compare-w and skeleton
to pacify the byte-compiler.  Move the def's of the tex-commands
together.  Add a comment on kill-process vs. quit-process.
1999-02-07 07:28:45 +00:00
Markus Rost
e6b0b77374 (tex-mode-map): Replace validate-tex-buffer by
tex-validate-buffer.
(plain-tex-mode, latex-mode, slitex-mode): Likewise.
(tex-validate-buffer): Renamed from validate-tex-buffer.  Works
now with recent occur-mode.
(tex-validate-region): Really walk through all Sexps.
(tex-region): Bind shell-dirtrack-verbose.
(tex-file, tex-bibtex-file): Likewise.
1999-01-29 22:06:31 +00:00
Karl Heuer
2bfe16dbb3 (tex-run-command): Doc fix. 1999-01-25 16:31:15 +00:00
Richard M. Stallman
f05bd64539 (tex-define-common-keys): Remove key binding of tex-feed-input.
(tex-mode-map): Bind tex-feed-input here.
(tex-start-shell): Use compilation-shell-minor-mode.  Set
comint-input-filter-functions before running tex-shell-hook.
(tex-start-tex): Forget compilation errors.
(tex-compilation-parse-errors): Rewritten to work also with
compile-mouse-goto-error and compile-goto-error.  Adjusted to
change in tex-region.
(tex-region): For the temp file use file-name without directory.
(tex-file): Expand file name of tex-print-file.
1999-01-19 20:28:05 +00:00
Richard M. Stallman
5616ee4617 (latex-run-command): Doc fix.
(tex-command): Doc fix.
(tex-compilation-parse-errors): Doc fix.
(tex-generate-zap-file-name): Don't start the name with -.
(tex-expand-files): Works now also with strings ending with ":".
1999-01-18 01:18:19 +00:00
Karl Heuer
f5cdb8516a (tex-generate-zap-file-name): Don't start the name with #. 1998-12-10 03:17:51 +00:00
Richard M. Stallman
033306e36b (tex-feed-input): New function.
(tex-define-common-keys): Add binding for C-c C-m.
1998-11-25 01:07:19 +00:00
Karl Heuer
f11436793c (tex-start-shell): Track directory changes. 1998-11-05 19:15:36 +00:00
Richard M. Stallman
c0fdc5b716 (tex-start-options-string): Quote the backslashes with more backslashes. 1998-10-31 23:55:32 +00:00
Karl Heuer
6633b89142 (tex-run-command): Doc fix.
(tex-start-tex): Don't use tex-start-options-string in star case.
Quote file name in star case as well as in non-star.
Add blank and quoting of option string here.
(tex-start-options-string): Not here.
1998-09-25 20:30:42 +00:00
Karl Heuer
691d39b7b4 (tex-compilation-parse-errors):
More general code to use the source buffer instead of the zap file.
1998-09-21 19:44:20 +00:00
Karl Heuer
514e1703dc (tex-start-tex): Call comint-quote-filename. 1998-09-10 15:26:44 +00:00
Karl Heuer
1f882e21d6 (tex-start-options-string): New option.
(tex-start-tex): Use that variable.
1998-09-04 20:39:26 +00:00
Richard M. Stallman
be4a962d1c (tex-main-file): Doc fix. 1998-07-29 06:10:52 +00:00
Richard M. Stallman
02fd229c46 (tex-delete-last-temp-files): Use file-name-sans-extensions. 1998-07-06 22:41:48 +00:00
Karl Heuer
68dabb618a Undo May 15 change. 1998-05-30 15:14:47 +00:00
Richard M. Stallman
1ea3de08e7 (tex-command-end): New variable.
(tex-start-tex): Use it.
(plain-tex-mode): Locally set tex-command-end.
(tex-common-initialization): Make local binding for it.x
1998-05-19 04:27:28 +00:00
Richard M. Stallman
2974ad46db (tex-start-shell): Call compilation-minor-mode. 1998-03-30 04:23:58 +00:00
Richard M. Stallman
460e1b7d32 (tex-send-command): Return the process.
(tex-start-tex): New function.
(tex-region, tex-file): Use tex-start-tex.
(tex-start-tex-marker): New variable.

(tex-compilation-parse-errors): Completely rewritten.
(tex-print): Reset or restart the subshell before using it.
1998-03-30 04:21:52 +00:00
Richard M. Stallman
9bd4f69c5d (latex-mode): Set fill-nobreak-predicate.
(slitex-mode): Set fill-nobreak-predicate, tex-face-alist,
and imenu-create-index-function.
(latex-fill-nobreak-predicate): New function.
1998-03-09 06:36:25 +00:00
Karl Heuer
2ed2806cd9 (tex-validate-region): Really check
for mismatched parens.
1997-10-31 23:03:30 +00:00
Richard M. Stallman
2be5fefb86 (tex-categorize-whitespace): Use eq, not eql. 1997-07-24 04:21:34 +00:00
Richard M. Stallman
822eddf41c (tex-common-initialization):
Set search-whitespace-regexp locally.
1997-07-04 04:41:46 +00:00
Richard M. Stallman
a53c647b51 (latex-imenu-create-index): Make it much smarter.
(latex-imenu-indent-string): New variable.
1997-06-23 00:30:48 +00:00
Richard M. Stallman
d61140e89d Add defgroup's; use defcustom for user vars. 1997-04-13 07:28:48 +00:00
Richard M. Stallman
6d34c59ffb (tex-region): Correctly handle possible
overlap between first line, header, and region.
New local var ALREADY-OUTPUT makes this general.
Write tex-trailer directly as a string; get rid of temp-buffer.
Make tex-out-file include the .tex suffix.
1997-01-02 01:30:36 +00:00
Richard M. Stallman
725b742881 (tex-first-line-header-regexp): New variable.
(tex-region): Sometimes include the file's first line.
1996-12-29 19:41:52 +00:00
Richard M. Stallman
23b6422580 (tex-file): Fix paren error in last change.
(tex-recenter-output-buffer): Switch windows in a more controlled
fashion, using save-selected-window.
1996-10-31 23:50:02 +00:00
Richard M. Stallman
ebe15e27ee (tex-main-file): Add missing initial value.
(tex-file): Set tex-print-file to source-file always.
1996-09-27 20:42:12 +00:00
Richard M. Stallman
f73741fc23 (tex-main-file): New variable.
(tex-file): Use that.  Rename local var to source-file
so it is obviously local.
1996-08-25 01:25:07 +00:00
Karl Heuer
710a0f533a (tex-validate-region): Skip fwd over whitespace
and punctuation, to find point of mismatch.
(validate-tex-buffer): Don't include the blank lines
before a paragraph in the paragraph being checked.
1996-07-11 23:55:01 +00:00
Richard M. Stallman
cf149bdfae (tex-common-initialization): Set skeleton-further-elements.
(tex-latex-block): Define as a skeleton.
1996-06-25 22:44:10 +00:00
Richard M. Stallman
a5e2ae0112 (latex-imenu-create-index):
Change the regexp to match the * versions of commands.
(latex-mode): Make imenu-create-index-function buffer-local.
1996-05-15 15:17:41 +00:00
Richard M. Stallman
9596811a3d Comment change. 1996-03-02 06:37:35 +00:00