From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: August Karlstrom Newsgroups: gmane.emacs.help Subject: Re: Finding Unused Identifiers Date: Sun, 05 Mar 2006 03:15:38 GMT Organization: Telia Internet Message-ID: References: <4406fc36$0$11610$3b214f66@tunews.univie.ac.at> <1YDNf.5345$F56.2416@newsread3.news.atl.earthlink.net> <1kwdawrs69lxs$.1nqpbp8apcebt.dlg@40tude.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1141686765 10018 80.91.229.2 (6 Mar 2006 23:12:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Mar 2006 23:12:45 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 07 00:12:43 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FGOsW-0007L7-Dp for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Mar 2006 00:12:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FGOsT-0003xX-WE for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Mar 2006 18:12:34 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newspeer1.se.telia.net!se.telia.net!masternews.telia.net.!newsb.telia.net.POSTED!not-for-mail User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 42 Original-NNTP-Posting-Host: 83.250.237.84 Original-X-Complaints-To: abuse@telia.com Original-X-Trace: newsb.telia.net 1141528538 83.250.237.84 (Sun, 05 Mar 2006 04:15:38 CET) Original-NNTP-Posting-Date: Sun, 05 Mar 2006 04:15:38 CET Original-Xref: shelby.stanford.edu gnu.emacs.help:137931 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:33572 Archived-At: August Karlstrom wrote: > (defun my-elisp-list-unused-globals () > "Display the list returned by `my-elisp-unused-globals'. Output > is written to a separate buffer." > (interactive) > (let ((unused-globals (my-elisp-unused-globals)) > (buffer nil)) > (setq buffer (get-buffer-create "*Elisp Unused Globals*")) > (when (= (count-windows) 1) (split-window)) > (other-window 1) > (switch-to-buffer buffer) > (erase-buffer) > (if (null unused-globals) > (insert "No unused global identifiers found.") > (insert "Found unused global identifier(s):\n\n") > (mapc '(lambda (x) (insert x) (newline)) unused-globals) > (switch-to-buffer buffer)))) The last line is (of course) incorrect. Should be (defun my-elisp-list-unused-globals () (interactive) (let ((unused-globals (my-elisp-unused-globals)) (buffer nil)) (setq buffer (get-buffer-create "*Elisp Unused Globals*")) (when (= (count-windows) 1) (split-window)) (other-window 1) (switch-to-buffer buffer) (erase-buffer) (if (null unused-globals) (insert "No unused global identifiers found.") (insert "Found unused global identifier(s):\n\n") (mapc '(lambda (x) (insert x) (newline)) unused-globals)) (other-window -1))) August -- I am the "ILOVEGNU" signature virus. Just copy me to your signature. This email was infected under the terms of the GNU General Public License.