bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#16537: [PATCH] Use the title attribute for the tooltip, rather than


From: Adam Sjøgren
Subject: bug#16537: [PATCH] Use the title attribute for the tooltip, rather than the alt attribute.
Date: Fri, 24 Jan 2014 19:40:09 +0100
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

---
 lisp/net/shr.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 7ef49ea..2e67b07 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1177,6 +1177,7 @@ The preference is a float determined from 
`shr-prefer-media-type'."
               (not (eq shr-state 'image)))
       (insert "\n"))
     (let ((alt (cdr (assq :alt cont)))
+          (title (cdr (assq :title cont)))
          (url (shr-expand-url (or url (cdr (assq :src cont))))))
       (let ((start (point-marker)))
        (when (zerop (length alt))
@@ -1228,7 +1229,7 @@ The preference is a float determined from 
`shr-prefer-media-type'."
          (put-text-property start (point) 'image-url url)
          (put-text-property start (point) 'image-displayer
                             (shr-image-displayer shr-content-function))
-         (put-text-property start (point) 'help-echo alt))
+         (when title (put-text-property start (point) 'help-echo title)))
        (setq shr-state 'image)))))
 
 (defun shr-tag-pre (cont)
-- 
 "That's 'Doctor Destiny, _sir_' to you."                     Adam Sjøgren
                                                         asjo@koldfront.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]