Without this, it's very hard to precede double quotes with the
apostrophe character, i.e. insert the sequence '``
(quote-backquote-backquote), commonly useful in portuguese, for
instance.
* tex-mode.el (tex-insert-quote): Add ?' to the list of preceding
chars making `tex-insert-quote' be in the "opening" context.
(goto-char saved)
(insert (if (> saved (mark)) tex-close-quote tex-open-quote)))
(if (or (memq (char-syntax (preceding-char)) '(?\( ?> ?\s))
- (memq (preceding-char) '(?~)))
+ (memq (preceding-char) '(?~ ?')))
+ ;; We're in an "opening" context
+ ;;
(if electric-pair-mode
(if (looking-at (regexp-quote tex-close-quote))
(forward-char (length tex-close-quote))
(insert tex-close-quote)
(backward-char (length tex-close-quote)))
(insert tex-open-quote))
+ ;; We're in a "closing" context.
+ ;;
(if (looking-at (regexp-quote tex-close-quote))
(forward-char (length tex-close-quote))
(insert tex-close-quote))))))