emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please add comments to isearch.el


From: Juri Linkov
Subject: Re: Please add comments to isearch.el
Date: Sun, 13 Dec 2015 01:27:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu)

> Hey, I didn't suggest refactoring to begin with.  I suggested to add
> commentary to explain how things work there.  The example you give is
> just another confirmation of my observation that the code in
> isearch.el has long ago crossed the line of being unmaintainable, and
> I think we should fix that ASAP.
>
> Thanks.

I completely agree, and as a first step in this direction I propose
to fix the terminology used in isearch that should help to better
understand the code in isearch.el.

1. Rename ‘lax’ to ‘lax-boundary’ to distinguish between lax at the word/symbol
   boundary and lax-whitespace to avoid confusion, so rename the
   arg ‘lax’ to ‘lax-boundary’ in all regexp-producing functions,
   isearch--lax-regexp-function-p to
   isearch--lax-boundary-regexp-function-p, etc.

2. Try to find a better common naming scheme used for the
   regexp-producing functions word-search-regexp, isearch-symbol-regexp,
   character-fold-to-regexp.

3. Use well established terminology that shortens the prefixes
   of character-related functions to just char- to use char-fold.
   ‘C-h f char TAB’ or ‘C-h v char TAB’ shows the standard
   Emacs naming convention.

4. Use the upper-case standard name “Unicode” in the documentation.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]