Subject: bug#53446: 29.0.50; Issues with awk-mode and electric-pair-mode

From: Philip Kaludercic <[email-masked]>
Date: Fri, 23 Sep 2022 07:24:34 +0000

Philip Kaludercic <[email-masked]> writes:

> Open an AWK file, and ensure that electric-pair-mode is enabled.  It
> seems that some character pairs like braces or parentheses are
> automatically paired, while others like apostrophes or double quotes are
> not.

I have managed to narrow this bug to the function 
`c-electric-pair-inhibit-predicate' that is used as
`electric-pair-inhibit-predicate' by cc-mode.  Specifically this check

    (not (equal (c-get-char-property last-quote 'c-fl-syn-tab) '(15)))

fails, because the macro

    (c-get-char-property last-quote 'c-fl-syn-tab)

that expands to

    (get-text-property last-quote 'c-fl-syn-tab)

where `last-quote' is the position of the last quotation mark in a
"logical line", evaluates to nil, not (15).  I do not understand why
this happens, or what the text property `c-fl-syn-tab' is supposed to
indicate.

I have CC'ed Alan to see if he can help.