From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Why is this thing (isearch-search-fun) coded like this? Date: Mon, 7 Dec 2015 21:12:12 +0000 Message-ID: <20151207211212.GE1904@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1449522644 30471 80.91.229.3 (7 Dec 2015 21:10:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Dec 2015 21:10:44 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 07 22:10:35 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a633I-0000UT-Nt for ged-emacs-devel@m.gmane.org; Mon, 07 Dec 2015 22:10:32 +0100 Original-Received: from localhost ([::1]:56499 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a633I-00016d-8Z for ged-emacs-devel@m.gmane.org; Mon, 07 Dec 2015 16:10:32 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a632x-00011s-6C for emacs-devel@gnu.org; Mon, 07 Dec 2015 16:10:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a632s-0004vT-71 for emacs-devel@gnu.org; Mon, 07 Dec 2015 16:10:11 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:62571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a632r-0004tg-V0 for emacs-devel@gnu.org; Mon, 07 Dec 2015 16:10:06 -0500 Original-Received: (qmail 70637 invoked by uid 3782); 7 Dec 2015 21:10:04 -0000 Original-Received: from acm.muc.de (p5B1463E7.dip0.t-ipconnect.de [91.20.99.231]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 07 Dec 2015 22:10:03 +0100 Original-Received: (qmail 11308 invoked by uid 1000); 7 Dec 2015 21:12:12 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195972 Archived-At: Hello, Emacs. I'm absolutely stumped. `isearch-search-fun', when called, returns a function "to use" for searching. To do this, it funcalls ..... .... `isearch-search-fun-default'. This returns a constant lambda form. CONSTANT LAMBDA FORMS ARE NOT EASY TO INSTRUMENT FOR EDEBUG!!!! As an alternative, isearch-search-fun-default could simply return a named function. Even better, such a named function could simply be, and be returned directly from `isearch-search-fun' without all the superfluous funcalling. Or am I missing something here? All this "is a function which returns a function by funcalling a function which returns a constant lambda form" has exhausted any desire I had to debug my problem to a finish. I'm tempted to rip out a lot of this stuff from Isearch to be able to debug it. Will I regret it if I do? -- Alan Mackenzie (Nuremberg, Germany).