*** empty log message ***
[gnus] / lisp / messagexmas.el
index c85cbb9..b1ff9c5 100644 (file)
@@ -25,6 +25,8 @@
 
 ;;; Code:
 
+(require 'nnheader)
+
 (defvar message-xmas-dont-activate-region nil
   "If t, don't activate region after yanking.")
 
@@ -48,26 +50,11 @@ If it is non-nil, it must be a toolbar.  The five legal values are
 
 (defun message-xmas-find-glyph-directory (&optional package)
   (setq package (or package "message"))
-  (let ((path load-path)
-       (dir (symbol-value
-             (intern-soft (concat package "-xmas-glyph-directory"))))
-       result)
+  (let ((dir (symbol-value
+             (intern-soft (concat package "-xmas-glyph-directory")))))
     (if (and (stringp dir) (file-directory-p dir))
        dir
-      ;; We try to find the dir by looking at the load path,
-      ;; stripping away the last component and adding "etc/".
-      (while path
-       (if (and (car path)
-                (file-exists-p
-                 (setq dir (concat
-                            (file-name-directory
-                             (directory-file-name (car path)))
-                            "etc/" (or package "message") "/")))
-                (file-directory-p dir))
-           (setq result dir
-                 path nil)
-         (setq path (cdr path))))
-      result)))
+      (nnheader-find-etc-directory package))))
 
 (defun message-xmas-setup-toolbar (bar &optional force package)
   (let ((dir (message-xmas-find-glyph-directory package))