GNU bug report logs - #36247
[PATCH] Handle 'code' tag in shr.el

Previous Next

Package: emacs;

Reported by: Nicholas Drozd <nicholasdrozd <at> gmail.com>

Date: Sun, 16 Jun 2019 15:13:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Nicholas Drozd <nicholasdrozd <at> gmail.com>
To: 36247 <at> debbugs.gnu.org
Subject: bug#36247: [PATCH] Handle 'code' tag in shr.el
Date: Sun, 16 Jun 2019 10:11:37 -0500
* lisp/net/shr.el: Add 'code' tag handling.

* etc/NEWS: Announce change in shr behavior.
---
 etc/NEWS        | 2 ++
 lisp/net/shr.el | 6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/etc/NEWS b/etc/NEWS
index 723f0a0fb0..5b1191467a 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -916,6 +916,8 @@ This attribute is meant to tell screen readers to
ignore a tag.
 ---
 *** 'shr-tag-ol' now respects the ordered list 'start' attribute.

+*** 'code' tag is now handled.
+
 ** Htmlfontify

 *** The functions 'hfy-color', 'hfy-color-vals' and
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index a014c56948..7fdb3212d4 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1401,10 +1401,14 @@ shr-tag-strong
 (defun shr-tag-u (dom)
   (shr-fontize-dom dom 'underline))

-(defun shr-tag-tt (dom)
+(defun shr-tag-code (dom)
   (let ((shr-current-font 'default))
     (shr-generic dom)))

+(defun shr-tag-tt (dom)
+  ;; The `tt' tag is deprecated in favor of `code'.
+  (shr-tag-code dom))
+
 (defun shr-tag-ins (cont)
   (let* ((start (point))
          (color "green")




This bug report was last modified 5 years and 328 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.