Subject: Re: bug#12137: 23.4; latex-mode tex-insert-quote not aware of ties in context
From: Stefan Monnier <[email-masked]>
To: Norman Ramsey <[email-masked]>
Cc: [email-masked]
Date: Tue, 14 Aug 2012 23:48:03 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

>     hello ``my'' dearest~''darling.''

Thanks, I fixed it in Emacs's trunk with the patch below,

        Stefan

=== modified file 'lisp/textmodes/tex-mode.el'
--- lisp/textmodes/tex-mode.el	2012-08-03 02:29:59 +0000
+++ lisp/textmodes/tex-mode.el	2012-08-15 03:45:12 +0000
@@ -1286,7 +1286,8 @@
 	      (delete-char (length tex-open-quote))
 	      t)))
       (self-insert-command (prefix-numeric-value arg))
-    (insert (if (memq (char-syntax (preceding-char)) '(?\( ?> ?\s))
+    (insert (if (or (memq (char-syntax (preceding-char)) '(?\( ?> ?\s))
+                    (memq (preceding-char) '(?~)))
 		tex-open-quote tex-close-quote))))
 
 (defun tex-validate-buffer ()