unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: daniel@bigwalter.net (Daniel Jensen)
To: emacs-devel@gnu.org
Subject: apropos-library: Check for null library in load-history
Date: Wed, 11 Feb 2009 23:16:43 +0100	[thread overview]
Message-ID: <87r624wrec.fsf@orme.bigwalter.net> (raw)

apropos-library does not handle a null library name in load-history
correctly. This patch fixes the problem.

--- emacs/lisp/apropos.el       2009-01-05 04:18:41.000000000 +0100
+++ emacs-mod/lisp/apropos.el   2009-02-11 22:58:19.000000000 +0100
@@ -573,11 +573,12 @@
           (nconc (delq nil
                        (mapcar
                         (lambda (l)
-                          (setq l (file-name-nondirectory l))
-                          (while
-                              (not (equal (setq l (file-name-sans-extension l))
-                                          l)))
-                          l)
+                          (when (stringp l)
+                            (setq l (file-name-nondirectory l))
+                            (while
+                                (not (equal (setq l (file-name-sans-extension l))
+                                            l)))
+                            l))
                         (mapcar 'car load-history)))
                  (mapcar 'car load-history))))
      (list (completing-read "Describe library: " libs nil t))))





             reply	other threads:[~2009-02-11 22:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-11 22:16 Daniel Jensen [this message]
2009-02-11 22:47 ` apropos-library: Check for null library in load-history Daniel Jensen
2009-02-15 22:01   ` Daniel Jensen
2009-02-20  6:04     ` Glenn Morris

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87r624wrec.fsf@orme.bigwalter.net \
    --to=daniel@bigwalter.net \
    --cc=emacs-devel@gnu.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).