# HG changeset patch # User Dave Love # Date 934026306 0 # Node ID abd64c56891f27cc40dfc0dc1c888e2a45d16b8c # Parent d0036b95d7f7d622ab772751eba42b331f724d4a (Man-softhyphen-to-minus): Revert previous change. Avoid unibyte to multibyte conversion of search-forward (from Handa), but avoid the replacement if the language is Latin-N. diff -r d0036b95d7f7 -r abd64c56891f lisp/man.el --- a/lisp/man.el Sat Aug 07 11:31:39 1999 +0000 +++ b/lisp/man.el Sat Aug 07 11:45:06 1999 +0000 @@ -660,13 +660,15 @@ ))) (defun Man-softhyphen-to-minus () - ;; \255 is some kind of dash in Latin-1. - (goto-char (point-min)) - (if enable-multibyte-characters - (while (search-forward "\255" nil t) - (if (= (preceding-char) ?\255) - (replace-match "-"))) - (while (search-forward "\255" nil t) (replace-match "-")))) + ;; \255 is some kind of dash in Latin-N. Versions of Debian man, at + ;; least, emit it even when not in a Latin-N locale. + (unless (eq t (compare-strings "latin-" 0 nil + current-language-environment 0 6 t)) + (goto-char (point-min)) + (let ((str "\255")) + (if enable-multibyte-characters + (setq str (string-as-multibyte str))) + (while (search-forward str nil t) (replace-match "-"))))) (defun Man-fontify-manpage () "Convert overstriking and underlining to the correct fonts.