From: Eli Zaretskii <eliz@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: Please add comments to isearch.el
Date: Fri, 11 Dec 2015 14:39:19 +0200 [thread overview]
Message-ID: <83y4d16txk.fsf@gnu.org> (raw)
In-Reply-To: <20151211121617.GA3351@acm.fritz.box>
> Date: Fri, 11 Dec 2015 12:16:17 +0000
> Cc: emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
>
> > > The isearch.el commands are implemented using complex multi-layered
> > > system of functions and macros that make it very hard to figure out,
> > > just by looking at the code, which options affect what commands and in
> > > what ways. About the only way to find that out is by trying each
> > > command, which is very inefficient. I think it will help make this
> > > file much more maintainable if commentary were added there explaining
> > > how all of this works. Thanks in advance.
>
> .... perhaps you could be a little more explicit about which "complex
> multi-layered system of functions and macros" you were thinking about in
> particular? Was it the one I was complaining of a few days ago, or were
> you thinking of the state stack (that Drew explicitly mentioned), or
> something else?
For example, start with isearch-mode, and then try to figure out what
each one of the following variables are in what use cases:
regexp-function and search-default-regexp-mode (as a function). You
will see that each one can be assigned to a variable that names a
function that has a default value that can be a function that...
Similarly with other isearch commands. This makes the source
impenetrable to uninitiated, much harder than just stepping with
Edebug through the code. IMO, if it is easier to understand code by
stepping through it in a debugger than by reading it, that code must
be refactored or documented the heck of.
next prev parent reply other threads:[~2015-12-11 12:39 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-29 16:34 Please add comments to isearch.el Eli Zaretskii
2015-12-11 8:13 ` Eli Zaretskii
2015-12-11 12:16 ` Alan Mackenzie
2015-12-11 12:39 ` Eli Zaretskii [this message]
2015-12-11 16:00 ` Artur Malabarba
2015-12-11 16:20 ` Eli Zaretskii
2015-12-11 16:54 ` Artur Malabarba
2015-12-11 16:56 ` Drew Adams
2015-12-11 18:33 ` Eli Zaretskii
2015-12-11 22:59 ` Juri Linkov
2015-12-11 23:24 ` Artur Malabarba
2015-12-11 23:55 ` Juri Linkov
2015-12-12 7:25 ` Eli Zaretskii
2015-12-12 23:27 ` Juri Linkov
2015-12-13 1:01 ` Artur Malabarba
2015-12-14 0:16 ` Juri Linkov
2015-12-14 1:19 ` Artur Malabarba
2015-12-14 23:51 ` Juri Linkov
2015-12-15 10:26 ` Artur Malabarba
2015-12-16 0:51 ` Juri Linkov
2015-12-16 9:06 ` Artur Malabarba
2015-12-17 0:55 ` Juri Linkov
2015-12-17 10:19 ` Artur Malabarba
2015-12-13 3:38 ` Eli Zaretskii
[not found] ` <<83d1uc6sdq.fsf@gnu.org>
2015-12-12 16:20 ` Drew Adams
2015-12-12 23:04 ` John Wiegley
[not found] <<83fuzoojcn.fsf@gnu.org>
2015-11-29 16:54 ` Drew Adams
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83y4d16txk.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=acm@muc.de \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.