unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: zhang cc <ccsmile2008@outlook.com>
To: Alan Mackenzie <acm@muc.de>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: c-forward-sws: Is the code right?
Date: Wed, 28 Mar 2018 01:35:55 +0000	[thread overview]
Message-ID: <SG2PR0601MB1405EBDAEFBF9E300386C9A0A8A30@SG2PR0601MB1405.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <20180327164156.GA4105@ACM>

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]


The intention is that "\\<\\>" will never match at all, hence that
match-end will never be executed. "\\<" means "beginning of word" and
"\\>" means "end of word". Could there be something in your environment
whereby an end of word might be at the same position as the beginning of
a word? If this is the case, then I will need to come up with an actual
regexp which can never match anything.


It matchs when cursor is between a Chinese char and an ASCII char like “你hao”( cursor before ‘h’).


Is the bug reproducible?
Yes. See https://github.com/joaotavora/yasnippet/issues/923#issuecomment-376569337

If so, could you possibly patch that bit of
code to add (not (equal c-opt-cpp-prefix "\\<\\>")) before the
(looking-at ...) form, and see if that stops the error.

No. the value of c-opt-cpp-prefix printed as "\s *#\s *”.



[-- Attachment #2: Type: text/html, Size: 1902 bytes --]

  parent reply	other threads:[~2018-03-28  1:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-27 14:44 c-forward-sws: Is the code right? zhang cc
2018-03-27 16:41 ` Alan Mackenzie
2018-03-27 17:15   ` Stefan Monnier
2018-03-28  1:35   ` zhang cc [this message]
2018-03-28  1:56     ` Noam Postavsky
2018-03-28 19:05     ` Alan Mackenzie
2018-03-29  3:06       ` net june
2018-03-29 10:38       ` Eli Zaretskii
2018-04-02 19:58         ` Alan Mackenzie
2018-04-02 23:58           ` Stefan Monnier
2018-04-03 17:13             ` Andy Moreton
2018-04-03 21:03               ` Stefan Monnier

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=SG2PR0601MB1405EBDAEFBF9E300386C9A0A8A30@SG2PR0601MB1405.apcprd06.prod.outlook.com \
    --to=ccsmile2008@outlook.com \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /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).