From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#4395: 23.1; byte-compiler loses top-level (put 'x...) Date: Thu, 10 Sep 2009 17:04:59 -0700 Message-ID: Reply-To: Drew Adams , 4395@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1252628855 28283 80.91.229.12 (11 Sep 2009 00:27:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Sep 2009 00:27:35 +0000 (UTC) To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 11 02:27:28 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mltz5-0000XW-47 for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Sep 2009 02:27:27 +0200 Original-Received: from localhost ([127.0.0.1]:40305 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mltz4-0005NL-CO for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Sep 2009 20:27:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mltyn-000597-CJ for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 20:27:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mltyh-00052r-3P for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 20:27:06 -0400 Original-Received: from [199.232.76.173] (port=51836 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mltyg-00052e-IZ for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 20:27:02 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:52118) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mltyf-0001wq-W3 for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 20:27:02 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8B0QxMd002456; Thu, 10 Sep 2009 17:26:59 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8B0F4JR000371; Thu, 10 Sep 2009 17:15:04 -0700 Resent-Date: Thu, 10 Sep 2009 17:15:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 11 Sep 2009 00:15:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 4395 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125262751431236 (code B ref -1); Fri, 11 Sep 2009 00:15:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 11 Sep 2009 00:05:14 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8B05CuK031193 for ; Thu, 10 Sep 2009 17:05:13 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MltdY-0003Nw-5g for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 20:05:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MltdT-0003L9-Ev for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 20:05:11 -0400 Original-Received: from [199.232.76.173] (port=53137 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MltdT-0003L6-BW for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 20:05:07 -0400 Original-Received: from acsinet12.oracle.com ([141.146.126.234]:57533) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MltdS-0007QY-O1 for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 20:05:07 -0400 Original-Received: from rgminet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n8B04LVT008915 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 11 Sep 2009 00:04:22 GMT Original-Received: from abhmt001.oracle.com (abhmt001.oracle.com [141.146.116.10]) by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n8B05Nr4019063 for ; Fri, 11 Sep 2009 00:05:23 GMT Original-Received: from dradamslap1 (/141.144.80.125) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 10 Sep 2009 17:05:01 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acoyc4DbueuPJ/Z9QmSiFiJqqzJBcw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt001.oracle.com [141.146.116.10] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090208.4AA9942D.0132:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Thu, 10 Sep 2009 20:27:06 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30936 Archived-At: 1. emacs -Q Put these sexps somewhere at the top level of a file foo.el: (require 'bar) ... (put 'thevar 'variable-documentation "The new doc string") ... (provide 'foo) Put these sexps in file bar.el: (defvar thevar 42 "Original doc string.") ... (provide 'bar) Byte-compile the files. emacs -Q Load library foo. C-h v the-var The doc shown is the original doc string. The top-level `put' had no effect. Doing the same thing using the *.el instead of *.elc works - no problem. It also works, with the byte-compiled files, if you wrap the `put' sexp in `when': (when t (put 'foovar 'variable-documentation "The new doc string")) (Actually, I tried with (require 'XXX) instead of t.) 2. It also works with the byte-compiled files, if you add a vacuous defvar to foo.el: (defvar thevar) (put 'thevar 'variable-documentation "The new doc string") That is the approach used in library cc-vars.el. If this is a recommended cliche, or is the only good way to change the doc string of a var, then it needs to be documented in the Elisp manual. 3. Feature request: Have something similar to defadvice for a variable, at least to be able to add to its doc string. In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-07-29 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.4)'