From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: c-forward-sws: Is the code right? Date: Tue, 27 Mar 2018 21:56:39 -0400 Message-ID: References: <20180327164156.GA4105@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1522202121 27216 195.159.176.226 (28 Mar 2018 01:55:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Mar 2018 01:55:21 +0000 (UTC) Cc: Alan Mackenzie , Emacs developers To: zhang cc Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 28 03:55:17 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f10J1-0006yL-Px for ged-emacs-devel@m.gmane.org; Wed, 28 Mar 2018 03:55:15 +0200 Original-Received: from localhost ([::1]:37019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f10L4-0005aQ-Q1 for ged-emacs-devel@m.gmane.org; Tue, 27 Mar 2018 21:57:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f10KQ-0005Zy-Af for emacs-devel@gnu.org; Tue, 27 Mar 2018 21:56:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f10KP-0004gM-Gm for emacs-devel@gnu.org; Tue, 27 Mar 2018 21:56:42 -0400 Original-Received: from mail-oi0-x22d.google.com ([2607:f8b0:4003:c06::22d]:40362) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f10KP-0004fx-AL for emacs-devel@gnu.org; Tue, 27 Mar 2018 21:56:41 -0400 Original-Received: by mail-oi0-x22d.google.com with SMTP id x9-v6so786711oig.7 for ; Tue, 27 Mar 2018 18:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=F14/QeG4gb7unkVxPzzhXpYqEhKMs8kkCr3tkWvCtz4=; b=D3pAWgTdBT6MRSfTMK2xbUjMsBM52gRBkP3jvxVXSLdsKzQIxy5Ky7+omlBdmdj5PD xGYQCMAwYDxkaiwwD4XATcT0v3/Bpjz5mOxL4dz5n1dZuf5GCnS4JeYS75igVoSyzgXL cjWFhqDr1aOo37Kgn53F/P3UQbr6xHdvgwJ/D2TWescxT6k86GV41ISALZfmZKGYbUw0 SnV+/vx3WIgX0OFX9m9kE20q0VDNw3gC4Z3vlXimCnrLrC4NrfdkrSfB1n7WgZ8owEsx 6dfKbm69bRrrAn3Sp9ThKTLltppj9blGL6tscS4V7hKXN3T1SPFg8j96E5rLgU9KuyZ1 X70g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=F14/QeG4gb7unkVxPzzhXpYqEhKMs8kkCr3tkWvCtz4=; b=TzvZfUFkHvpnqmFn/Eoo+Fk9fJJXKUZNkOWBiCoHaP2ygMJ8fmV4hXs3EaCiDHI/Hg S1G3pthjZXY1yV6PpaD/KROt5wdOCOcidtizVyz79TiNweON9ForASPgj7Cz2EhXocan zJok/i9eJBQ6U2lG85uQPMboixy4tF7Uzu0e4cCa899biUOAunjYv9xOg8R1As7s1Oov n9tz5+/s4JkGvCEecpldUlqLyz/G3qr9uTc2tGCpmv9mJEDG/U5f18b1vEGV2u9gao2r /ffXBi8ZTZuxebceBQhKRP2chf6ntPyjghYxpNtj0rZcwPLhrpv4EEh5O6oOyb3zGHBO hV7g== X-Gm-Message-State: ALQs6tCQplbdYpCi5OH7gQMqTrS0tNBj4JCosOocmPyLmZB1kbCAXUmf KuQEvMrvZRQH/E9YuNp2B5Gssu6Bdf/HB12u6MA= X-Google-Smtp-Source: AIpwx4/zKqZSWhQIVqe4fwjnMLOqlW9L1Izouo4lLbshtFavkWlfMZbB80JOOZ362sfj2ILkih9usZ4G/4Jxc9eApMo= X-Received: by 10.202.91.214 with SMTP id p205mr883535oib.239.1522202199996; Tue, 27 Mar 2018 18:56:39 -0700 (PDT) Original-Received: by 10.74.139.213 with HTTP; Tue, 27 Mar 2018 18:56:39 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:224120 Archived-At: On 27 March 2018 at 21:35, zhang cc wrote: > >> Is the bug reproducible? > > Yes. See > https://github.com/joaotavora/yasnippet/issues/923#issuecomment-376569337 A simpler reproduction: emacs -Q -f c-mode -f toggle-debug-on-error --eval '(insert "\u963Fa")' DEL Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil) c-forward-sws() c-unfind-coalesced-tokens(147 148) c-before-change(147 148) delete-char(-1 nil) delete-backward-char(1 nil) backward-delete-char-untabify(1) c-electric-backspace(nil) funcall-interactively(c-electric-backspace nil) call-interactively(c-electric-backspace nil nil) command-execute(c-electric-backspace) >> 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 *=E2=80=9D. I believe you mean: "\\s *#\\s *"