[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/man.el
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/man.el |
Date: |
Tue, 04 Jan 2005 15:48:39 -0500 |
Index: emacs/lisp/man.el
diff -c emacs/lisp/man.el:1.140 emacs/lisp/man.el:1.141
*** emacs/lisp/man.el:1.140 Fri Dec 3 00:20:39 2004
--- emacs/lisp/man.el Tue Jan 4 20:36:28 2005
***************
*** 822,827 ****
--- 822,828 ----
(goto-char (point-min))
;; Fontify ANSI escapes.
(let ((faces nil)
+ (buffer-undo-list t)
(start (point)))
;; http://www.isthe.com/chongo/tech/comp/ansi_escapes.html
;; suggests many codes, but we only handle:
***************
*** 853,898 ****
(delete-region (match-beginning 0) (match-end 0))
(setq start (point))))
;; Other highlighting.
! (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)
! (put-text-property (point) (1+ (point)) 'face Man-underline-face))
! (goto-char (point-min))
! (while (search-forward "\b\b__" nil t)
! (backward-delete-char 4)
! (put-text-property (1- (point)) (point) 'face Man-underline-face))))
! (goto-char (point-min))
! (while (search-forward "_\b" nil t)
! (backward-delete-char 2)
! (put-text-property (point) (1+ (point)) 'face Man-underline-face))
! (goto-char (point-min))
! (while (search-forward "\b_" nil t)
! (backward-delete-char 2)
! (put-text-property (1- (point)) (point) 'face Man-underline-face))
! (goto-char (point-min))
! (while (re-search-forward "\\(.\\)\\(\b+\\1\\)+" nil t)
! (replace-match "\\1")
! (put-text-property (1- (point)) (point) 'face Man-overstrike-face))
! (goto-char (point-min))
! (while (re-search-forward "o\b\\+\\|\\+\bo" nil t)
! (replace-match "o")
! (put-text-property (1- (point)) (point) 'face 'bold))
! (goto-char (point-min))
! (while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t)
! (replace-match "+")
! (put-text-property (1- (point)) (point) 'face 'bold))
! (goto-char (point-min))
! ;; Try to recognize common forms of cross references.
! (Man-highlight-references)
! (Man-softhyphen-to-minus)
! (goto-char (point-min))
! (while (re-search-forward Man-heading-regexp nil t)
! (put-text-property (match-beginning 0)
! (match-end 0)
! 'face Man-overstrike-face))
(message "%s man page formatted" Man-arguments))
(defun Man-highlight-references ()
--- 854,900 ----
(delete-region (match-beginning 0) (match-end 0))
(setq start (point))))
;; Other highlighting.
! (let ((buffer-undo-list t))
! (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)
! (put-text-property (point) (1+ (point)) 'face Man-underline-face))
! (goto-char (point-min))
! (while (search-forward "\b\b__" nil t)
! (backward-delete-char 4)
! (put-text-property (1- (point)) (point) 'face Man-underline-face))))
! (goto-char (point-min))
! (while (search-forward "_\b" nil t)
! (backward-delete-char 2)
! (put-text-property (point) (1+ (point)) 'face Man-underline-face))
! (goto-char (point-min))
! (while (search-forward "\b_" nil t)
! (backward-delete-char 2)
! (put-text-property (1- (point)) (point) 'face Man-underline-face))
! (goto-char (point-min))
! (while (re-search-forward "\\(.\\)\\(\b+\\1\\)+" nil t)
! (replace-match "\\1")
! (put-text-property (1- (point)) (point) 'face Man-overstrike-face))
! (goto-char (point-min))
! (while (re-search-forward "o\b\\+\\|\\+\bo" nil t)
! (replace-match "o")
! (put-text-property (1- (point)) (point) 'face 'bold))
! (goto-char (point-min))
! (while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t)
! (replace-match "+")
! (put-text-property (1- (point)) (point) 'face 'bold))
! (goto-char (point-min))
! ;; Try to recognize common forms of cross references.
! (Man-highlight-references)
! (Man-softhyphen-to-minus)
! (goto-char (point-min))
! (while (re-search-forward Man-heading-regexp nil t)
! (put-text-property (match-beginning 0)
! (match-end 0)
! 'face Man-overstrike-face)))
(message "%s man page formatted" Man-arguments))
(defun Man-highlight-references ()
- [Emacs-diffs] Changes to emacs/lisp/man.el,
Richard M . Stallman <=