* bug#41031: Add facemenu-set-strong and facemenu-set-emphasis
@ 2020-05-02 18:50 積丹尼 Dan Jacobson
2020-05-03 22:44 ` Stefan Kangas
0 siblings, 1 reply; 5+ messages in thread
From: 積丹尼 Dan Jacobson @ 2020-05-02 18:50 UTC (permalink / raw)
To: 41031; +Cc: boris
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.
(Sure, facemenu may have nothing to do with html(-mode). All I know is
that it does insert <b>, so should also insert <strong>.)
emacs-version "26.3"
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#41031: Add facemenu-set-strong and facemenu-set-emphasis
2020-05-02 18:50 bug#41031: Add facemenu-set-strong and facemenu-set-emphasis 積丹尼 Dan Jacobson
@ 2020-05-03 22:44 ` Stefan Kangas
2020-05-04 1:04 ` 積丹尼 Dan Jacobson
2020-05-04 1:10 ` 積丹尼 Dan Jacobson
0 siblings, 2 replies; 5+ messages in thread
From: Stefan Kangas @ 2020-05-03 22:44 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: boris, 41031
[-- 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-06 1:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-02 18:50 bug#41031: Add facemenu-set-strong and facemenu-set-emphasis 積丹尼 Dan Jacobson
2020-05-03 22:44 ` Stefan Kangas
2020-05-04 1:04 ` 積丹尼 Dan Jacobson
2020-05-06 1:32 ` Stefan Kangas
2020-05-04 1:10 ` 積丹尼 Dan Jacobson
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.