* bug#36247: [PATCH] Handle 'code' tag in shr.el
@ 2019-06-16 15:11 Nicholas Drozd
2019-06-22 11:47 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Drozd @ 2019-06-16 15:11 UTC (permalink / raw)
To: 36247
* 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")
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#36247: [PATCH] Handle 'code' tag in shr.el
2019-06-16 15:11 bug#36247: [PATCH] Handle 'code' tag in shr.el Nicholas Drozd
@ 2019-06-22 11:47 ` Lars Ingebrigtsen
2019-06-22 17:06 ` Nicholas Drozd
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-22 11:47 UTC (permalink / raw)
To: Nicholas Drozd; +Cc: 36247
Nicholas Drozd <nicholasdrozd@gmail.com> writes:
> * lisp/net/shr.el: Add 'code' tag handling.
>
> * etc/NEWS: Announce change in shr behavior.
Looks good, but the patch has been mangled by Gmail and doesn't apply.
Can you resend with the patch in an attachment?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#36247: [PATCH] Handle 'code' tag in shr.el
2019-06-22 11:47 ` Lars Ingebrigtsen
@ 2019-06-22 17:06 ` Nicholas Drozd
2019-06-23 12:20 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Drozd @ 2019-06-22 17:06 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 36247
[-- Attachment #1: Type: text/plain, Size: 571 bytes --]
Btw Lars, Eww is one of the "but can your editor do this" features I
use to show off Emacs to non-users.
On Sat, Jun 22, 2019 at 6:47 AM Lars Ingebrigtsen <larsi@gnus.org> wrote:
>
> Nicholas Drozd <nicholasdrozd@gmail.com> writes:
>
> > * lisp/net/shr.el: Add 'code' tag handling.
> >
> > * etc/NEWS: Announce change in shr behavior.
>
> Looks good, but the patch has been mangled by Gmail and doesn't apply.
> Can you resend with the patch in an attachment?
>
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
[-- Attachment #2: 0001-Handle-code-tag-in-shr.el.patch --]
[-- Type: text/x-patch, Size: 1296 bytes --]
From 4895c9a646b3549a84685b22f08eb2aeb028a6a4 Mon Sep 17 00:00:00 2001
From: Nick Drozd <nicholasdrozd@gmail.com>
Date: Sun, 16 Jun 2019 09:41:43 -0500
Subject: [PATCH] Handle 'code' tag in shr.el
* 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")
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#36247: [PATCH] Handle 'code' tag in shr.el
2019-06-22 17:06 ` Nicholas Drozd
@ 2019-06-23 12:20 ` Lars Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-23 12:20 UTC (permalink / raw)
To: Nicholas Drozd; +Cc: 36247
Nicholas Drozd <nicholasdrozd@gmail.com> writes:
> Btw Lars, Eww is one of the "but can your editor do this" features I
> use to show off Emacs to non-users.
:-)
Thanks for the patch; now applied to the trunk.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-23 12:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-16 15:11 bug#36247: [PATCH] Handle 'code' tag in shr.el Nicholas Drozd
2019-06-22 11:47 ` Lars Ingebrigtsen
2019-06-22 17:06 ` Nicholas Drozd
2019-06-23 12:20 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).