emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/yaml-mode e3b06b2 088/124: Support non-whitespace preceded


From: ELPA Syncer
Subject: [nongnu] elpa/yaml-mode e3b06b2 088/124: Support non-whitespace preceded apostrophe
Date: Sun, 29 Aug 2021 11:36:18 -0400 (EDT)

branch: elpa/yaml-mode
commit e3b06b27bfd181b614da7d39c4a04e7093680438
Author: Väinö Järvelä <vaino@jarve.la>
Commit: Väinö Järvelä <vaino.jarvela@reaktor.com>

    Support non-whitespace preceded apostrophe
    
    The previous version handles apostrophe as a quote if it was preceded
    by a whitespace. This version checks the syntax of the preceding
    character, if it's part of a word then it's handled as an apostrophe,
    otherwise as a quote.
    
    Fixes previously broken situations with JSON style lists.
---
 yaml-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/yaml-mode.el b/yaml-mode.el
index 00f0c2d..594fc36 100644
--- a/yaml-mode.el
+++ b/yaml-mode.el
@@ -267,7 +267,7 @@ that key is pressed to begin a block literal."
         (save-excursion
           (forward-char -1)
           (when (and (not (bolp))
-                     (not (memq (preceding-char) '(?\s ?\t))))
+                     (char-equal ?w (char-syntax (char-before (point)))))
             (put-text-property (point) (1+ (point))
                                'syntax-table (string-to-syntax "w"))))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]