GNU bug report logs -
#22147
Obsolete search-forward-lax-whitespace
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Fri, 11 Dec 2015 23:54:02 UTC
Severity: normal
Tags: fixed
Fixed in version 28.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #46 received at 22147 <at> debbugs.gnu.org (full text, mbox):
>> char-fold-symmetric could wait for later, but we definitely need
>> char-fold-ad-hoc now before the release because the users should be
>> able to customize the default rules.
>
> Indeed. Once we do that, we also need a variable to determine
> whether we should derive the default table from the unicode
> standard (like we currently do) or just use an empty default with
> the ad-hoc rules slapped on top.
Users should be able to define their own equivalence classes (groups),
not just one class. Each class should be the value of a user option.
Here is one simple and flexible way to do this:
1. Define a user option, `char-folding-classes', which is a list of
any number of (OPTION-NAME DOC-STRING) pairs, where OPTION-NAME
is a symbol that will name a user option and DOC-STRING is its doc
string.
Each symbol would automatically be used to define an option (a
defcustom) that the user can then use to define a given equivalence
class.
2. The generated defcustom for each user option specified in option
`char-folding-classes' would allow for any number of entries, each
of which could be a `choice' of either of these defcustom types:
a. An alist, such as used currently in my `char-fold-ad-hoc' option:
Each entry is a list of a char and the strings that fold into it.
b. A function that populates such an alist.
The default value of `char-folding-classes' would be something like
this:
((char-fold-diacriticals
"Classes of chars equivalent because they have the same base char.")
(char-fold-quotations
"Classes of equivalent quotation-mark characters."))
Option `char-fold-diacriticals' would have as its default value a
function that returns the alist of diacritical-equivalent classes
that we provide today. Its code would be derived from what we use
today.
(If needed, a user can replace the function with another that
defines some of the classes differently or that provides only a
subset of the classes we provide today. But most users would
probably not customize this option.)
Option `char-fold-quotations' would have as its default value what I
use as the default value of my `char-fold-ad-hoc', which is an alist
of the quotation-mark equivalences provided today by character-fold.el:
((?\" """ "“" "”" "”" "„" "⹂" "〞" "‟" "‟" "❞" "❝"
"❠" "“" "„" "〝" "〟" "🙷" "🙶" "🙸" "«" "»")
(?' "❟" "❛" "❜" "‘" "’" "‚" "‛" "‚" "" "❮" "❯" "‹" "›")
(?` "❛" "‘" "‛" "" "❮" "‹"))
Having an option that lets users define any number of classes, and
having each class be defined by a user option, is flexible.
Having multiple classes, each associated with a variable (option),
lets users and libraries easily enable/disable different equivalence
classes in different contexts.
This bug report was last modified 4 years and 308 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.