From: Richard Copley <rcopley@gmail.com>
To: 38363@debbugs.gnu.org
Subject: bug#38363: Error in mhtml-syntax-propertize in HTML with inline script
Date: Sun, 24 Nov 2019 12:54:24 +0000 [thread overview]
Message-ID: <CAPM58ojiLM4sO3X_LNwKxOZvWoVqfY0256mtCuPVE7qKyhsQLA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4408 bytes --]
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:
<html>
<head>
<script> 0 </script>
</head>
<body>
it's
</body>
</html>
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)
In GNU Emacs 27.0.50 (build 6, x86_64-w64-mingw32)
of 2019-11-24 built on MACHINE
Repository revision: 5a3e96b17c2a948ac952295962dc6e281ec5cad5
Repository branch: master
Windowing system distributor 'Microsoft Corp.', version 10.0.19025
System Description: Microsoft Windows 10 Pro (v10.0.1903.19025.1051)
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
(New file)
Mark set
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
Configured using:
'configure --config-cache --with-modules --without-pop --without-dbus
--without-gconf --without-gsettings CFLAGS=-O2'
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2
HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP
Important settings:
value of $LANG: ENG
locale-coding-system: cp1252
Major mode: HTML+JS
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc dired dired-loaddefs rfc822
mml mml-sec epa derived epg epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail vc-git
diff-mode easy-mmode mhtml-mode css-mode smie eww mm-url gnus nnheader
gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums time-date
mail-utils wid-edit mm-util mail-prsvr thingatpt url-queue url url-proxy
url-privacy url-expand url-methods url-history mailcap shr
text-property-search url-cookie url-domsuf url-util url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache url-vars puny svg xml browse-url format-spec color js
json subr-x map imenu cc-mode cc-fonts easymenu cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode seq
byte-opt gv bytecomp byte-compile cconv dom cl-loaddefs cl-lib tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core term/tty-colors frame
minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite charscript charprop case-table epa-hook jka-cmpr-hook help
simple abbrev obarray cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
threads w32notify w32 lcms2 multi-tty make-network-process emacs)
Memory information:
((conses 16 113316 8380)
(symbols 48 13210 1)
(strings 32 40080 2328)
(string-bytes 1 1310957)
(vectors 16 18724)
(vector-slots 8 235664 6880)
(floats 8 204 73)
(intervals 56 264 0)
(buffers 1000 12))
[-- Attachment #2: Type: text/html, Size: 5009 bytes --]
next reply other threads:[~2019-11-24 12:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-24 12:54 Richard Copley [this message]
2019-11-25 16:57 ` bug#38372: Error in mhtml-syntax-propertize in HTML with inline script Richard Copley
2019-11-25 22:28 ` Dmitry Gutov
2019-11-29 16:52 ` Stefan Monnier
2020-05-25 2:10 ` Tom Tromey
2020-05-25 2:41 ` bug#38363: " Stefan Monnier
2021-02-14 18:04 ` Tom Tromey
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPM58ojiLM4sO3X_LNwKxOZvWoVqfY0256mtCuPVE7qKyhsQLA@mail.gmail.com \
--to=rcopley@gmail.com \
--cc=38363@debbugs.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.