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: Cleaning up code Date: Thu, 15 Aug 2013 10:37:27 -0400 Message-ID: References: <87eh9x62o1.fsf@gmx.de> <87mwojiby1.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1376577466 30935 80.91.229.3 (15 Aug 2013 14:37:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Aug 2013 14:37:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 15 16:37:47 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 1V9ygM-0006nu-F1 for ged-emacs-devel@m.gmane.org; Thu, 15 Aug 2013 16:37:46 +0200 Original-Received: from localhost ([::1]:53643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9ygL-0008R3-St for ged-emacs-devel@m.gmane.org; Thu, 15 Aug 2013 10:37:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9ygB-0008QT-Nw for emacs-devel@gnu.org; Thu, 15 Aug 2013 10:37:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9yg4-0002Xs-DT for emacs-devel@gnu.org; Thu, 15 Aug 2013 10:37:35 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:45280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9yg4-0002Xh-9O for emacs-devel@gnu.org; Thu, 15 Aug 2013 10:37:28 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFLd/Nq/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxOBSiQ X-IPAS-Result: Av4EABK/CFFLd/Nq/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxOBSiQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="21939069" Original-Received: from 75-119-243-106.dsl.teksavvy.com (HELO pastel.home) ([75.119.243.106]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 15 Aug 2013 10:37:20 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 26C1D66215; Thu, 15 Aug 2013 10:37:27 -0400 (EDT) In-Reply-To: <87mwojiby1.fsf@gmx.de> (Michael Albinus's message of "Thu, 15 Aug 2013 10:40:38 +0200") 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:162761 Archived-At: > There is also another case where it doesn't work as expected. Often, I > let bind a variable for side effect, like this: > (let ((default-directory (tramp-compat-temporary-file-directory)) > (outline-regexp tramp-debug-outline-regexp)) > (outline-mode)) > And I get from the byte compiler > tramp.el:1400:1:Warning: Unused lexical variable `outline-regexp' That is a correct warning, telling you that it treated outline-regexp as a lexical variable and hence that it did not generate the code you want. IOW you need to add (defvar outline-regexp) -- Stefan