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

Re: links with images in them look just like plain links



jidanni@xxxxxxxxxxx writes:

> Gentlemen, it disturbs me that with images turned off, the only way to
> distinguish between a hyperlink, and a hyperlink with an image in it,
> is to use "}" (w3m-next-image), as they just look the same blue color.

I agree. I think adding new face named "w3m-image-anchor" is reasonable.

Anyway, I wrote a patch to change background color of such
anchors. Could you try it?

Regards,
Index: w3m.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m.el,v
retrieving revision 1.1403
diff -u -r1.1403 w3m.el
--- w3m.el	9 Jan 2009 08:32:27 -0000	1.1403
+++ w3m.el	9 Jan 2009 17:51:25 -0000
@@ -909,6 +909,15 @@
 ;; backward-compatibility alias
 (put 'w3m-image-face 'face-alias 'w3m-image)
 
+(defface w3m-image-anchor
+  '((((class color) (background light)) (:background "light yellow"))
+    (((class color) (background dark)) (:background "dark green"))
+    (t (:underline t)))
+  "Face used for displaying alternate strings of images."
+  :group 'w3m-face)
+;; backward-compatibility alias
+(put 'w3m-image-face 'face-alias 'w3m-image)
+
 (defface w3m-history-current-url
   ;; The following strange code compounds the attributes of the
   ;; `secondary-selection' face and the `w3m-arrived-anchor' face,
@@ -3578,13 +3587,15 @@
 					 'w3m-image-usemap usemap
 					 'w3m-image-status 'off
 					 'w3m-image-redundant upper))
-	  (unless (or (w3m-anchor start)
-		      (w3m-action start))
-	    ;; No need to use `w3m-add-text-properties' here.
-	    (w3m-add-face-property start end 'w3m-image)
-	    (add-text-properties start end (list 'mouse-face 'highlight
-						 'help-echo help
-						 'balloon-help balloon))))))))
+	   (unless (w3m-action start)
+	     ;; No need to use `w3m-add-text-properties' here.
+	     (w3m-add-face-property start end 
+				    (if (w3m-anchor start)
+					'w3m-image-anchor
+				      'w3m-image))
+	     (add-text-properties start end (list 'mouse-face 'highlight
+						  'help-echo help
+						  'balloon-help balloon))))))))
 
 (defsubst w3m-toggle-inline-images-internal (status
 					     &optional no-cache url