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: Trying to cope with Calendar's dynamic scoping Date: Wed, 21 Aug 2013 00:30:59 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1377059483 17374 80.91.229.3 (21 Aug 2013 04:31:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Aug 2013 04:31:23 +0000 (UTC) Cc: "Edward M. Reingold" , emacs-devel@gnu.org To: Edward Reingold Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 21 06:31:21 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 1VC04m-0007tD-Sq for ged-emacs-devel@m.gmane.org; Wed, 21 Aug 2013 06:31:21 +0200 Original-Received: from localhost ([::1]:51397 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VC04m-0001tj-H5 for ged-emacs-devel@m.gmane.org; Wed, 21 Aug 2013 00:31:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VC04b-0001sH-Pq for emacs-devel@gnu.org; Wed, 21 Aug 2013 00:31:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VC04S-0006eI-Tg for emacs-devel@gnu.org; Wed, 21 Aug 2013 00:31:09 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:5968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VC04S-0006eD-Po; Wed, 21 Aug 2013 00:31:00 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+LNT/2dsb2JhbABEDr8AF3OCHgEBBAFWIwULCzQSFBgNJIgeBrMwjX2RCgOkeoFegjkxKQ X-IPAS-Result: Av4EABK/CFHO+LNT/2dsb2JhbABEDr8AF3OCHgEBBAFWIwULCzQSFBgNJIgeBrMwjX2RCgOkeoFegjkxKQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="22723561" Original-Received: from 206-248-179-83.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([206.248.179.83]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 21 Aug 2013 00:30:53 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id ADF9AAE1E2; Wed, 21 Aug 2013 00:30:59 -0400 (EDT) In-Reply-To: (Edward Reingold's message of "Tue, 20 Aug 2013 19:19:58 -0500") 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:162946 Archived-At: > &%%(let* ((month (extract-calendar-month date)) > (day (extract-calendar-day date)) > (year (extract-calendar-year date)) > (last (calendar-last-day-of-month month year)) > (dayname (calendar-day-of-week date))) > (or (and (= day last) (memq dayname '(1 2 3 4 5))) > (and (or (= day (1- last)) (= day (- last 2))) > (= dayname 5)))) 8am Print IIT pay stub AFAIK my patch should handle this just fine. > I suspect the only reason anyone cares is that it generates warning > messages in compilation. Is there any other reason?! With the introduction of lexical scoping, using dynamic scoping on variables that are normally only used for local vars can lead to actual breakage (because the presence of the dynamic-scope declaration changes the nature of the variable). So while the problems are hypothetical so far, they're not just theoretical. > Tread very carefully. Indeed. Stefan