From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Lexical byte-compilation warnings cleanup Date: Wed, 04 Sep 2013 23:30:43 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1378351864 9884 80.91.229.3 (5 Sep 2013 03:31:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Sep 2013 03:31:04 +0000 (UTC) Cc: Emacs development discussions To: Daniel Hackney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 05 05:31:06 2013 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 1VHQHf-0004y2-Rk for ged-emacs-devel@m.gmane.org; Thu, 05 Sep 2013 05:31:03 +0200 Original-Received: from localhost ([::1]:56762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHQHf-0003bL-FN for ged-emacs-devel@m.gmane.org; Wed, 04 Sep 2013 23:31:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHQHV-0003bB-P6 for emacs-devel@gnu.org; Wed, 04 Sep 2013 23:31:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHQHO-0005as-FC for emacs-devel@gnu.org; Wed, 04 Sep 2013 23:30:53 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:40147) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHQHO-0005ao-Af for emacs-devel@gnu.org; Wed, 04 Sep 2013 23:30:46 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KK6/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYSFBgNJIgkwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFHO+KK6/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYSFBgNJIgkwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="26500867" Original-Received: from 206-248-162-186.dsl.teksavvy.com (HELO ceviche.home) ([206.248.162.186]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 04 Sep 2013 23:27:41 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id B3555660A1; Wed, 4 Sep 2013 23:30:43 -0400 (EDT) In-Reply-To: (Daniel Hackney's message of "Mon, 19 Aug 2013 19:33:00 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:163197 Archived-At: > - I'm seeing a lot of "Argument foo is not a lexical variable", such as > in vc/ediff-diff.el:532:56. What does this mean and is this something I've noticed that there's a bug in byte-compile-force-lexical-warnings which causes extra spurious warnings of this kind, so when using byte-compile-force-lexical-warnings, double check those warnings (which have been changed in the mean time to use a different formulation) since they may just be spurious. > -(defun dbus-string-to-byte-array (string) > - "Transforms STRING to list (:array :byte c1 :byte c2 ...). > -STRING shall be UTF8 coded." > - (if (zerop (length string)) > +(defun dbus-string-to-byte-array (str) > + "Transforms STR to list (:array :byte c1 :byte c2 ...). > +STR shall be UTF8 coded." > + (if (zerop (length str)) E.g. your renaming of a `string' argument to `str' is probably the result of such a spurious warning. So I didn't apply this hunk. > -(defun eww-display-raw (charset) > +(defun eww-display-raw (_charset) > (let ((data (buffer-substring (point) (point-max)))) > (eww-setup-buffer) > (let ((inhibit-read-only t)) When unused function arguments can be removed (as is the case here), it's generally a better choice than to mark them as unused. I just installed your patch, thank you, and sorry for the delay, Stefan