all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Ryde <user42@zip.com.au>
To: Juri Linkov <juri@jurta.org>
Cc: 6224@debbugs.gnu.org
Subject: bug#6224: 23.1; last-command docstring "multiple displays" info node link
Date: Thu, 20 May 2010 10:32:45 +1000	[thread overview]
Message-ID: <87zkzvtnte.fsf@blah.blah> (raw)
In-Reply-To: <87aarv778e.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 20 May 2010 03:21:51 +0300")

Juri Linkov <juri@jurta.org> writes:
>
> BTW, do you have a command that automatically checks for broken links
> in docstrings?

:-)  I threw down a couple of lines the other day

(defun my-emacs-info-xref-docstrings (filename-list)
  (require 'info-xref)
  (require 'lisp-mnt)
  (require 'help-mode)
  (dolist (filename filename-list)
    (lm-with-file filename
      (goto-char (point-min))
      (while (re-search-forward help-xref-info-regexp nil t)
        (let ((match (match-string 0))
              (node  (match-string 2)))
          (save-match-data ;; for the while loop
            (unless (string-match "\\`(" node)
              (setq node (concat "(emacs)" node)))
            (setq match (replace-regexp-in-string "\n" " " match))
            (setq node (replace-regexp-in-string "\n" " " node))
            (unless (or (string-match "%" node)
                        (info-xref-goto-node-p node))
              (lwarn 'emacs-info-xref-docstrings 'warning
                     "\n  %s:\n  no such node: %S"
                     filename match))))))))


to be used as say

(my-emacs-info-xref-docstrings (file-expand-wildcards "/down/emacs/src/*.c"))

or on your whole load-path

(progn
  (kill-buffer (get-buffer-create "*Warnings*"))
  (require 'cl)
  (dolist (dir load-path)
    (let ((lst (file-expand-wildcards (concat dir "/*.elc"))))
      (dolist (el (file-expand-wildcards (concat dir "/*.el")))
        (setq lst (remove (concat el "c") lst))
        (push el lst))
      (my-emacs-info-xref-docstrings lst))))

It picked up a typo in one of my own files.  I'm thinking of working it
up into a presentable form and adding to my info-xref.el (which is in
emacs).

I started with mapatoms and getting each `documentation', but a grep
through the .el doesn't load up lots of strings and can be applied to
packages without loading them.





  reply	other threads:[~2010-05-20  0:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19 23:39 bug#6224: 23.1; last-command docstring "multiple displays" info node link Kevin Ryde
2010-05-20  0:21 ` Juri Linkov
2010-05-20  0:32   ` Kevin Ryde [this message]
2010-05-20  0:35     ` Kevin Ryde
2010-05-20  0:55       ` Kevin Ryde
2010-05-20 14:49         ` Chong Yidong
2010-05-20  0:46     ` Juri Linkov
2010-05-20  1:06       ` Kevin Ryde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zkzvtnte.fsf@blah.blah \
    --to=user42@zip.com.au \
    --cc=6224@debbugs.gnu.org \
    --cc=juri@jurta.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.