From 0f5984d9cdc87ff2ccefcaeeff4b93798ab337cd Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Mon, 6 Mar 2006 17:26:55 +0000 Subject: [PATCH] * gmm-utils.el (gmm-image-load-path-for-library): Return single directory if path is t. --- lisp/ChangeLog | 3 +++ lisp/gmm-utils.el | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d7b5e5333..39ac7b9c2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2006-03-06 Reiner Steib + * gmm-utils.el (gmm-image-load-path-for-library): Return single + directory if path is t. + * gnus-group.el (gnus-group-make-tool-bar): Use add-hook. Suggested by Stefan Monnier . diff --git a/lisp/gmm-utils.el b/lisp/gmm-utils.el index 32fbfea26..e1c02078c 100644 --- a/lisp/gmm-utils.el +++ b/lisp/gmm-utils.el @@ -307,8 +307,9 @@ Images for LIBRARY are searched for in \"../../etc/images\" and well as in `image-load-path' and `load-path'. This function returns the value of `load-path' augmented with the -path to IMAGE. If PATH is given, it is used instead of -`load-path'. +path to IMAGE. If PATH is given, it is used instead of +`load-path'. If PATH is t, return a single image directory +instead of a path. Here is an example that uses a common idiom to provide compatibility with versions of Emacs that lack the variable @@ -366,8 +367,10 @@ This function is used by Emacs versions that don't have (error "Could not find image %s for library %s" image library))) ;; Return augmented `image-load-path' or `load-path'. - (cond ((and path (symbolp path)) - (nconc (list image-directory) + (cond ((eq path t) + image-directory) + ((and path (symbolp path)) + (nconc (list image-directory) (delete image-directory (if (boundp path) (copy-sequence (symbol-value path)) -- 2.25.1