From: Lars Ingebrigtsen <larsi@gnus.org>
To: Richard Wordingham <richard.wordingham@ntlworld.com>
Cc: 20128@debbugs.gnu.org
Subject: bug#20128: 24.4; Bad regex in composition-function-table hangs Emacs
Date: Fri, 02 Aug 2019 14:35:55 +0200 [thread overview]
Message-ID: <87blx7rbh0.fsf@mouse.gnus.org> (raw)
In-Reply-To: <20150317194504.7a0fca78@JRWUBU2> (Richard Wordingham's message of "Tue, 17 Mar 2015 19:45:04 +0000")
Richard Wordingham <richard.wordingham@ntlworld.com> writes:
> Loading an Emacs lisp file (e.g. by load-file in .emacs) containing the
> commands:
>
> (defvar tai-tham-composable-pattern
> (let ((table
> '(
> ("C" . "[\u1A20-\u1A54") ; Missing ']'!
> ("M" . "[\u1A55-\u1A5E\u1A61-\u1A7C\u1A7F]"); Mark
> ("H" . "\u1A60") ; sakot
> ("N" . "\u1A58"))) ; mai kang lai
> (regexp "C\\(M|HC\\)*\\(NC\\(M|HC\\)*\\)*N?"))
> (let ((case-fold-search nil))
> (dolist (elt table)
> (setq regexp (replace-regexp-in-string (car elt) (cdr elt)
> regexp t t))))
> regexp))
>
> (let ((elt (list (vector tai-tham-composable-pattern 0
> 'font-shape-gstring)
> (vector "." 0 'font-shape-gstring) )))
> (set-char-table-range composition-function-table '(#x1A20 . #x1AAD)
> elt))
>
> causes Emacs to hang when a character in the range U+1A20 to U+1AAD
> needs to be rendered. Now, the value of tai-tham-composable-pattern is
> an unbalanced regex, so that may be the cause of the problem.
(I'm going through old bug reports that unfortunately have not received
any responses yet.)
I don't think you can reasonably expect Emacs to work properly when you
have put invalid regexps into a function like that, so I'm closing this
bug as a "wontfix".
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
prev parent reply other threads:[~2019-08-02 12:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-17 19:45 bug#20128: 24.4; Bad regex in composition-function-table hangs Emacs Richard Wordingham
2019-08-02 12:35 ` Lars Ingebrigtsen [this message]
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=87blx7rbh0.fsf@mouse.gnus.org \
--to=larsi@gnus.org \
--cc=20128@debbugs.gnu.org \
--cc=richard.wordingham@ntlworld.com \
/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).