From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78246 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: lexbind ready for merge Date: Wed, 30 Mar 2011 16:54:09 +0200 Message-ID: <87aagcwtf2.fsf@member.fsf.org> References: <877hbhxe12.fsf@member.fsf.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1301496874 1113 80.91.229.12 (30 Mar 2011 14:54:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 30 Mar 2011 14:54:34 +0000 (UTC) Cc: ding@gnus.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 30 16:54:30 2011 Return-path: Envelope-to: ged-emacs-devel@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 1Q4wmw-0002lh-SV for ged-emacs-devel@m.gmane.org; Wed, 30 Mar 2011 16:54:30 +0200 Original-Received: from localhost ([127.0.0.1]:49184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4wms-0004WV-TL for ged-emacs-devel@m.gmane.org; Wed, 30 Mar 2011 10:54:22 -0400 Original-Received: from [140.186.70.92] (port=45526 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4wmm-0004W9-RP for emacs-devel@gnu.org; Wed, 30 Mar 2011 10:54:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4wmi-00053M-JL for emacs-devel@gnu.org; Wed, 30 Mar 2011 10:54:14 -0400 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:18160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4wmi-000536-6N for emacs-devel@gnu.org; Wed, 30 Mar 2011 10:54:12 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id C89837815EA7; Wed, 30 Mar 2011 16:54:10 +0200 (CEST) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11731-01-2; Wed, 30 Mar 2011 16:54:09 +0200 (CEST) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from thinkpad (tsdh.uni-koblenz.de [141.26.67.142]) by deliver.uni-koblenz.de (Postfix) with ESMTP id B4F5E7815001; Wed, 30 Mar 2011 16:54:09 +0200 (CEST) In-Reply-To: (Stefan Monnier's message of "Wed, 30 Mar 2011 10:29:42 -0400") User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.9999 (gnu/linux) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 141.26.64.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:137916 gmane.emacs.gnus.general:78246 Archived-At: Stefan Monnier writes: >> The reason is that in trunk, that function has the signature >> byte-compile-from-buffer (bytecomp-inbuffer &optional bytecomp-filename) >> but in the lexbind branch, the optional bytecomp-filename has been >> removed: > >> byte-compile-from-buffer (inbuffer) > >> AFAIKS, gnus doesn't use the foo.el file anyway, so basically that arg >> can be removed. But maybe the `byte-compile-from-buffer' definition in >> [[S]X]Emacs requires exactly 2 arguments? I don't know... > > Why on earth does Gnus need to call byte-compile-from-buffer? The purpose of the whole dgnushack.el is to figure out the correct load-path when byte-compiling. But I'm the wrong person to ask why that messy dance has to be danced... I added the Gnus list to the Cc. The function definition is (defun dgnushack-emacs-compile-defcustom-p () "Return non-nil if Emacs byte compiles `defcustom' forms. Those Emacsen will warn against undefined variables and functions used in `defcustom' forms." (let ((outbuf (with-temp-buffer (insert "(defcustom foo (1+ (random)) \"\" :group 'emacs)\n") (byte-compile-from-buffer (current-buffer) "foo.el")))) (when outbuf (prog1 (with-current-buffer outbuf (goto-char (point-min)) (search-forward " 'foo '(byte-code " nil t)) (kill-buffer outbuf))))) and its use is in dgnushack's form (when (dgnushack-emacs-compile-defcustom-p) (maybe-fbind '(defined-colors face-attribute)) (maybe-bind '(idna-program installation-directory))) where maybe-[f]bind is declared in lpath.el, whose top level comment is ;; Shut up. ;-) Bye, Tassilo