2000-11-02 Miles Bader <miles@lsi.nec.co.jp>
+ * info.el (info-menu-header): New face.
+ (Info-fontify-menu-headers): New function.
+ (Info-fontify-node, Info-insert-dir): Call `Info-fontify-menu-headers'.
+
* info.el (Info-insert-dir): Don't include blank lines at
beginning of additional dir files (one is added automatically).
(while buffers
(kill-buffer (car buffers))
(setq buffers (cdr buffers)))
+ (if Info-fontify (Info-fontify-menu-headers))
(goto-char (point-min))
(if problems
(message "Composing main Info directory...problems encountered, see `*Messages*'")
"Face for Info titles at level 4."
:group 'info)
+(defface info-menu-header
+ '((((type tty pc))
+ :underline t
+ :weight bold)
+ (t
+ :inherit variable-pitch
+ :weight bold))
+ "Face for headers in Info menus."
+ :group 'info)
+
+(defun Info-fontify-menu-headers ()
+ "Add the face `info-menu-header' to any header before a menu entry."
+ (save-excursion
+ (goto-char (point-min))
+ (when (re-search-forward "\\* Menu:" nil t)
+ (put-text-property (match-beginning 0) (match-end 0)
+ 'face 'info-menu-header)
+ (while (re-search-forward "\n\n\\([^*\n ].*\\)\n\n?[*]" nil t)
+ (put-text-property (match-beginning 1) (match-end 1)
+ 'face 'info-menu-header)))))
+
(defun Info-fontify-node ()
(save-excursion
(let ((buffer-read-only nil)
'(face info-xref
mouse-face highlight
help-echo "mouse-2: go to this node")))))
+ (Info-fontify-menu-headers)
(set-buffer-modified-p nil))))
\f