# HG changeset patch # User Kim F. Storm # Date 1054768474 0 # Node ID 43a7f19808e076cad1c53f415911cb5a95678614 # Parent 841075bd874a25fa4f4c79a0a224a82e5bbb8eee (Info-fontify-node): Individually refill menus and paragraphs to preserve menu items and varying indentation. Only color first 9 menu items differently. diff -r 841075bd874a -r 43a7f19808e0 lisp/info.el --- a/lisp/info.el Wed Jun 04 23:13:18 2003 +0000 +++ b/lisp/info.el Wed Jun 04 23:14:34 2003 +0000 @@ -2869,6 +2869,8 @@ (skip-syntax-backward " ") (setq other-tag (cond + ((<= (point) (point-min)) + "See ") ((memq (char-before) '(nil ?\. ?! )) "See ") ((memq (char-before) '( ?\( ?\[ ?\{ ?\, ?\; ?\: )) @@ -2896,15 +2898,23 @@ (push (set-marker (make-marker) start) paragraph-markers))))) - (let ((fill-nobreak-invisible t)) + (let ((fill-nobreak-invisible t) + (fill-individual-varying-indent nil) + (paragraph-start "\f\\|[ \t]*[-*]\\|[ \t]*$") + (paragraph-separate "[ \t]*[-*]\\|[ \t\f]*$") + (adaptive-fill-mode nil)) (goto-char (point-max)) (while paragraph-markers (let ((m (car paragraph-markers))) (setq paragraph-markers (cdr paragraph-markers)) (when (< m (point)) (goto-char m) - (fill-paragraph nil) - (backward-paragraph 1)) + (move-to-left-margin) + (when (zerop (forward-paragraph)) + (let ((end (point)) + (beg (progn (backward-paragraph) (point)))) + (fill-individual-paragraphs beg end nil nil) + (goto-char beg)))) (set-marker m nil)))) (goto-char (point-min)) @@ -2919,7 +2929,7 @@ "\\([ \t]*\\)\\)") nil t) (setq n (1+ n)) - (if (zerop (% n 3)) ; visual aids to help with 1-9 keys + (if (and (<= n 9) (zerop (% n 3))) ; visual aids to help with 1-9 keys (put-text-property (match-beginning 0) (1+ (match-beginning 0)) 'font-lock-face 'info-menu-5))