From: Dave Love Date: Wed, 4 Aug 1999 19:00:57 +0000 (+0000) Subject: (Man-softhyphen-to-minus): Fix for multibyte case, do X-Git-Tag: emacs-pretest-21.0.90~7268 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2311d6d05dabc47384fcd6aeaff03daf1e014450;p=emacs.git (Man-softhyphen-to-minus): Fix for multibyte case, do nothing in Latin-N environment. --- diff --git a/lisp/man.el b/lisp/man.el index 27860b5c0a2..4bfbeed2ad0 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -661,12 +661,12 @@ See the variable `Man-notify-method' for the different notification behaviors." (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 "-")))) + (unless (eq t (compare-strings "latin-" 0 nil + current-language-environment 0 6 t)) + (goto-char (point-min)) + (while (and (skip-chars-forward "^\255") (not (eobp))) + (delete-char 1) + (insert ?-)))) (defun Man-fontify-manpage () "Convert overstriking and underlining to the correct fonts.