diff src/glyphs-x.c @ 4226:9b4442ac18c7

[xemacs-hg @ 2007-10-15 09:55:43 by didierv] Fix image specifiers related bugs
author didierv
date Mon, 15 Oct 2007 09:55:50 +0000
parents ad2f4ae9895b
children 8475ff9c49ea
line wrap: on
line diff
--- a/src/glyphs-x.c	Mon Oct 15 06:54:23 2007 +0000
+++ b/src/glyphs-x.c	Mon Oct 15 09:55:50 2007 +0000
@@ -550,16 +550,19 @@
    where the file might be located.  Return a full pathname if found;
    otherwise, return Qnil. */
 
+/* #### FIXME: when Qnil is returned, the caller can't make a difference
+   #### between a non existing X device, an unreadable file, or an actual
+   #### failure to locate the file, so the issued message is really not
+   #### informative. -- dvl */
 static Lisp_Object
 x_locate_pixmap_file (Lisp_Object name)
 {
   /* This function can GC if IN_REDISPLAY is false */
   Display *display;
 
-  /* Check non-absolute pathnames with a directory component relative to
-     the search path; that's the way Xt does it. */
   /* #### Unix-specific */
-  if (string_byte (name, 0) == '/' ||
+  if (string_byte (name, 0) == '~' ||
+      string_byte (name, 0) == '/' ||
       (string_byte (name, 0) == '.' &&
        (string_byte (name, 1) == '/' ||
 	(string_byte (name, 1) == '.' &&
@@ -571,6 +574,8 @@
 	return Qnil;
     }
 
+  /* Check non-absolute pathnames with a directory component relative to
+     the search path; that's the way Xt does it. */
   {
     Lisp_Object defx = get_default_device (Qx);
     if (NILP (defx))