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: Remove unused local variables Date: Mon, 26 Dec 2016 22:43:59 -0600 Message-ID: <87pokekmls.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1482813855 5102 195.159.176.226 (27 Dec 2016 04:44:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Dec 2016 04:44:15 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 27 05:44: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 1cLjcK-0008N1-0A for ged-emacs-devel@m.gmane.org; Tue, 27 Dec 2016 05:44:04 +0100 Original-Received: from localhost ([::1]:52710 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cLjcO-0001IR-Ps for ged-emacs-devel@m.gmane.org; Mon, 26 Dec 2016 23:44:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cLjcI-0001I9-3n for emacs-devel@gnu.org; Mon, 26 Dec 2016 23:44:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cLjcH-00052C-GO for emacs-devel@gnu.org; Mon, 26 Dec 2016 23:44:02 -0500 Original-Received: from mail-io0-x243.google.com ([2607:f8b0:4001:c06::243]:35677) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cLjcH-000526-Be for emacs-devel@gnu.org; Mon, 26 Dec 2016 23:44:01 -0500 Original-Received: by mail-io0-x243.google.com with SMTP id f73so39868629ioe.2 for ; Mon, 26 Dec 2016 20:44:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=RY2hqeChHXntjUm4GPdvDh1aqb8afv4kSuGIDHlrWsw=; b=FJf2WgxlQv3OkZaujhOM4FMhj0LiuIM8qQsxVDlQqD5D93boL8US9YUxdDaTE0e5uD fixtexjStIdqu5rsGBxU1tCH4FR9N4QD1zhK+HlgiitfrcDTLEVCceMD+Y2sI7qlewRD O2O2unNrYquGOAaqAQQhdO48F0ZVPNN/UJ+22+v3WDZvQm6sCnTV5ddsSl87PGitrvRD f+EgSZ+rE4hzuxD30kPUzbTVR3A70kh/I0t1sU/icofRHBr4lgmrsxVWJujDh1B474qi Su0FW8yC40mBapezxMGrFv9Cfiuh/oitHa8G0+TTmScs9czCXL1pqJPCicYFmmmEDtdF rIkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=RY2hqeChHXntjUm4GPdvDh1aqb8afv4kSuGIDHlrWsw=; b=C+XgnQqpE4UJezas1b84TeC8UNVfTS4K/WQc8vay9PhYWJ4IhNCbwcZX084Nhhsiwa a9wIjEAWOUa16lI94bpD93fe3dIfemJDDvE7ReSlAFu4fPlcpgpE7QQr9qzsWVvxiz0q vsoNoQHdkF90vDO6XJ4yvLIamZXPk0Q+wxy9pFfH2T68JO3DI345BoG5WaDXZyFpEJFR agOS00hj2ZgKNcRI4mLkALy93EW8XiKKbHWXHyPFtgpKN/nyMCMbas+R4PwyqVJTbRti z4nCgFtA6ILRHESGZ8QHFEaL7YSzwExe7nFfanzN8zt8SCTCIpRk5KZJRRl/Va8uUqeO 5PwA== X-Gm-Message-State: AIkVDXInPc1rxVEVnSvJZn2rSd3oXvWSGsOSBXTo9phIJQOjLPiFIjTxpt8091BaxZmdFA== X-Received: by 10.107.63.198 with SMTP id m189mr23791420ioa.56.1482813840449; Mon, 26 Dec 2016 20:44:00 -0800 (PST) Original-Received: from CzipperZag ([2604:2d80:8039:81de:a0b5:3d06:3bb2:d546]) by smtp.gmail.com with ESMTPSA id j201sm20182588ita.2.2016.12.26.20.43.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Dec 2016 20:44:00 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c06::243 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:210832 Archived-At: This patch removes some local variables that were assigned and then only used once immediately after. It also removes a redundant XCDR call in Fsetq_default. diff --git a/src/data.c b/src/data.c index e2c1a28..af25c75 100644 --- a/src/data.c +++ b/src/data.c @@ -1720,16 +1720,16 @@ of previous VARs. usage: (setq-default [VAR VALUE]...) */) (Lisp_Object args) { - Lisp_Object args_left, symbol, val; + Lisp_Object args_left, val; args_left = val = args; while (CONSP (args_left)) { - val = eval_sub (Fcar (XCDR (args_left))); - symbol = XCAR (args_left); - Fset_default (symbol, val); - args_left = Fcdr (XCDR (args_left)); + Lisp_Object cdr_args_left = XCDR (args_left); + val = eval_sub (Fcar (cdr_args_left)); + Fset_default (XCAR (args_left), val); + args_left = Fcdr (cdr_args_left); } return val; diff --git a/src/lread.c b/src/lread.c index f14c68e..b2bbf75 100644 --- a/src/lread.c +++ b/src/lread.c @@ -963,7 +963,7 @@ required. This uses the variables `load-suffixes' and `load-file-rep-suffixes'. */) (void) { - Lisp_Object lst = Qnil, suffixes = Vload_suffixes, suffix, ext; + Lisp_Object lst = Qnil, suffixes = Vload_suffixes, suffix; while (CONSP (suffixes)) { Lisp_Object exts = Vload_file_rep_suffixes; @@ -971,9 +971,8 @@ This uses the variables `load-suffixes' and `load-file-rep-suffixes'. */) suffixes = XCDR (suffixes); while (CONSP (exts)) { - ext = XCAR (exts); + lst = Fcons (concat2 (suffix, XCAR (exts)), lst); exts = XCDR (exts); - lst = Fcons (concat2 (suffix, ext), lst); } } return Fnreverse (lst);