From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Chris Gregory Newsgroups: gmane.emacs.devel Subject: Re: [no subject] Date: Wed, 28 Dec 2016 01:34:54 -0600 Message-ID: <8737h8ld5t.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1482910515 8924 195.159.176.226 (28 Dec 2016 07:35:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Dec 2016 07:35:15 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 28 08:35:11 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cM8lH-0000FA-TD for ged-emacs-devel@m.gmane.org; Wed, 28 Dec 2016 08:35:00 +0100 Original-Received: from localhost ([::1]:58050 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cM8lL-0001TD-0p for ged-emacs-devel@m.gmane.org; Wed, 28 Dec 2016 02:35:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cM8lF-0001T7-3A for emacs-devel@gnu.org; Wed, 28 Dec 2016 02:34:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cM8lE-0006xh-C8 for emacs-devel@gnu.org; Wed, 28 Dec 2016 02:34:57 -0500 Original-Received: from mail-it0-x242.google.com ([2607:f8b0:4001:c0b::242]:33855) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cM8lE-0006xK-7Z for emacs-devel@gnu.org; Wed, 28 Dec 2016 02:34:56 -0500 Original-Received: by mail-it0-x242.google.com with SMTP id 75so35476426ite.1 for ; Tue, 27 Dec 2016 23:34:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:to:subject:date:message-id:mime-version; bh=TXO085pxpWrHWvrZTVZpjAO7n5zTN2mwIULEttCqfDk=; b=MrI2NLYdCnxinEBIBDEtmN4aKz0vwDNTUJyaMHfPWqBMEIZ5m3muEnjDU+Fw9c2zA9 8iSlonZ0K9oNVEn71SAc/z9598Zpm4zw9DmXLyyo26oZjo9VdQqxM3mxirTNU7YDRpCY +Rey7llr1GEECHqNbB1GVZ5g3w1V0nCL4YKnGZz3wmNCQKgAxe9qpF4glLoSyl1TlDAa heW8o4jwUxIUTdWcDQZNZo4byh9mB1CbRObXWx2PAyh5x+cDQlxJjl5jzcq/aD0GKpOP eBaKLyOm5QUdfz4srQ6rk1L9+9FgRup2N85dX0T6uHAvCfcgNQGEFYMQfrcAcY5JK+Td 54og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:to:subject:date:message-id:mime-version; bh=TXO085pxpWrHWvrZTVZpjAO7n5zTN2mwIULEttCqfDk=; b=JisNBeHLdcPdChGbZdFE7wBib8gKsR/w73aOmQw4xIrRMNDD++FlI8BWZH3jAf//Vu SGoWSif++noK+RtCRoLtFOZhjfOnhjm02Uh+a0pp/YqOH6sZrZSfkKKEVeSm0X2pMhzc 37mK1W66PeGapMswjAIqw2b6FJKdFBIup1J5624yZ+Mu2Az05glxBYr5yGU+y0AoB4+j LVPprUEYiuUajC1pZKKpEjo2KjTb8vwirIKYk5/iNengCtDytKCy5VVhtXoPRFAH8W+K 5TXUhSjtrtjfrULGunCBrDm/o6ezC7hIb0xEiMYebH+6twqgDD/d53AhHjd8uGS1nmx7 40CQ== X-Gm-Message-State: AIkVDXLjgRuVEl2ZOe62LAbbmXji03nrCnGl0OwWfG7eeky0spYRyhmndbFPsxHK6ssF0g== X-Received: by 10.36.105.193 with SMTP id e184mr29357937itc.31.1482910495523; Tue, 27 Dec 2016 23:34:55 -0800 (PST) Original-Received: from CzipperZag ([2604:2d80:8039:81de:a0b5:3d06:3bb2:d546]) by smtp.gmail.com with ESMTPSA id g126sm23238536ioa.13.2016.12.27.23.34.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 23:34:55 -0800 (PST) Original-To: emacs-devel@gnu.org Original-To: czipperz@gmail.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c0b::242 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:210873 Archived-At: Oops meant to reply to `Simplify internal_catch()'. Anyway here is another patch with the same thing. -- Chris Gregory diff --git a/src/eval.c b/src/eval.c index e50e26a..edb41b6 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1337,20 +1337,12 @@ internal_condition_case_1 (Lisp_Object (*bfun) (Lisp_Object), Lisp_Object arg, Lisp_Object (*hfun) (Lisp_Object)) { struct handler *c = push_handler (handlers, CONDITION_CASE); - if (sys_setjmp (c->jmp)) - { - Lisp_Object val = handlerlist->val; - clobbered_eassert (handlerlist == c); - handlerlist = handlerlist->next; - return hfun (val); - } - else - { - Lisp_Object val = bfun (arg); - clobbered_eassert (handlerlist == c); - handlerlist = handlerlist->next; - return val; - } + bool is_returning = sys_setjmp (c->jmp); + Lisp_Object val = is_returning ? handlerlist->val : bfun (arg); + + clobbered_eassert (handlerlist == c); + handlerlist = handlerlist->next; + return is_returning ? hfun (val) : val; } /* Like internal_condition_case_1 but call BFUN with ARG1 and ARG2 as