Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
a0dd66ef
Commit
a0dd66ef
authored
Jun 15, 2000
by
Eli Zaretskii
Browse files
(woman-man-buffer): Fix bold and underlined CJK
characters, which use series of two ^H characters instead of one.
parent
8d228cb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
lisp/woman.el
lisp/woman.el
+15
-1
No files found.
lisp/woman.el
View file @
a0dd66ef
...
...
@@ -1619,9 +1619,23 @@ Do not call directly!"
(
while
(
re-search-forward
"^[ \t]*\n\\([ \t]*\n\\)+"
nil
t
)
(
replace-match
"\n"
t
t
))
;; CJK characters are underlined by double-sized "__".
;; (Code lifted from man.el, with trivial changes.)
(
if
(
<
(
buffer-size
)
(
position-bytes
(
point-max
)))
;; Multibyte characters exist.
(
progn
(
goto-char
(
point-min
))
(
while
(
search-forward
"__\b\b"
nil
t
)
(
backward-delete-char
4
)
(
woman-set-face
(
point
)
(
1+
(
point
))
'woman-italic-face
))
(
goto-char
(
point-min
))
(
while
(
search-forward
"\b\b__"
nil
t
)
(
backward-delete-char
4
)
(
woman-set-face
(
1-
(
point
))
(
point
)
'woman-italic-face
))))
;; Interpret overprinting to indicate bold face:
(
goto-char
(
point-min
))
(
while
(
re-search-forward
"\\(.\\)\\(\\(\\1\\)+\\)"
nil
t
)
(
while
(
re-search-forward
"\\(.\\)\\(\\(
+
\\1\\)+\\)"
nil
t
)
(
woman-delete-match
2
)
(
woman-set-face
(
1-
(
point
))
(
point
)
'woman-bold-face
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment