]> git.eshelyaron.com Git - emacs.git/commitdiff
(Man-set-fonts): Don't look for another char after
authorRichard M. Stallman <rms@gnu.org>
Wed, 21 Jul 1993 09:05:18 +0000 (09:05 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 21 Jul 1993 09:05:18 +0000 (09:05 +0000)
the backspace; instead look for a sequence CHAR BS CHAR BS CHAR BS...
Delete all the CHAR BS pairs found, after making the text property.

lisp/man.el

index cca12f51dc8b3e33f79deb3ac11913e0bb5f65a6..f01265cab458b79bf8d9bd03aa91ac8ad3f6db94 100644 (file)
@@ -460,14 +460,14 @@ See the variable `Man-notify' for the different notification behaviors."
 
 (defun Man-set-fonts ()
   (goto-char (point-min))
-  (while (re-search-forward "\\(.\b.\\)+" nil t)
+  (while (re-search-forward "\\(.\b\\)+" nil t)
     (let ((st (match-beginning 0)) (en (match-end 0)))
       (goto-char st)
       (if window-system
-         (put-text-property st en 'face 
+         (put-text-property st (if (= en (point-max)) en (1+ en)) 'face 
                             (if (looking-at "_") 'underline 'bold)))
       (while (and (< (point) en) (looking-at ".\b"))
-       (replace-match "") (forward-char 1)))))
+       (replace-match "")))))
 
 (defun Man-bgproc-sentinel (process msg)
   "Manpage background process sentinel."