From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16242 invoked by alias); 8 Jan 2015 13:48:08 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 16232 invoked by uid 89); 8 Jan 2015 13:48:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-pd0-f170.google.com Received: from mail-pd0-f170.google.com (HELO mail-pd0-f170.google.com) (209.85.192.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 08 Jan 2015 13:48:06 +0000 Received: by mail-pd0-f170.google.com with SMTP id v10so11320437pde.1 for ; Thu, 08 Jan 2015 05:48:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=d8HFAQsGVP0S/BkJhxby+5K/cXkKnl+DkN4beUgPGH0=; b=GLMXi8KLDBh8FS2nHqoGxJRITwM3htnJmvloHeArA7EGNF5Zq+9MosVV6MI+XG5C55 ZIrD63gJ4k75Mmh6a0mnc3RsJiSiWJ3dKK57qGqH+CNAbqD9Bkb8EWUJStz6Ne6In95b ZbIvx0atHFRJ7v7BTcSg31SRqOl5FOH8rcY5yC4CfzWxSjEEkN07PWxJCd5JgUXy6+aH wSeRXlJ4TcOrRskGm9ngrkuMV2wtsWsZKzH8iFRHJUQBVcy+y0wQYWO/sEpxLo+gWuiB PPRjeLHglGgdPeEXedvyLseKCNfljUg/3Z1/Xbels7aNb6lABhoyy3VsqanSLmdtQkXo hO9A== X-Gm-Message-State: ALoCoQlu9OPRjWTniR3fu5rojU3ROIXgrIgAxK21PmleytSCdXvaIGWacOHdlc0Lw7nRwSSFs8zW X-Received: by 10.70.92.100 with SMTP id cl4mr14911163pdb.151.1420724884828; Thu, 08 Jan 2015 05:48:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.70.22.145 with HTTP; Thu, 8 Jan 2015 05:47:44 -0800 (PST) In-Reply-To: <83zj9t5rbe.fsf@gnu.org> References: <1420689885-31156-1-git-send-email-patrick@parcs.ath.cx> <83zj9t5rbe.fsf@gnu.org> From: Patrick Palka Date: Thu, 08 Jan 2015 13:48:00 -0000 Message-ID: Subject: Re: [PATCH 1/3] Remove superfluous function key_is_command_char() To: Eli Zaretskii Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-01/txt/msg00185.txt.bz2 On Thu, Jan 8, 2015 at 8:34 AM, Eli Zaretskii wrote: >> From: Patrick Palka >> Cc: Patrick Palka >> Date: Wed, 7 Jan 2015 23:04:43 -0500 >> >> The function key_is_command_char() is simply a predicate that determines >> whether the function tui_dispatch_ctrl_char() will do anything useful. >> Since tui_dispatch_ctrl_char() performs the same checks as >> key_is_command_char() it is unnecessary to keep key_is_command_char() >> around. This patch removes this useless function and instead >> unconditionally calls tui_dispatch_ctrl_char() inside its only caller, >> tui_getc(). > > But tui_dispatch_ctrl_char punts when the current window is the > command window, doesn't it? This means we are losing the possibility > to handle command keys in the command window. I don't see how that follows. If the current window is the command window then dispatch_ctrl_char() returns the input character unmodified. So the behavior after the patch is the same as if the call to dispatch_ctrl_char() was guarded by the key_is_command_char() predicate, before the patch. > > Thanks.