From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Aaron S. Hawley" Newsgroups: gmane.emacs.bugs Subject: bug#12686: PATCH: ambiguous help doc strings Date: Tue, 23 Oct 2012 11:24:01 -0400 Message-ID: References: <87wqyh7i20.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1351005931 22813 80.91.229.3 (23 Oct 2012 15:25:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Oct 2012 15:25:31 +0000 (UTC) Cc: 12686@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 23 17:25:37 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TQgMK-0007H6-N4 for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Oct 2012 17:25:36 +0200 Original-Received: from localhost ([::1]:56085 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQgMC-0005th-UD for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Oct 2012 11:25:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQgLy-0005Kq-Gw for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2012 11:25:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQgLu-0003nF-5m for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2012 11:25:14 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQgLt-0003kz-UX for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2012 11:25:10 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TQgNh-0002sX-O4 for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2012 11:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Aaron S. Hawley" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Oct 2012 15:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12686 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12686-submit@debbugs.gnu.org id=B12686.135100596310992 (code B ref 12686); Tue, 23 Oct 2012 15:27:01 +0000 Original-Received: (at 12686) by debbugs.gnu.org; 23 Oct 2012 15:26:03 +0000 Original-Received: from localhost ([127.0.0.1]:57899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQgMk-0002rE-8S for submit@debbugs.gnu.org; Tue, 23 Oct 2012 11:26:02 -0400 Original-Received: from mail-ia0-f172.google.com ([209.85.210.172]:37934) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQgMi-0002qk-0g for 12686@debbugs.gnu.org; Tue, 23 Oct 2012 11:26:00 -0400 Original-Received: by mail-ia0-f172.google.com with SMTP id o25so2982563iad.3 for <12686@debbugs.gnu.org>; Tue, 23 Oct 2012 08:24:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gaKdu6D7sOBgDFCAJfBbtdDEsQev9oQSPBmsPazhMQY=; b=rmbPwDKTAzhhyXhSQZ3PdBXPezD0JfsvZCuPp1BjBmK22lYbgHqHFgp95lm64qb0AR bcxLpT/Wvd8Pyboiovcr9YHYE6Haz9ENOzkLfm5OypRvZetYiGFkDTkDU/t10O86jOON Cr+Ahp4fnop27Ecum+QrS1gPEozvuLt+GL54P1DR7qojeNYD5ByX0qnE3X2SINvoIOm+ reINfvdXmktU2uPFHitb7oUxGoyOjxSf/YqPCnMxL+BS+7UQygfoeJO1AeH49kXaWCdg B9aZrC8qtZZ2NxUdFPS4bR3fR5BNitcTx7mQxnq4zOD8mPLcfISzEfwowSGPqdyLUOZd zzwA== Original-Received: by 10.50.40.225 with SMTP id a1mr14202648igl.7.1351005841806; Tue, 23 Oct 2012 08:24:01 -0700 (PDT) Original-Received: by 10.64.38.129 with HTTP; Tue, 23 Oct 2012 08:24:01 -0700 (PDT) In-Reply-To: <87wqyh7i20.fsf@mail.jurta.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65917 Archived-At: > To avoid crashes after loading all the libraries I suggest to try > static analysis without loading the libraries. This is possible > to do with a function like `emacs-lisp-grep' from > http://lists.gnu.org/archive/html/emacs-devel/2005-05/msg01259.html Nice. > When the first element of an expression read from the source file > is `defun', its docstring is in the fourth element. A variable name > is the second element of the expression whose first element is `defvar' > or `defcustom', etc. Conditional defvars are more tricky to process > but fortunately they are rare. For this problem, this would require two passes. The first pass to find the ambiguous symbol definitions (a defun and defvar or defcustom) then a second to find the references to these symbols in documentation in an ambiguous way. I'd probably use something like an obarray to keep track of symbols in the first pass, but it would be a second-rate reimplementation to what Emacs already does. And `emacs-lisp-grep' wouldn't search the C sources. So for laziness and completeness, I went with mapatoms. -- In general, we reserve the right to have a poor memory--the computer, however, is supposed to remember! Poor computer. -- Guy Lewis Steele Jr.