* lisp/textmodes/tex-mode.el (tex-insert-quote): When in a comment,
default to inserting a normal double quote (") instead of TeX-style
open (``) or close ('') quote marks.
* etc/NEWS (TeX mode): Note the change.
* test/lisp/electric-tests.el (autowrapping-7): Adjust accordingly.
See this thread for discussion:
https://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00611.html
From: Karl Fogel <kfogel {_AT_} red-bean.com>
To: Emacs Development <emacs-devel {_AT_} gnu.org>
Subject: [PATCH] Have LaTeX mode use normal double quotes in comments.
Date: Mon, 29 Aug 2016 14:44:12 -0500
Message-ID: <87twe3icmr.fsf@red-bean.com>
** 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.
;;
(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.
;;
(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))