From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#7848: 23.2.91; Can't build with MinGW Date: Sun, 16 Jan 2011 10:58:12 -0500 Message-ID: References: <20110115073410.74410360038@msa102.auone-net.jp> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1295195082 6995 80.91.229.12 (16 Jan 2011 16:24:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 16 Jan 2011 16:24:42 +0000 (UTC) Cc: kzhr@d1.dion.ne.jp, 7848@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 16 17:24:37 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PeVPA-0005we-UZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Jan 2011 17:24:37 +0100 Original-Received: from localhost ([127.0.0.1]:57210 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PeVPA-0000d7-4e for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Jan 2011 11:24:36 -0500 Original-Received: from [140.186.70.92] (port=36039 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PeVP5-0000cs-0g for bug-gnu-emacs@gnu.org; Sun, 16 Jan 2011 11:24:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PeVP3-0007hJ-AP for bug-gnu-emacs@gnu.org; Sun, 16 Jan 2011 11:24:30 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PeVP3-0007hF-7g for bug-gnu-emacs@gnu.org; Sun, 16 Jan 2011 11:24:29 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PeUsg-0003rN-Hv; Sun, 16 Jan 2011 10:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Jan 2011 15:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7848-submit@debbugs.gnu.org id=B7848.129519303914806 (code B ref 7848); Sun, 16 Jan 2011 15:51:02 +0000 Original-Received: (at 7848) by debbugs.gnu.org; 16 Jan 2011 15:50:39 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PeUsI-0003qk-10 for submit@debbugs.gnu.org; Sun, 16 Jan 2011 10:50:38 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PeUsF-0003qY-SJ for 7848@debbugs.gnu.org; Sun, 16 Jan 2011 10:50:36 -0500 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1PeUzc-0006Ue-Dq; Sun, 16 Jan 2011 10:58:12 -0500 In-reply-to: (message from Stefan Monnier on Sun, 16 Jan 2011 10:21:53 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 16 Jan 2011 10:51:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:43400 Archived-At: > From: Stefan Monnier > Cc: kzhr@d1.dion.ne.jp, 7848@debbugs.gnu.org > Date: Sun, 16 Jan 2011 10:21:53 -0500 > > >> I would recommend to stay away from such low-level code unless you're > >> writing code that tries to implement part of the binding-semantics > >> of Emacs. I.e. just use Fset. > > Using Fset here would be a terrible overkill, IMO. > > Overkill? For code that's not even inside a loop? What are you talking about? Look at its body, man. All I want is to assign a simple value to a simple global-scope variable. Look how many unrelated use-cases the implementation of Fset handles. How can a mere mortal who was never privy to the intimate details of whatever-local variables possibly grasp what is going on there? How can I be expected to be able to install a quick and safe fix on a release branch with all that complexity that is utterly unrelated to what I want to do? If you want to avoid code that knows too much about variable internals, we should have a much simpler utility function to do this kind of job in such special cases. SET_SYMBOL_VAL looked like such a utility. > > I'm not even sure I understand all of its semantics, > > The semantics of Fset are the same as the ones of `setq' which you use > days-in days-out in Elisp. I use no Lisp at all during dumping. There are certain things one shouldn't do at that time. My everyday experience in Emacs does not help me in this case. > I.e. it's the semantics you know best, whereas the semantics of > SET_SYMBOL_VAL are a lot more tricky. If it is tricky, please consider putting a suitable commentary near it to explain the trickery, and also tell why this macro should be used with care, or be avoided, or whatever. > > and not sure it will work correctly in the context of an init_* > > function that is called when Emacs is dumped. > > Yes, it'll work just fine, pretty much in any context (the only tricky > context in this respect is when/before the `nil' symbol&variable and the > `unbound' value are built, AFAIK). And I'm supposed to learn this from where, exactly? And how do I know whether any specific code runs after that critical point? That's precisely why I avoided Fset: because I could not convince myself that it is always safe to use it in a function that runs during dumping. If Fset's implementation was simpler, I could have understood that myself. > I'm not complaining, at all. Just giving advice. Thanks for the advice.