]> git.eshelyaron.com Git - emacs.git/commitdiff
(lisp-delete-backward): Fix handling of closing string quote
authorEshel Yaron <me@eshelyaron.com>
Wed, 26 Feb 2025 19:47:28 +0000 (20:47 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 26 Feb 2025 19:47:28 +0000 (20:47 +0100)
lisp/emacs-lisp/lisp-mode.el

index 353034d5eb337d0ab3383effcc3f654f1b9e6101..a4e9a88aebf4e1a0be8ac0ff51bc2a45635fb746 100644 (file)
@@ -814,7 +814,11 @@ font-lock keywords will not be case sensitive."
                ;; Previous character is escaped.
                (delete-char -2))
            ;; Not in a string.
-           (lisp-delete-backward-1)))
+           (if (save-excursion (nth 3 (syntax-ppss (1- (point)))))
+               ;; After closing quote.
+               (backward-char)
+             ;; Quoted quote or comment.
+             (lisp-delete-backward-1))))
         (?\\
          (if (nth 5 (syntax-ppss))
              (delete-region (1- (point)) (1+ (point)))