diff options
-rw-r--r-- | etc/NEWS | 3 | ||||
-rw-r--r-- | lisp/textmodes/tex-mode.el | 1 | ||||
-rw-r--r-- | test/lisp/electric-tests.el | 1 |
3 files changed, 5 insertions, 0 deletions
@@ -1477,6 +1477,9 @@ looking for macro definitions. By default, no symbols are ignored. ** TeX mode +*** When in a TeX (LaTeX, etc) comment, insert a normal double quote (") +instead of defaulting to TeX-style open (``) or close ('') quote marks. + *** New custom variable 'tex-print-file-extension' to help users who use PDF instead of DVI. diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 710899fa30..4430fd6496 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1311,6 +1311,7 @@ inserts \" characters." ;; (if (or arg (memq (char-syntax (preceding-char)) '(?/ ?\\)) (eq (get-text-property (point) 'face) 'tex-verbatim) + (nth 4 (syntax-ppss)) ; non-nil if point is in a TeX comment ;; Discover if a preceding occurrence of `tex-open-quote' ;; should be morphed to a normal double quote. ;; diff --git a/test/lisp/electric-tests.el b/test/lisp/electric-tests.el index afd707667b..17b4e024ab 100644 --- a/test/lisp/electric-tests.el +++ b/test/lisp/electric-tests.el @@ -578,6 +578,7 @@ baz\"\"" (define-electric-pair-test autowrapping-7 "foo" "\"" :expected-string "``foo''" :expected-point 8 :modes '(tex-mode) + :test-in-comments nil :fixture-fn #'(lambda () (electric-pair-mode 1) (goto-char (point-max)) |