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: Re: `isearch-allow-scroll' - a misnomer and a bad design Date: Sun, 11 Sep 2011 10:39:40 +0000 Message-ID: <20110911103940.GA3246@acm.acm> References: <20110909215255.GD2733@acm.acm> <7002A9DA9A804F0B9F6F251FD3A2B263@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1315737821 2789 80.91.229.12 (11 Sep 2011 10:43:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 11 Sep 2011 10:43:41 +0000 (UTC) Cc: emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 11 12:43:37 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R2hVf-0003Lr-8K for ged-emacs-devel@m.gmane.org; Sun, 11 Sep 2011 12:43:35 +0200 Original-Received: from localhost ([::1]:41494 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R2hVe-0000LY-PN for ged-emacs-devel@m.gmane.org; Sun, 11 Sep 2011 06:43:34 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R2hVc-0000LT-JA for emacs-devel@gnu.org; Sun, 11 Sep 2011 06:43:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R2hVb-0004FZ-Dh for emacs-devel@gnu.org; Sun, 11 Sep 2011 06:43:32 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:55165 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R2hVb-0004FP-5d for emacs-devel@gnu.org; Sun, 11 Sep 2011 06:43:31 -0400 Original-Received: (qmail 6189 invoked by uid 3782); 11 Sep 2011 10:43:26 -0000 Original-Received: from acm.muc.de (pD951B92E.dip.t-dialin.net [217.81.185.46]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 11 Sep 2011 12:43:25 +0200 Original-Received: (qmail 3922 invoked by uid 1000); 11 Sep 2011 10:39:40 -0000 Content-Disposition: inline In-Reply-To: <7002A9DA9A804F0B9F6F251FD3A2B263@us.oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 193.149.48.1 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:143882 Archived-At: Hi, Drew, On Fri, Sep 09, 2011 at 04:07:02PM -0700, Drew Adams wrote: > I would like to see `C-u' passed through - that's the main point. > Either systematically or optionally, but if optionally then separately > from allowing scrolling. Here's a better patch. I've tested it more than the previous attempt. *** isearch.el 2011-09-04 15:31:05.000000000 +0000 --- isearch.100911.el 2011-09-11 10:26:12.000000000 +0000 *************** *** 1966,1976 **** (apply 'isearch-unread keylist) (isearch-edit-string)) ;; Handle a scrolling function. ! ((and isearch-allow-scroll ! (progn (setq key (isearch-reread-key-sequence-naturally keylist)) ! (setq keylist (listify-key-sequence key)) ! (setq main-event (aref key 0)) ! (setq scroll-command (isearch-lookup-scroll-key key)))) ;; From this point onwards, KEY, KEYLIST and MAIN-EVENT hold a ;; complete key sequence, possibly as modified by function-key-map, ;; not merely the one or two event fragment which invoked --- 1966,1981 ---- (apply 'isearch-unread keylist) (isearch-edit-string)) ;; Handle a scrolling function. ! ((progn ! (setq key (isearch-reread-key-sequence-naturally keylist) ! keylist (listify-key-sequence key) ! main-event (aref key 0)) ! (or (and isearch-allow-scroll ! (setq scroll-command (isearch-lookup-scroll-key key))) ! (let (overriding-terminal-local-map) ! (setq scroll-command (key-binding key)) ! (memq scroll-command ! '(universal-argument negative-argument digit-argument))))) ;; From this point onwards, KEY, KEYLIST and MAIN-EVENT hold a ;; complete key sequence, possibly as modified by function-key-map, ;; not merely the one or two event fragment which invoked -- Alan Mackenzie (Nuremberg, Germany).