From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78108 Path: news.gmane.org!not-for-mail From: asjo@koldfront.dk (Adam =?utf-8?Q?Sj=C3=B8gren?=) Newsgroups: gmane.emacs.gnus.general Subject: [PATCH] Show title attribute of span elements as mouse over text. Date: Sun, 27 Mar 2011 10:32:09 +0200 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Message-ID: <87sju9arqu.fsf@topper.koldfront.dk> References: <871v1tc82r.fsf@topper.koldfront.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1301214766 17392 80.91.229.12 (27 Mar 2011 08:32:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 27 Mar 2011 08:32:46 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M26419@lists.math.uh.edu Sun Mar 27 10:32:36 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q3lOl-00023A-Eu for ding-account@gmane.org; Sun, 27 Mar 2011 10:32:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Q3lOY-0005jn-Sr; Sun, 27 Mar 2011 03:32:22 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Q3lOX-0005jU-8k for ding@lists.math.uh.edu; Sun, 27 Mar 2011 03:32:21 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1Q3lOW-0008BF-Fm for ding@lists.math.uh.edu; Sun, 27 Mar 2011 03:32:21 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Q3lOV-0007eS-OV for ding@gnus.org; Sun, 27 Mar 2011 10:32:19 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q3lOV-0001yj-Jl for ding@gnus.org; Sun, 27 Mar 2011 10:32:19 +0200 Original-Received: from 2505ds5-by.0.fullrate.dk ([95.166.24.143]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 Mar 2011 10:32:19 +0200 Original-Received: from asjo by 2505ds5-by.0.fullrate.dk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 Mar 2011 10:32:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 32 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 2505ds5-by.0.fullrate.dk Mail-Copies-To: never X-Now-Playing: Letter To Bowie Knife, Garden Ruin (Calexico) X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97,Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:78108 Archived-At: * shr.el (shr-tag-span): New function. --- Here is an attempt at providing it. What do you think? Best regards, Adam lisp/shr.el | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/lisp/shr.el b/lisp/shr.el index 113137a..05b681e 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -896,6 +896,13 @@ ones, in case fg and bg are nil." (shr-indent)) (shr-generic cont)) +(defun shr-tag-span (cont) + (let ((title (cdr (assq :title cont)))) + (shr-generic cont) + (when title + (let ((overlay (make-overlay (or start shr-start) (point)))) + (overlay-put overlay 'help-echo title))))) + (defun shr-tag-h1 (cont) (shr-heading cont 'bold 'underline)) -- 1.7.4.1