From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Johannes Weiner Newsgroups: gmane.emacs.devel Subject: Re: Please install and ack Date: Wed, 12 Sep 2007 22:02:37 +0200 Message-ID: <20070912200237.GA5419@saeurebad.de> References: <20070912100811.GC12104@saeurebad.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1248671847==" X-Trace: sea.gmane.org 1189627424 3534 80.91.229.12 (12 Sep 2007 20:03:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 Sep 2007 20:03:44 +0000 (UTC) Cc: Richard Stallman , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 12 22:03:41 2007 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.50) id 1IVYQG-0006ry-P1 for ged-emacs-devel@m.gmane.org; Wed, 12 Sep 2007 22:02:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVYQG-0008Mq-M9 for ged-emacs-devel@m.gmane.org; Wed, 12 Sep 2007 16:02:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IVYQC-0008Kx-Gq for emacs-devel@gnu.org; Wed, 12 Sep 2007 16:02:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IVYQB-0008Kd-Lf for emacs-devel@gnu.org; Wed, 12 Sep 2007 16:02:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVYQB-0008KV-Ft for emacs-devel@gnu.org; Wed, 12 Sep 2007 16:02:47 -0400 Original-Received: from saeurebad.de ([85.214.36.134]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IVYQ8-0002eQ-5E; Wed, 12 Sep 2007 16:02:44 -0400 Original-Received: by saeurebad.de (Postfix, from userid 1000) id 232682F0146; Wed, 12 Sep 2007 22:02:38 +0200 (CEST) Mail-Followup-To: Stefan Monnier , Richard Stallman , emacs-devel@gnu.org In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-11) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) 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:78710 Archived-At: --===============1248671847== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uZ3hkaAS1mZxFaxD" Content-Disposition: inline --uZ3hkaAS1mZxFaxD Content-Type: multipart/mixed; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Sep 12, 2007 at 10:05:31AM -0400, Stefan Monnier wrote: > > Wouldn't it be better to centralize that macro? It's trivial, sure. B= ut > > repetition is not beautiful. I have a patch attached, but I'm not quit= e sure > > if config.h is the place to do this.. >=20 > I'd put it in lisp.h Ok, second try. Hannes --45Z9DzgjV8m4Oswq Content-Type: text/x-diff; charset=us-ascii Content-Disposition: inline; filename="emacs-centralize-abs-r1.patch" Content-Transfer-Encoding: quoted-printable diff -Naur emacs.orig/src/keyboard.c emacs/src/keyboard.c --- emacs.orig/src/keyboard.c 2007-09-12 22:00:06.000000000 +0200 +++ emacs/src/keyboard.c 2007-09-12 21:53:35.000000000 +0200 @@ -108,8 +108,6 @@ #define KBD_BUFFER_SIZE 4096 #endif /* No X-windows */ =20 -#define abs(x) ((x) >=3D 0 ? (x) : -(x)) - /* Following definition copied from eval.c */ =20 struct backtrace diff -Naur emacs.orig/src/lisp.h emacs/src/lisp.h --- emacs.orig/src/lisp.h 2007-09-12 22:00:06.000000000 +0200 +++ emacs/src/lisp.h 2007-09-12 21:59:41.000000000 +0200 @@ -3389,6 +3389,12 @@ #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b)) =20 +/* Make sure we have abs defined */ + +#if defined(abs) +#define abs(x) ((x) < 0 ? -(x) : (x)) +#endif + /* Return a fixnum or float, depending on whether VAL fits in a Lisp fixnum. */ =20 diff -Naur emacs.orig/src/sound.c emacs/src/sound.c --- emacs.orig/src/sound.c 2007-09-12 22:00:06.000000000 +0200 +++ emacs/src/sound.c 2007-09-12 21:53:47.000000000 +0200 @@ -96,9 +96,6 @@ =20 #endif /* WINDOWSNT */ =20 -/* BEGIN: Common Definitions */ -#define abs(X) ((X) < 0 ? -(X) : (X)) - /* Symbols. */ =20 extern Lisp_Object QCfile, QCdata; diff -Naur emacs.orig/src/w32term.c emacs/src/w32term.c --- emacs.orig/src/w32term.c 2007-09-12 22:00:06.000000000 +0200 +++ emacs/src/w32term.c 2007-09-12 21:54:03.000000000 +0200 @@ -58,8 +58,6 @@ #include "composite.h" #include "coding.h" =20 -#define abs(x) ((x) < 0 ? -(x) : (x)) - =0C /* Fringe bitmaps. */ =20 diff -Naur emacs.orig/src/xfaces.c emacs/src/xfaces.c --- emacs.orig/src/xfaces.c 2007-09-12 22:00:06.000000000 +0200 +++ emacs/src/xfaces.c 2007-09-12 21:54:14.000000000 +0200 @@ -267,8 +267,6 @@ =20 #include =20 -#define abs(X) ((X) < 0 ? -(X) : (X)) - /* Number of pt per inch (from the TeXbook). */ =20 #define PT_PER_INCH 72.27 diff -Naur emacs.orig/src/xterm.c emacs/src/xterm.c --- emacs.orig/src/xterm.c 2007-09-12 22:00:06.000000000 +0200 +++ emacs/src/xterm.c 2007-09-12 21:54:22.000000000 +0200 @@ -154,8 +154,6 @@ #endif #endif =20 -#define abs(x) ((x) < 0 ? -(x) : (x)) - /* Default to using XIM if available. */ #ifdef USE_XIM int use_xim =3D 1; --45Z9DzgjV8m4Oswq-- --uZ3hkaAS1mZxFaxD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFG6EXddvEGNHGk3KARAut/AJ0XAYP+KY05onLmHm89tmcKyRQHyQCghgUN johLi3piuhXbqCMhomO0RQw= =P6GO -----END PGP SIGNATURE----- --uZ3hkaAS1mZxFaxD-- --===============1248671847== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --===============1248671847==--