summaryrefslogtreecommitdiff
path: root/lisp/textmodes/tex-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/textmodes/tex-mode.el')
-rw-r--r--lisp/textmodes/tex-mode.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index c4e4864da17..d5a79ad0ac5 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1169,7 +1169,12 @@ subshell is initiated, `tex-shell-hook' is run."
(setq-local outline-regexp latex-outline-regexp)
(setq-local outline-level #'latex-outline-level)
(setq-local forward-sexp-function #'latex-forward-sexp)
- (setq-local skeleton-end-hook nil))
+ (setq-local skeleton-end-hook nil)
+ (setq-local comment-region-function #'latex--comment-region)
+ (setq-local comment-style 'plain))
+
+(defun latex--comment-region (beg end &optional arg)
+ (comment-region-default-1 beg end arg t))
;;;###autoload
(define-derived-mode slitex-mode latex-mode "SliTeX"
@@ -2039,8 +2044,7 @@ In the tex shell buffer this command behaves like `comint-send-input'."
(with-current-buffer buffer
(setq default-directory directory))))
-(defvar tex-send-command-modified-tick 0)
-(make-variable-buffer-local 'tex-send-command-modified-tick)
+(defvar-local tex-send-command-modified-tick 0)
(defun tex-shell-proc ()
(or (tex-shell-running) (error "No TeX subprocess")))