From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#38372: Error in mhtml-syntax-propertize in HTML with inline script Date: Tue, 26 Nov 2019 00:28:47 +0200 Message-ID: <38eecd43-3181-6818-0aad-9321f3ea4a1d@yandex.ru> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="113388"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: Tom Tromey , Stefan Monnier To: Richard Copley , 38372@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 25 23:29:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iZMr1-000TJA-CR for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Nov 2019 23:29:11 +0100 Original-Received: from localhost ([::1]:48768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZMqz-0007dn-F1 for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Nov 2019 17:29:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40614) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZMqt-0007dh-Gw for bug-gnu-emacs@gnu.org; Mon, 25 Nov 2019 17:29:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iZMqs-0000Wh-JC for bug-gnu-emacs@gnu.org; Mon, 25 Nov 2019 17:29:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43879) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iZMqs-0000WV-DK for bug-gnu-emacs@gnu.org; Mon, 25 Nov 2019 17:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iZMqs-0001X2-AE for bug-gnu-emacs@gnu.org; Mon, 25 Nov 2019 17:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Nov 2019 22:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38372 X-GNU-PR-Package: emacs Original-Received: via spool by 38372-submit@debbugs.gnu.org id=B38372.15747209395879 (code B ref 38372); Mon, 25 Nov 2019 22:29:02 +0000 Original-Received: (at 38372) by debbugs.gnu.org; 25 Nov 2019 22:28:59 +0000 Original-Received: from localhost ([127.0.0.1]:49852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZMqp-0001Wl-9R for submit@debbugs.gnu.org; Mon, 25 Nov 2019 17:28:59 -0500 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:33278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZMqm-0001WV-T7 for 38372@debbugs.gnu.org; Mon, 25 Nov 2019 17:28:58 -0500 Original-Received: by mail-wr1-f49.google.com with SMTP id w9so20183042wrr.0 for <38372@debbugs.gnu.org>; Mon, 25 Nov 2019 14:28:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=vy0Xu8/VRfjHXYeQJHHrGrpUMX5DeJ3GM78wlEWSjyk=; b=HEI/OXbwMQnTNOOZZZ6AvLpeAAkz251lmVrkHRpobiW3F4jg+qMX/EBh/5RFiUEtIa 1tfKLuZKSn0MD0Kt3+oNWJtUU9RUJ7LEuoikGjXwyV1dsB0HnY+WGn1fDvYxGqy1nv/4 QunkmUG7KaE10+PmBXcCpqYoh3Sg98qgkFd7ifmc0fAY5mV4WQ+AIzUwi0yr/XtUzuZ0 LufuB9KFIyPA4d+FE18ECX1ggSbrgExr3KaOGngkR2jIDt+Hst5OOl7H/g0bD3SjeO4a WjAUk+VtjO8PlOMUopIT4bTnfbNyyxZvGq2M7eKEdP/AX10ZOhrRucDqqfazxuknlk2y G2mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vy0Xu8/VRfjHXYeQJHHrGrpUMX5DeJ3GM78wlEWSjyk=; b=p9qgRupYGUWxYalSXwnAA8WVrmh7wgVMPoEUS2UA/9Z+Mcdoylm74DOqBy5V9n0Kpp xRbyznryRQLNTvbbD4R+/U9cUjMfwMcetwFJOtVbb/jixc+H6aO6AWbfeVO6FwXLpw9/ Fk2Z1tM0A7Y4tsjwUFSKFt6Eh0B0Yp7gt4PwFpuXHcCVfLz84L2lkljY8/0uBFX6RW+E eBfa4vUOrWGWUb7KbwWZSVTGTwZcRfzy6/do4UTh7ZD9dsYGGiqqh/A5wkKdAroOJvSI Pa/yIJYf/zg3mZW5OKgsamT7WEIedsc2+XVASGGXPnuVWXhFKQFdcvJ9z/6swYo4sYhq hG7A== X-Gm-Message-State: APjAAAV+bVya41GjtW++t9sjkCsAttQXMx+vAmkvtBObak6eQlO8mtCv jfmko8Ggc2SwqxlNs1JInV4= X-Google-Smtp-Source: APXvYqycq44TMlaWVFNDPJZMGm7DBI+DIEh4nM6xTq2WKtIy/7S8Z43EH0NI21TWVZYR4qrJXKmxaQ== X-Received: by 2002:a5d:4142:: with SMTP id c2mr34218724wrq.60.1574720930980; Mon, 25 Nov 2019 14:28:50 -0800 (PST) Original-Received: from [192.168.0.5] ([212.50.117.215]) by smtp.googlemail.com with ESMTPSA id w19sm773245wmk.36.2019.11.25.14.28.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Nov 2019 14:28:49 -0800 (PST) In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:172393 Archived-At: On 25.11.2019 18:57, Richard Copley wrote: > HTML with inline script can cause an error in mhtml-syntax-propertize. > > Recipe from emacs -Q: Visit a new file "index.html" and insert these > contents: > > >   >     >   >   >     it's >   > > > Put the cursor after the zero and type a semicolon. An error is signalled. > > (Note the "unmatched" apostrophe in the HTML body.) > > Errors: > Error during redisplay: (jit-lock-function 1) signaled > (wrong-type-argument number-or-marker-p nil) > mhtml-syntax-propertize: Wrong type argument: number-or-marker-p, nil > > Backtrace: > Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) >   sgml--syntax-propertize-ppss(86) >   mhtml-syntax-propertize(33 107) >   syntax-propertize(50) >   syntax-ppss() >   electric-indent-post-self-insert-function() >   self-insert-command(1 59) >   funcall-interactively(self-insert-command 1 59) >   call-interactively(self-insert-command nil nil) >   command-execute(self-insert-command) Seems it's only triggered when electric-indent-mode is on. And the error is in sgml--syntax-propertize-ppss, a function that was added after mhtml-mode was written. A quick attempt at fixing it (adding "sgml--syntax-" to mhtml--crucial-variable-prefix) didn't help, so I'm just going to Cc the people who might have better idea.