unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Noam Postavsky <npostavs@gmail.com>
Cc: 35802@debbugs.gnu.org
Subject: bug#35802: Broken data loaded from uni-decomposition
Date: Sun, 16 Jun 2019 22:22:15 +0300	[thread overview]
Message-ID: <877e9lcp3s.fsf@mail.linkov.net> (raw)
In-Reply-To: <87k1dmxopz.fsf@gmail.com> (Noam Postavsky's message of "Sat, 15 Jun 2019 22:12:40 -0400")

>>> Actually maybe it's just a matter of making isearch bind
>>> search-spaces-regexp less widely.  I'm not quite following when the your
>>> problem happens though.  Can you show a backtrace from your original
>>> problem using
>>>
>>>     (add-hook 'after-load-functions
>>>               (lambda (f) (when (string-match-p "uni-decomposition" f)
>>>                        (debug nil :search-spaces-regexp search-spaces-regexp))))
>>
>> When I eval both the above and (setq search-whitespace-regexp "\\(\\s-\\|\n\\)+")
>> then debugger still shows that search-spaces-regexp is nil
>> (also note where search-spaces-regexp is let-bound to non-nil in the backtrace,
>> see also more info after the backtrace):
>
> Hmm, can you show exactly what's needed to trigger this?  I tried the
> above after applying your patch in Bug#35802, but uni-decomposition was
> never loaded.

Here is a complete reproducible test case:

-1. Apply the following patch to master and recompile
 0. emacs -Q
 1. Eval:

   (progn
     (setq search-whitespace-regexp "\\(\\s-\\|\n\\)+")
     (add-hook 'after-load-functions
               (lambda (f) (when (string-match-p "uni-decomposition" f)
                             (debug nil :search-spaces-regexp search-spaces-regexp)))))

 2. Type C-s M-s ' a

diff --git a/lisp/char-fold.el b/lisp/char-fold.el
index d2fa7108bb..7b0e55bb11 100644
--- a/lisp/char-fold.el
+++ b/lisp/char-fold.el
@@ -28,7 +28,6 @@
   (defun char-fold-make-table ()
     (let* ((equiv (make-char-table 'char-fold-table))
            (equiv-multi (make-char-table 'char-fold-table))
-           (search-spaces-regexp nil)   ; workaround for bug#35802
            (table (unicode-property-table-internal 'decomposition)))
       (set-char-table-extra-slot equiv 0 equiv-multi)
 
@@ -141,6 +140,11 @@ char-fold-table
 
 Exceptionally for the space character (32), ALIST is ignored.")
 
+(progn
+  (message "search-spaces-regexp: %S" search-spaces-regexp)
+  ;; Emulate funcall from defcustom :set
+  (setq char-fold-table (char-fold-make-table)))
+
 (defun char-fold--make-space-string (n)
   "Return a string that matches N spaces."
   (format "\\(?:%s\\|%s\\)"





  reply	other threads:[~2019-06-16 19:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-19 19:46 bug#35802: Broken data loaded from uni-decomposition Juri Linkov
2019-06-06 17:07 ` npostavs
2019-06-06 20:41   ` Juri Linkov
2019-06-11 14:18     ` npostavs
2019-06-11 21:11       ` Juri Linkov
2019-06-16  2:12         ` Noam Postavsky
2019-06-16 19:22           ` Juri Linkov [this message]
2019-06-21 11:16             ` Noam Postavsky
2019-06-21 19:16               ` Juri Linkov
2019-06-22 22:35                 ` Noam Postavsky
2019-06-23 21:25                   ` Juri Linkov
2019-06-26  2:08                     ` Noam Postavsky

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=877e9lcp3s.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=35802@debbugs.gnu.org \
    --cc=npostavs@gmail.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).