From: Miles Bader Date: Thu, 2 Nov 2000 02:14:07 +0000 (+0000) Subject: (info-menu-header): New face. X-Git-Tag: emacs-pretest-21.0.90~364 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=973a3104fd5cc71116d29d8e52ba033d43aa7606;p=emacs.git (info-menu-header): New face. (Info-fontify-menu-headers): New function. (Info-fontify-node, Info-insert-dir): Call `Info-fontify-menu-headers'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 358bba3b87e..8467c29b34e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2000-11-02 Miles Bader + * 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). diff --git a/lisp/info.el b/lisp/info.el index e54a579620f..db6b0447464 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -837,6 +837,7 @@ a case-insensitive match is tried." (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*'") @@ -2385,6 +2386,27 @@ the variable `Info-file-list-for-emacs'." "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) @@ -2456,6 +2478,7 @@ the variable `Info-file-list-for-emacs'." '(face info-xref mouse-face highlight help-echo "mouse-2: go to this node"))))) + (Info-fontify-menu-headers) (set-buffer-modified-p nil))))