From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: Bad purecopy in ethiopic.el? Date: Fri, 13 Nov 2009 12:14:18 -0500 Message-ID: References: <83hbsyolg2.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1258132479 7231 80.91.229.12 (13 Nov 2009 17:14:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Nov 2009 17:14:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 13 18:14:32 2009 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 1N8zjD-0006Li-T5 for ged-emacs-devel@m.gmane.org; Fri, 13 Nov 2009 18:14:32 +0100 Original-Received: from localhost ([127.0.0.1]:54354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8zjD-0007JQ-9x for ged-emacs-devel@m.gmane.org; Fri, 13 Nov 2009 12:14:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8zj7-0007JF-I2 for emacs-devel@gnu.org; Fri, 13 Nov 2009 12:14:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8zj3-0007FM-2S for emacs-devel@gnu.org; Fri, 13 Nov 2009 12:14:25 -0500 Original-Received: from [199.232.76.173] (port=55647 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8zj2-0007FH-Uz for emacs-devel@gnu.org; Fri, 13 Nov 2009 12:14:20 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:55385) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N8zj2-0004bq-Ix for emacs-devel@gnu.org; Fri, 13 Nov 2009 12:14:20 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1N8zj0-0005zg-PR; Fri, 13 Nov 2009 12:14:18 -0500 X-Spook: Steve Case defense information warfare brigand LABLINK X-Ran: `JO4Fl^*A)VN32'14rFwVE8,ry2.<)K*sB&(!p{r2:5ggr+pz:N\mfJZG~=.Y7}c8'v X-Hue: white X-Attribution: GM User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:116957 Archived-At: Eli Zaretskii wrote: > language/ethiopic.el:33:1:Warning: third arg to `defconst > ccl-encode-ethio-font' is not a string: (purecopy CCL program to encode an > Ethiopic code to code point of Ethiopic font.) Presumably purecopy'd strings are acceptable as doc-strings. I think byte-compile-defvar should be patched something like this (line numbers may be off): *************** *** 3929,3937 **** (when (and (cddr form) (null byte-compile-current-form)) `(push ',var current-load-list)) (when (> (length form) 3) ! (when (and string (not (stringp string))) ! (byte-compile-warn "third arg to `%s %s' is not a string: %s" ! fun var string)) `(put ',var 'variable-documentation ,string)) (if (cddr form) ; `value' provided (let ((byte-compile-not-obsolete-vars (list var))) --- 3821,3832 ---- (when (and (cddr form) (null byte-compile-current-form)) `(push ',var current-load-list)) (when (> (length form) 3) ! (or (not string) ! (stringp string) ! (and (eq (car-safe string) 'purecopy) ! (string-or-null-p (car-safe (cdr-safe string)))) ! (byte-compile-warn "third arg to `%s %s' is not a string: %s" ! fun var string)) `(put ',var 'variable-documentation ,string)) (if (cddr form) ; `value' provided (let ((byte-compile-not-obsolete-vars (list var))) Perhaps the string-or-null-p should be a stringp and ccl.el should also be changed: *** ccl.el 11 Nov 2009 06:18:20 -0000 1.52 --- ccl.el 13 Nov 2009 17:09:11 -0000 *************** *** 1523,1529 **** (fset 'charset-id 'charset-id-internal) (ccl-compile (eval ccl-program))) (fmakunbound 'charset-id)))) ! (defconst ,name prog (purecopy ,doc)) (put ',name 'ccl-program-idx (register-ccl-program ',name prog)) nil)) --- 1523,1529 ---- (fset 'charset-id 'charset-id-internal) (ccl-compile (eval ccl-program))) (fmakunbound 'charset-id)))) ! (defconst ,name prog (if ,doc (purecopy ,doc))) (put ',name 'ccl-program-idx (register-ccl-program ',name prog)) nil))