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

Re: [w3m-dev-en 00782] Re: w3m 0.3.2 release candidate 1



At Sat, 26 Oct 2002 19:59:50 +0900,
Fumitoshi UKAI wrote:

> > > If you didn't build without image (#undef USE_IMAGE), w3m options
> > > doesn't contain the string "image", then emacs-w3m will
> > > automatically detect to set w3m-treat-image-size to nil unless you
> > > specify it explicitly.  What version of emacs-w3m are you using?
> > 
> > w3m-user-agent's value is 
> > "Emacs-w3m/1.3.78 w3m/0.3.2rc1"
> > 
> > i know about the "image" and the w3m-treat-image-size variable.  but
> > when "image" isn't found in w3m's options string, it gets called with
> > the option display_image=off.  rc1 doesn't recognize this option!
> 
> Ah, I understand.
> 
> This is because w3m doesn't have display_image options when USE_IMAGE
> is disabled.  I won't keep this as backward compatibilities, so I'd like
> to change code in emacs-w3m.

Sorry, I changed my mind :-)
I seems that it's easy to fix w3m than emacs-w3m.

Index: fm.h
===================================================================
RCS file: /cvsroot/w3m/w3m/fm.h,v
retrieving revision 1.65
diff -u -u -p -r1.65 fm.h
--- fm.h	26 Oct 2002 08:10:43 -0000	1.65
+++ fm.h	26 Oct 2002 11:13:09 -0000
@@ -828,6 +828,8 @@ global int displayImage init(TRUE);
 global int autoImage init(TRUE);
 global int useExtImageViewer init(TRUE);
 global int maxLoadImage init(4);
+#else
+global int displayImage init(FALSE); /* XXX: emacs-w3m use display_image=off */
 #endif
 global char *Editor init(DEF_EDITOR);
 #ifdef USE_W3MMAILER
Index: rc.c
===================================================================
RCS file: /cvsroot/w3m/w3m/rc.c,v
retrieving revision 1.51
diff -u -u -p -r1.51 rc.c
--- rc.c	26 Oct 2002 08:10:43 -0000	1.51
+++ rc.c	26 Oct 2002 11:13:10 -0000
@@ -467,7 +467,7 @@ struct param_ptr params1[] = {
     {"target_self", P_CHARINT, PI_ONOFF, (void *)&TargetSelf, CMT_TSELF, NULL},
     {"display_link", P_INT, PI_ONOFF, (void *)&displayLink, CMT_DISPLINK,
      NULL},
-    {"display_lineinfo", P_INT, PI_ONOFF, (void *)&displayLineInfo, 
+    {"display_lineinfo", P_INT, PI_ONOFF, (void *)&displayLineInfo,
      CMT_DISPLINEINFO, NULL},
     {"ext_dirlist", P_INT, PI_ONOFF, (void *)&UseExternalDirBuffer,
      CMT_EXT_DIRLIST, NULL},
@@ -488,9 +488,10 @@ struct param_ptr params1[] = {
      CMT_IGNORE_NULL_IMG_ALT, NULL},
     {"view_unseenobject", P_INT, PI_ONOFF, (void *)&view_unseenobject,
      CMT_VIEW_UNSEENOBJECTS, NULL},
-#ifdef USE_IMAGE
+    /* XXX: emacs-w3m force to off display_image even if image options off */
     {"display_image", P_INT, PI_ONOFF, (void *)&displayImage, CMT_DISP_IMAGE,
      NULL},
+#ifdef USE_IMAGE
     {"auto_image", P_INT, PI_ONOFF, (void *)&autoImage, CMT_AUTO_IMAGE, NULL},
     {"max_load_image", P_INT, PI_TEXT, (void *)&maxLoadImage,
      CMT_MAX_LOAD_IMAGE, NULL},
@@ -1237,6 +1238,8 @@ sync_with_option(void)
 #ifdef USE_IMAGE
     if (fmInitialized && displayImage)
 	initImage();
+#else
+    displayImage = FALSE;	/* XXX */
 #endif
     loadPasswd();
 
Regards,
Fumitoshi UKAI