GNU bug report logs -
#35689
Customizable char-fold
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Sat, 11 May 2019 21:32:01 UTC
Severity: wishlist
Tags: fixed, patch
Fixed in version 27.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #52 received at 35689 <at> debbugs.gnu.org (full text, mbox):
>> +(defcustom char-fold-symmetric char-fold--symmetric-default
>> + "Include symmetric mappings from composite character back to base letter."
>> + :type 'boolean
>> + :initialize #'custom-initialize-changed
>> + :set (lambda (sym val)
>> + (set-default sym val)
>> + ;; FIXME: Maybe delay this until after-init-hook,
>> + ;; to avoid redundant calls to char-fold-make-table.
>> + (setq char-fold-table (char-fold-make-table)))
>
> OK, here's an uninformed suggestion -- instead of doing all this to
> ensure that we have an updated char-fold-table when the user changes
> these defaults, why not call char-fold-make-table when needed?
>
> That is, instead of the char-fold-table variable, you'd have a
> char-fold-data, which could be, say, something like this:
>
> (defvar char-fold-data :uninitialized)
>
> `char-fold-to-regexp' (and others) would then start with a call to
> char-fold-update which would
>
> be
>
> (let ((new (list :additional char-fold--include-alist-default
> :exclude char-fold--exclude-alist-default
> ...)))
> (unless (equal char-fold-data new)
> (setq char-fold-table (char-fold-make-table)
> char-fold-data new)))
>
> or something along those lines. That is, check whether anything has
> changed, and if not, do nothing, but if it has, recompute?
Thanks for the idea, I'll try to use such composite value to detect
updates in one of three variables.
This bug report was last modified 5 years and 295 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.