all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Cc: boris@gnu.org, 41031@debbugs.gnu.org
Subject: bug#41031: Add facemenu-set-strong and facemenu-set-emphasis
Date: Mon, 04 May 2020 00:44:58 +0200	[thread overview]
Message-ID: <877dxs1vv9.fsf@stefankangas.se> (raw)
In-Reply-To: <87ees2188r.8.fsf@jidanni.org> ("積丹尼 Dan Jacobson"'s message of "Sun, 03 May 2020 02:50:44 +0800")

[-- Attachment #1: Type: text/plain, Size: 782 bytes --]

tags 41031 + patch
found 41031 28.0.50
thanks

積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:

> Just the other day I was editing an .html file, and noticed
>
> M-o b		facemenu-set-bold
> M-o d		facemenu-set-default
> M-o i		facemenu-set-italic
> M-o l		facemenu-set-bold-italic
> M-o o		facemenu-set-face
> M-o u		facemenu-set-underline
>
> hadn't been updated to also include "strong" and "em",
> which we are now supposed to use in preference to
> "<b>" (bold) and "<i>" (italic), that it currently only inserts.

Indeed, we should probably prefer those tags (even for HTML5).  They
are also more accessible to people on screen readers.

Could you please test the attached patch and see that it resolves the
issue?

Best regards,
Stefan Kangas


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Prefer-strong-and-em-to-b-and-i-in-html-mode.patch --]
[-- Type: text/x-diff, Size: 1490 bytes --]

From 5cc040b8552463db67aede1aa94d716e0a09e76a Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Mon, 4 May 2020 00:35:07 +0200
Subject: [PATCH] Prefer 'strong' and 'em' to 'b' and 'i' in html-mode

* lisp/textmodes/sgml-mode.el (html-face-tag-alist): Prefer inserting
the '<strong>' and '<em>' tags to '<b> and '<i>' in
html-mode.  (Bug#41031)
* lisp/textmodes/sgml-mode.el (html-mode): Update docstring to do the
same.
---
 lisp/textmodes/sgml-mode.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 9b29b844d0..b5ff6a6967 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -1852,8 +1852,8 @@ html-mode-map
   "Keymap for commands for use in HTML mode.")
 
 (defvar html-face-tag-alist
-  '((bold . "b")
-    (italic . "i")
+  '((bold . "strong")
+    (italic . "em")
     (underline . "u")
     (mode-line . "rev"))
   "Value of `sgml-face-tag-alist' for HTML mode.")
@@ -2363,7 +2363,7 @@ html-mode
 
 <p>Paragraphs only need an opening tag.  Line breaks and multiple spaces are
 ignored unless the text is <pre>preformatted.</pre>  Text can be marked as
-<b>bold</b>, <i>italic</i> or <u>underlined</u> using the normal M-o or
+<strong>bold</strong>, <em>italic</em> or <u>underlined</u> using the normal M-o or
 Edit/Text Properties/Face commands.
 
 Pages can have <a name=\"SOMENAME\">named points</a> and can link other points
-- 
2.26.2


  reply	other threads:[~2020-05-03 22:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-02 18:50 bug#41031: Add facemenu-set-strong and facemenu-set-emphasis 積丹尼 Dan Jacobson
2020-05-03 22:44 ` Stefan Kangas [this message]
2020-05-04  1:04   ` 積丹尼 Dan Jacobson
2020-05-06  1:32     ` Stefan Kangas
2020-05-04  1:10   ` 積丹尼 Dan Jacobson

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=877dxs1vv9.fsf@stefankangas.se \
    --to=stefan@marxist.se \
    --cc=41031@debbugs.gnu.org \
    --cc=boris@gnu.org \
    --cc=jidanni@jidanni.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.