erc-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Erc-commit] [commit][emacs22] erc-nicklist: Use locate-library to find


From: mwolson
Subject: [Erc-commit] [commit][emacs22] erc-nicklist: Use locate-library to find images dir
Date: Sun, 14 Oct 2007 00:49:01 -0400

commit 8d16a493b1cc369e4299b7202a7b013fd72aac27
Author: Michael Olson <address@hidden>
Date:   Mon May 21 00:45:40 2007 +0000

    erc-nicklist: Use locate-library to find images dir
    
    2007-05-21  Michael Olson  <address@hidden>
    
        * erc-nicklist.el (erc-nicklist-icons-directory): Use
        locate-library to find the "images" directory.  This should be
        more failsafe.  Thanks to Tom Tromey for the idea.
    git-archimport-id: address@hidden/erc--rel--5.2--patch-21

diff --git a/ChangeLog b/ChangeLog
index f628f71..8c304d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,10 @@
        (deb): New rule that chains together the stages in building a
        Debian package.
 
+       * erc-nicklist.el (erc-nicklist-icons-directory): Use
+       locate-library to find the "images" directory.  This should be
+       more failsafe.  Thanks to Tom Tromey for the idea.
+
 2007-05-19  Michael Olson  <address@hidden>
 
        * Makefile (ELPA): New variable that contains the location of my
diff --git a/erc-nicklist.el b/erc-nicklist.el
index f37b8ea..2787fe2 100644
--- a/erc-nicklist.el
+++ b/erc-nicklist.el
@@ -93,7 +93,9 @@ By \"chat medium\", we mean IRC, AOL, MSN, ICQ, etc."
   :type 'boolean)
 
 (defcustom erc-nicklist-icons-directory
-  (concat default-directory "images/")
+  (let ((dir (locate-library "erc-nicklist.el")))
+    (when dir
+      (concat (file-name-directory dir) "images/")))
   "*Directory of the PNG files for chat icons.
 Icons are displayed if `erc-nicklist-use-icons' is non-nil."
   :group 'erc-nicklist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]