From: Nicholas Drozd <nicholasdrozd@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 36247@debbugs.gnu.org
Subject: bug#36247: [PATCH] Handle 'code' tag in shr.el
Date: Sat, 22 Jun 2019 12:06:24 -0500 [thread overview]
Message-ID: <CABAiW0oAR6WSJhPtgujYvO+-ZTqmCEkiSxEY-u4yf5GXqpZ6gw@mail.gmail.com> (raw)
In-Reply-To: <m3fto1hmey.fsf@gnus.org>
[-- 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
next prev parent reply other threads:[~2019-06-22 17:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2019-06-23 12:20 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABAiW0oAR6WSJhPtgujYvO+-ZTqmCEkiSxEY-u4yf5GXqpZ6gw@mail.gmail.com \
--to=nicholasdrozd@gmail.com \
--cc=36247@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.