From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.devel Subject: Re: info-xref empty filenames Date: Thu, 11 Mar 2004 10:09:02 +1000 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <873c8gw8gx.fsf@zip.com.au> References: <87k75k13if.fsf@zip.com.au> <87wu6nx3a5.fsf@zip.com.au> <8765dxclax.fsf@mail.jurta.org> <87llmshzqf.fsf@zip.com.au> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1079225404 21007 80.91.224.253 (14 Mar 2004 00:50:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 14 Mar 2004 00:50:04 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Mar 14 01:49:58 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B2JpG-0004C4-00 for ; Sun, 14 Mar 2004 01:49:58 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B2JpG-0004g2-00 for ; Sun, 14 Mar 2004 01:49:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B2JMp-0006Lm-Md for emacs-devel@quimby.gnus.org; Sat, 13 Mar 2004 19:20:35 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B2IlL-0005Aw-IT for emacs-devel@gnu.org; Sat, 13 Mar 2004 18:41:51 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B1EEe-0007Fv-P7 for emacs-devel@gnu.org; Wed, 10 Mar 2004 19:40:12 -0500 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1B1EDC-00070s-9O for emacs-devel@gnu.org; Wed, 10 Mar 2004 19:38:10 -0500 Original-Received: from [61.8.0.85] (helo=mailout2.pacific.net.au) by mx20.gnu.org with esmtp (Exim 4.30) id 1B1DlF-0007H1-C4 for emacs-devel@gnu.org; Wed, 10 Mar 2004 19:09:17 -0500 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout2.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i2B09EnX022444 for ; Thu, 11 Mar 2004 11:09:14 +1100 Original-Received: from localhost (ppp207.dyn250.pacific.net.au [203.143.250.207]) by mailproxy2.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i2B09CGf002102 for ; Thu, 11 Mar 2004 11:09:13 +1100 Original-Received: from gg by localhost with local (Exim 3.36 #1 (Debian)) id 1B1Dl2-0000qW-00; Thu, 11 Mar 2004 10:09:04 +1000 Original-To: emacs-devel@gnu.org In-Reply-To: <87llmshzqf.fsf@zip.com.au> (Kevin Ryde's message of "Wed, 25 Feb 2004 08:36:08 +1000") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20418 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20418 --=-=-= This is what I ended up with for checking custom links, it goes on top of the empty filenames change for info-xref.el I posted before. * info-xref.el (info-xref-check-all-custom): New function. --=-=-= Content-Disposition: inline; filename=info-xref.el.custom.diff *** info-xref.el.old Thu Mar 11 09:58:11 2004 --- info-xref.el Thu Mar 11 10:00:39 2004 *************** *** 264,269 **** --- 264,327 ---- (unless (equal (current-buffer) oldbuf) (kill-buffer (current-buffer)))))))) + (defun info-xref-check-all-custom () + "Check info references in all customize groups and variables. + `custom-manual' and `info-link' entries in the `custom-links' list are checked. + + `custom-load' autoloads for all symbols are loaded in order to get all the + link information. This will be a lot of lisp packages loaded, and can take + quite a while." + + (interactive) + (pop-to-buffer info-xref-results-buffer t) + (erase-buffer) + (let ((info-xref-filename-heading "")) + + ;; `custom-load-symbol' is not used, since it quietly ignores errors, + ;; but we want to show them (since they may mean incomplete checking). + ;; + ;; Just one pass through mapatoms is made. There shouldn't be any new + ;; custom-loads setup by packages loaded. + ;; + (info-xref-output "Loading custom-load autoloads ...\n") + (require 'cus-start) + (require 'cus-load) + (let ((viper-mode nil)) ;; tell viper.el not to ask about viperizing + (mapatoms + (lambda (symbol) + (dolist (load (get symbol 'custom-loads)) + (cond ((symbolp load) + (condition-case cause (require load) + (error + (info-xref-output "Symbol `%s': cannot require '%s: %s\n" + symbol load cause)))) + ;; skip if previously loaded + ((assoc load load-history)) + ((assoc (locate-library load) load-history)) + (t + (condition-case cause (load load) + (error + (info-xref-output "Symbol `%s': cannot load \"%s\": %s\n" + symbol load cause))))))))) + + ;; Don't bother to check whether the info file exists as opposed to just + ;; a missing node. If you have the lisp then you should have the + ;; documentation, so missing node name will be the usual fault. + ;; + (info-xref-output "\nChecking custom-links references ...\n") + (let ((good 0) + (bad 0)) + (mapatoms + (lambda (symbol) + (dolist (link (get symbol 'custom-links)) + (when (memq (car link) '(custom-manual info-link)) + (if (info-xref-goto-node-p (cadr link)) + (setq good (1+ good)) + (setq bad (1+ bad)) + (info-xref-output "Symbol `%s' (in %s): cannot goto node: %s\n" + symbol (symbol-file symbol) (cadr link))))))) + (info-xref-output "%d good, %d bad\n" good bad)))) + (provide 'info-xref) ;;; arch-tag: 69d4d528-69ed-4cc2-8eb4-c666a0c1d5ac --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel --=-=-=--