changeset 25173:cf6d2213e0a7

(Man-softhyphen-to-minus): Fix for multibyte case, do nothing in Latin-N environment.
author Dave Love <fx@gnu.org>
date Wed, 04 Aug 1999 19:00:57 +0000
parents 5a57e11d78c9
children caaa177b2390
files lisp/man.el
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/man.el	Wed Aug 04 18:55:22 1999 +0000
+++ b/lisp/man.el	Wed Aug 04 19:00:57 1999 +0000
@@ -661,12 +661,12 @@
 
 (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.