From 1e60125ff323e1a750d289def147061c280326bd Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Tue, 27 Jan 2015 14:08:01 -0200 Subject: (isearch-fold-groups isearch-groups-alist): New variables. When `isearch-fold-groups' is non-nil `isearch-groups-alist' determines which characters are replaced with regexps during isearch. --- lisp/isearch.el | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lisp') diff --git a/lisp/isearch.el b/lisp/isearch.el index 99ca73f9f54..86850dbd6cc 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -272,6 +272,23 @@ Default value, nil, means edit the string instead." :version "23.1" :group 'isearch) +(defcustom isearch-fold-groups t + "Whether regular isearch should do group folding. +This means some characters will match entire groups of charactes, +such as \" matching ”, for instance." + :type 'boolean + :group 'isearch + :version "25.1") + +(defvar isearch-groups-alist + ;; FIXME: Add all the latin accented letters like Ã. + '((?\" . "[\""“””„⹂〞‟‟❞❝❠“„〝〟🙷🙶🙸❮❯«»‹›󠀢]") + (?' . "[`'❟❛❜‘’’‚‛‛‚‘󠀢❮❯«»‹›]") + ;; `isearch-fold-groups' doesn't interact with + ;; `isearch-lax-whitespace' yet. So we need to add this here. + (?\s . "[ \r\n]+")) + "Alist of groups to use when `isearch-fold-groups' is non-nil.") + (defcustom isearch-lazy-highlight t "Controls the lazy-highlighting during incremental search. When non-nil, all text in the buffer matching the current search -- cgit v1.2.1