unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: 53446@debbugs.gnu.org
Cc: Alan Mackenzie <acm@muc.de>
Subject: bug#53446: 29.0.50; Issues with awk-mode and electric-pair-mode
Date: Fri, 23 Sep 2022 07:24:34 +0000	[thread overview]
Message-ID: <87czbmv9hp.fsf@posteo.net> (raw)
In-Reply-To: <875yqbdhvy.fsf@posteo.net> (Philip Kaludercic's message of "Sat,  22 Jan 2022 13:22:57 +0000")

Philip Kaludercic <philipk@posteo.net> 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.





  reply	other threads:[~2022-09-23  7:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-22 13:22 bug#53446: 29.0.50; Issues with awk-mode and electric-pair-mode Philip Kaludercic
2022-09-23  7:24 ` Philip Kaludercic [this message]
2022-09-23 18:37   ` Alan Mackenzie
2022-09-23 18:57     ` Philip Kaludercic
2022-09-24 12:37       ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czbmv9hp.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=53446@debbugs.gnu.org \
    --cc=acm@muc.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).