From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65906 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Avoiding compiler warnings Date: Fri, 07 Dec 2007 13:34:30 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1197002155 26103 80.91.229.12 (7 Dec 2007 04:35:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Dec 2007 04:35:55 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M14401@lists.math.uh.edu Fri Dec 07 05:36:06 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1J0UwW-0007Mz-6d for ding-account@gmane.org; Fri, 07 Dec 2007 05:36:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1J0UvF-0008Su-Qp; Thu, 06 Dec 2007 22:34:45 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1J0UvE-0008Se-C3 for ding@lists.math.uh.edu; Thu, 06 Dec 2007 22:34:44 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1J0Uv8-0001xf-3W for ding@lists.math.uh.edu; Thu, 06 Dec 2007 22:34:44 -0600 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1J0Uv5-0007Me-00 for ; Fri, 07 Dec 2007 05:34:35 +0100 Original-Received: from [66.225.201.151] (port=60940 helo=mail.jpl.org) by orlando.hostforweb.net with esmtpa (Exim 4.68) (envelope-from ) id 1J0Uv2-00089h-3D for ding@gnus.org; Thu, 06 Dec 2007 22:34:32 -0600 X-Hashcash: 1:20:071207:ding@gnus.org::QNi64Mx8k0gDoqgB:00001HOI X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:6VvUmN2SmOjC34I78Hfc0qhIm9k= X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.4 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:65906 Archived-At: --=-=-= >>>>> Katsumi Yamaoka wrote: > That byte-compilation doesn't report on harmless things is also > useful at least for me. I do `make' with all versions of Emacsen > that Gnus supports whenever a change has been made in Gnus, and > check the source code if the byte compiler issues a warning. > Though no-warning doesn't mean there's no problem of course, it > is useful for such a work. Is it acceptable to do things to > suppress warnings at lpath,el and dgnushack.el? I've added the following function and bound some variable and function symbols for XEmacs of the version with which it returns non-nil in dgnushack.el. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (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))))) --=-=-=--