From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: tags for functions Date: Thu, 29 Jan 2009 21:32:59 +0100 Message-ID: References: <867i4pemv5.fsf@lifelogs.com> <87tz7oxodr.fsf@jurta.org> <86mydd3kzv.fsf@lifelogs.com> <87pri9k64b.fsf@jurta.org> <86ljsw252p.fsf@lifelogs.com> <87hc3kfgb8.fsf@jurta.org> <86r62ne3aq.fsf@lifelogs.com> <86bptrdv4f.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1233261196 4696 80.91.229.12 (29 Jan 2009 20:33:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Jan 2009 20:33:16 +0000 (UTC) Cc: Ted Zlatanov , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 29 21:34:29 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 1LSdan-00019j-1T for ged-emacs-devel@m.gmane.org; Thu, 29 Jan 2009 21:34:29 +0100 Original-Received: from localhost ([127.0.0.1]:35111 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSdZU-0000GH-FE for ged-emacs-devel@m.gmane.org; Thu, 29 Jan 2009 15:33:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LSdZP-0000FO-0K for emacs-devel@gnu.org; Thu, 29 Jan 2009 15:33:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LSdZN-0000Ew-R2 for emacs-devel@gnu.org; Thu, 29 Jan 2009 15:33:02 -0500 Original-Received: from [199.232.76.173] (port=55359 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSdZN-0000Eq-Lw for emacs-devel@gnu.org; Thu, 29 Jan 2009 15:33:01 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.157]:27132) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LSdZN-0002NL-AS for emacs-devel@gnu.org; Thu, 29 Jan 2009 15:33:01 -0500 Original-Received: by fg-out-1718.google.com with SMTP id e12so76228fga.30 for ; Thu, 29 Jan 2009 12:32:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=J4lEfl6eKq7KHKQeShGhcHKvrixgr/bio7195XcaT8c=; b=VqI03mK08fHS0ewB2h5+7uHaLPaF5EG7Pk2P+npdMV9nFxI2iB34V/RqVbf93bVf6K ttpRt1tZZbJPGOeWvP4Lm+GYafaN/RL8N4n2ZuNHte154pApMQpJXaPUp70d4rg5QW6O 7BoKPYKo83Rk0XYWiPqM/EboluVs06qDRw4Rs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=MoRAXyCSfo8C3RQDXDfyy/VJkEDnquEhj1yNNNo24Q83gZV4yGxbyPASxxTKKRU+fH q3tCLa3v0IC0FXCrSuRULNS+2wCQclz4xhLRZnr/eglqmvikMstsnPMS5/dNJuEeoG3b nErRQmdw651lVG+wBzxDsdmJWF5vFMl0bZ0Y0= Original-Received: by 10.223.109.148 with SMTP id j20mr450822fap.43.1233261179848; Thu, 29 Jan 2009 12:32:59 -0800 (PST) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:108376 Archived-At: On Thu, Jan 29, 2009 at 2:43 AM, Stefan Monnier wrote: >> Juri's solution is slow, as Lennart noted, due to the `documentation' >> issue you mentioned. I said I think a defun-after-hook would be the >> best solution. Maybe it should be combined with a etc/DOC scan to find >> all the existing keywords quickly. > > In any case, we don't want to collect/store this info all the time: we > only want to pay for it when this data is actually used. Is there really any reason not to just collect it while compiling (using :keywords)? Beside the human work needed ... ;-) (let ((n 0)) (defun my-keyw () (let (keywordlist docstr) (mapatoms (lambda (symbol) (when (functionp symbol) (setq n (1+ n)) (put symbol 'my-keyw (list 'test 'ing))))))) (benchmark 1 '(my-keyw)) (message "n=%s" n)) This takes 0.2 s for 12000 functions.