Gnus development mailing list
 help / color / mirror / Atom feed
From: Bill Wohler <wohler@newt.com>
Subject: Re: *image-load-path-for-library update
Date: Sat, 11 Mar 2006 18:00:09 -0800	[thread overview]
Message-ID: <17795.1142128809@olgas.newt.com> (raw)
In-Reply-To: <v9r759usgi.fsf@marauder.physik.uni-ulm.de>

Before I check this in, any comments?

Index: image.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/image.el,v
retrieving revision 1.57
diff -u -u -r1.57 image.el
--- image.el	11 Mar 2006 02:04:08 -0000	1.57
+++ image.el	12 Mar 2006 01:58:14 -0000
@@ -85,21 +86,20 @@
 well as in `image-load-path' and `load-path'.
 
 This function returns the value of `load-path' augmented with the
-directory containing IMAGE. If PATH is given, it is used instead
-of `load-path'. If PATH is t, just return the directory that
-contains IMAGE.
-
-If NO-ERROR is non-nil, return nil if a suitable path can't be
-found rather than signaling an error.
+directory containing IMAGE at the beginning of the list. If PATH
+is given, it is used instead of `load-path'. If PATH is t, just
+return the directory that contains IMAGE.
+
+If NO-ERROR is non-nil and a suitable path can't be found, don't
+signal an error. Instead, return nil if PATH is t or an augmented
+path with nil at the beginning of the list.
 
 Here is an example that uses a common idiom to provide
 compatibility with versions of Emacs that lack the variable
 `image-load-path':
 
-  (let ((load-path
-         (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
-        (image-load-path
-         (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\" 'image-load-path)))
+  (let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
+         (image-load-path (cons (car load-path) image-load-path)))
     (mh-tool-bar-folder-buttons-init))"
   (unless library (error "No library specified"))
   (unless image   (error "No image specified"))
@@ -142,16 +142,14 @@
                        dir (expand-file-name "../" dir)))
                (setq image-directory dir)))))
      (no-error
-      ;; In this case we will return nil.
       (message "Could not find image %s for library %s" image library))
      (t
       (error "Could not find image %s for library %s" image library)))
 
-    ;; Return the directory, nil if no-error was non-nil and a
-    ;; suitable path could not be found, or an augmented
+    ;; Return the directory (or nil if no-error was non-nil and a
+    ;; suitable path could not be found), or an augmented
     ;; `image-load-path' or `load-path'.
-    (cond ((or (null image-directory)
-               (eq path t))
+    (cond ((eq path t)
            image-directory)
           ((and path (symbolp path))
            (nconc (list image-directory)

-- 
Bill Wohler <wohler@newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

  parent reply	other threads:[~2006-03-12  2:00 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-07  0:18 New GNOME icons Bill Wohler
2006-03-10 23:15 ` Bill Wohler
2006-03-10 23:56 ` Reiner Steib
2006-03-11  1:23   ` Bill Wohler
2006-03-11  1:29   ` Miles Bader
2006-03-11 12:48     ` Reiner Steib
2006-03-11  2:12   ` *image-load-path-for-library update Bill Wohler
2006-03-11 11:33     ` Reiner Steib
2006-03-11 22:53       ` Bill Wohler
2006-03-12  1:43       ` Bill Wohler
2006-03-12  2:00       ` Bill Wohler [this message]
2006-03-13 11:52   ` New GNOME icons Katsumi Yamaoka
2006-03-13 16:56     ` Bill Wohler
2006-03-14  5:32       ` Katsumi Yamaoka
2006-03-14  6:43         ` Bill Wohler
2006-03-14 11:57           ` Katsumi Yamaoka
2006-03-14 17:58             ` Bill Wohler
2006-03-15  1:49               ` Katsumi Yamaoka
2006-03-15  7:34                 ` Katsumi Yamaoka
2006-03-15  7:58                   ` Katsumi Yamaoka
2006-03-16  1:41                   ` gmm-image-load-path-for-library redux (was: New GNOME icons) Bill Wohler
2006-03-16  2:04                     ` gmm-image-load-path-for-library redux Katsumi Yamaoka
2006-03-16  7:24                     ` Katsumi Yamaoka
2006-03-16  8:05                       ` Bill Wohler
2006-03-16 17:41                         ` Bill Wohler
2006-03-16  1:39                 ` New GNOME icons Katsumi Yamaoka
2006-03-14 15:16           ` Reiner Steib
2006-03-14 19:29             ` Bill Wohler
2006-03-14 21:00               ` Reiner Steib
2006-03-14 21:35                 ` Bill Wohler
2006-03-15  8:58                   ` Reiner Steib
2006-03-15 12:10                   ` Reiner Steib
2006-03-15 15:42                     ` Bill Wohler
2006-03-15 16:40                       ` defvars at compile time (was: New GNOME icons) Reiner Steib
2006-03-15 16:49                         ` defvars at compile time Bill Wohler

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=17795.1142128809@olgas.newt.com \
    --to=wohler@newt.com \
    /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.
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 NNTP newsgroup(s).