--- tex.el 25 Nov 2005 23:50:31 +0100 5.548 +++ tex.el 29 Nov 2005 17:00:55 +0100 @@ -4491,6 +4491,15 @@ (if q-after-q (insert (cond ((bobp) ?\") + ((save-excursion + (TeX-looking-at-backward + (concat (regexp-quote open-quote) "\\|" + (regexp-quote close-quote)) + (max (length open-quote) (length close-quote)))) + (delete-backward-char (length (match-string 0))) + "\"\"") + ((< (save-excursion (skip-chars-backward "\"")) -1) + ?\") ((not (= (preceding-char) ?\")) ?\") ((save-excursion