From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: printing.el again Date: Mon, 15 Nov 2004 15:47:27 -0500 Message-ID: References: <419779C4.50909@ig.com.br> <871xew44v1.fsf-monnier+emacs@gnu.org> <41990B75.1080603@ig.com.br> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1100551704 14531 80.91.229.6 (15 Nov 2004 20:48:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Nov 2004 20:48:24 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 15 21:48:12 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CTnlj-0006AM-00 for ; Mon, 15 Nov 2004 21:48:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTnuS-00044O-71 for ged-emacs-devel@m.gmane.org; Mon, 15 Nov 2004 15:57:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CTnuJ-00044D-FX for emacs-devel@gnu.org; Mon, 15 Nov 2004 15:57:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CTnuI-00043u-LU for emacs-devel@gnu.org; Mon, 15 Nov 2004 15:57:02 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTnuI-00043Z-EY for emacs-devel@gnu.org; Mon, 15 Nov 2004 15:57:02 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CTnl9-0004aN-L4 for emacs-devel@gnu.org; Mon, 15 Nov 2004 15:47:35 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 49A798282B2; Mon, 15 Nov 2004 15:47:32 -0500 (EST) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id BF7B74AC060; Mon, 15 Nov 2004 15:47:27 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id A06D28CA69; Mon, 15 Nov 2004 15:47:27 -0500 (EST) Original-To: Vinicius Jose Latorre In-Reply-To: <41990B75.1080603@ig.com.br> (Vinicius Jose Latorre's message of "Mon, 15 Nov 2004 18:03:01 -0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=0, requis 5) X-MailScanner-From: monnier@iro.umontreal.ca 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: main.gmane.org gmane.emacs.devel:29888 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29888 > Ok, but a very long time ago there was a recommendation to do not use cl > package when writing code in Emacs Lisp. > Is that recommendation no more valid? CL functions should indeed not be used by packages distributed with Emacs. OTOH, CL macros (such as `push', `flet', ...) can be used just fine (just don't forget to put a (eval-when-compile (require 'cl)) at the top of your file). >> BTW, if you use (featurep 'xemacs) for the test, Emacs-21 will optimize >> the test away (since the resulting elc file can't be run on XEmacs >> anyway). Here it doesn't really matter, but it is sometimes very handy >> since it ends up getting rid of spurious warnings about >> XEmacs-specific code. > Well, so: > A) (cond ((eq ps-print-emacs-type 'xemacs) ...) > (t ...)) > B) (cond ((featurep 'xemacs) ...) > (t ...)) > Are you saying that A and B above are treated differently by the > byte-compiler?? Yes. The byte-compiler will not optimize away the `eq' test because it considers that the user might change ps-print-emacs-type at any time. OTOH the byte-compiler knows that since the code it generates doesn't work under XEmacs, (featurep 'xemacs) will always return nil. Stefan