Commit graph

129 commits

Author SHA1 Message Date
Richard M. Stallman
602503c5e2 (tex-print): Call shell-quote-argument on the file name. 2002-12-22 22:03:22 +00:00
Stefan Monnier
7afecb99cb (latex-standard-block-names): Rename from standard-latex-block-names.
(tex-font-lock-keywords-1): Add providecommand, renewenvironment, and
renewtheorem.  Highlight \it and \bf separately since they may overlap.
(tex-font-lock-suscript, tex-font-lock-unfontify-region): New funs.
(tex-font-lock-keywords-3, tex-verbatim-environments)
(tex-font-lock-syntactic-keywords): New vars.
(superscript, subscript, tex-verbatim-face): New faces.
(tex-font-lock-syntactic-face-function): Handle \verb construct.
(tex-common-initialization): Update font-lock-defaults setting.
(tex-insert-braces): Make it into a skeleton.
(latex-fill-nobreak-predicate): Don't break after \.
(latex-insert-block): Rename from tex-latex-block.
(latex-down-list): Use tex-mode-syntax-table when skipping parens
rather than the indentation syntax-table.
(latex-close-block): Rename from tex-close-latex-block.
(latex-split-block): New fun.
(latex-indent): Don't indent inside a verbatim block.
(latex-find-indent): Stick \begin{verbatim} to the margin.
2002-11-08 16:56:57 +00:00
Richard M. Stallman
746c30e216 (tex-dvi-view-command): Value can be sexp.
Initialize to a suitable sexp.
(tex-view): Evaluate tex-dvi-view-command and use the value.
2002-11-06 05:05:47 +00:00
Stefan Monnier
5ae0d69704 (tex-common-initialization): comment-start-skip shouldn't match on next line. 2002-11-02 02:16:36 +00:00
Stefan Monnier
95a045bd7f Set encoding to utf-8.
(tex-start-options): Make it into always-a-string.
Remove silly custom options that are covered by the other var.
(tex-start-commands): Fix docstring.
(tex-open-quote, tex-close-quote): Add options.
(tex-command): Provide default.
(tex-font-lock-keywords-1): Highlight $$...$$.
(tex-font-lock-keywords-2): Fix latin-1 chars.
(tex-mode-map): Remove redundant \t binding.
(tex-mode): Add `subsection' and `newcommand' to known latex cmds.
(latex-mode): Use add-hook for fill-nobreak-predicate.
(tex-common-initialization): Set indent-tabs-mode to nil.
(tex-insert-quote): Undo magic if invoked twice in a row.
(latex-fill-nobreak-predicate): Don't use narrowing.
(tex-latex-block): Don't cons uselessly.
(tex-last-unended-begin): Signal user-friendlier error.
(tex-goto-last-unclosed-latex-block): Don't catch signal.
(tex-start-tex): Switch order of tex-start-options and
tex-start-commands to make it obey docstrings.
2002-07-14 20:39:18 +00:00
Sam Steingold
7abc9addc7 (tex-file): call save-some-buffers' before tex-main-file' 2002-07-01 19:55:45 +00:00
Colin Walters
52ab062c96 (tex-validate-buffer): Use `occur-revert-arguments' instead of setting
`occur-nlines' and `occur-buffer'.  Don't test for `input-pending-p'
in loop.  Set text property `occur-target' instead of `occur'.
2002-05-01 05:22:08 +00:00
Richard M. Stallman
9e0ad27acd (tex-start-options): New variable.
(tex-start-commands): New variable.
(tex-start-options-string): Variable deleted.
(tex-start-tex): Use tex-start-options and tex-start-commands,
not tex-start-options-string.
(tex-command): Doc fix.
2002-04-26 21:19:24 +00:00
Stefan Monnier
cb30255a83 (tex-guess-main-file): Handle the case where one of the buffers is narrowed. 2002-03-04 01:39:29 +00:00
Andreas Schwab
1b741d9e27 (tex-font-lock-keywords-2): Require non-letter after specials. 2002-02-15 17:06:58 +00:00
Pavel Janík
5553563924 Some fixes to follow coding conventions in files maintained by FSF. 2001-07-15 16:15:35 +00:00
Eli Zaretskii
a865de85da (tex-validate-buffer): Add help-echo to mouse-highlighted text. 2001-06-17 11:25:12 +00:00
Stefan Monnier
8908cf40d5 (latex-find-indent): Handle the BOBP case. 2001-05-31 02:26:43 +00:00
Sam Steingold
b781e739bf fix live process/dead buffer bub on w32 2001-05-29 15:47:01 +00:00
Stefan Monnier
15ca8de7fd (tex-mode-syntax-table): Add ^.
(tex-font-lock-keywords-1, tex-font-lock-keywords-2):
Allow spaces around macro arguments.
(tex-mode-map): Inherit from text-mode-map, but rebind \t to
indent-for-tab-command.
(latex-mode-map, plain-tex-mode-map): New keymaps.
Inherit from tex-mode-map.
(tex-common-initialization): Don't setup the keymap any more
since it's now done right by define-derived-mode.
(latex-mode): Set skeleton-end-hook to nil.
(latex-skeleton-end-hook): Remove.
(tex-latex-block, latex-insert-item): Simplify.
(latex-syntax-after): Use following-char rather than char-after.
(tex-discount-args-cmds, tex-count-words): New functions.
2001-05-25 22:08:58 +00:00
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