Gabriel Brown wrote:It seems when there are three or more python docstrings (each bordered by two lines of triple quotes """) and each containing an apostrophe, then the next time a quote docstring is to be inserted Emacs hangs.Hi Gabriel, From my testing of your example, the problem appears to be fixed with the #58780 fix. Can you test with the latest Emacs in emacs-29 branch or master branch? Or you can try the patch attached in #58780.