From a8b883c2c83988072f8d67d1fac53c3f92952461 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 20 Oct 2000 02:58:00 +0000 Subject: [PATCH] (Info-fontify-node): Add support for @subsubsection titles, which use `Info-title-4-face'. (Info-title-4-face): New face. (Info-title-3-face): Inherit from Info-title-4-face instead of variable-pitch. --- lisp/ChangeLog | 8 ++++++++ lisp/info.el | 13 ++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9c83f1f0eb6..a31de5e7d6f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2000-10-20 Miles Bader + + * info.el (Info-fontify-node): Add support for @subsubsection + titles, which use `Info-title-4-face'. + (Info-title-4-face): New face. + (Info-title-3-face): Inherit from Info-title-4-face instead of + variable-pitch. + 2000-10-19 Jason Rumney * dired.el (dired-insert-directory): Do not let errors signalled by diff --git a/lisp/info.el b/lisp/info.el index 5817e6face1..fb228dd4372 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -2373,10 +2373,16 @@ the variable `Info-file-list-for-emacs'." (defface Info-title-3-face '((((type tty pc) (class color)) (:weight bold)) - (t (:height 1.2 :weight bold :inherit variable-pitch))) + (t (:height 1.2 :inherit Info-title-4-face))) "Face for Info titles at level 3." :group 'info) +(defface Info-title-4-face + '((((type tty pc) (class color)) (:weight bold)) + (t (:weight bold :inherit variable-pitch))) + "Face for Info titles at level 4." + :group 'info) + (defun Info-fontify-node () (save-excursion (let ((buffer-read-only nil) @@ -2408,13 +2414,14 @@ the variable `Info-file-list-for-emacs'." (put-text-property tbeg nend 'local-map keymap)))) )))) (goto-char (point-min)) - (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*+\\|=+\\|-+\\)$" + (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*+\\|=+\\|-+\\|\\.+\\)$" nil t) (let ((c (preceding-char)) face) (cond ((= c ?*) (setq face 'Info-title-1-face)) ((= c ?=) (setq face 'Info-title-2-face)) - (t (setq face 'Info-title-3-face))) + ((= c ?-) (setq face 'Info-title-3-face)) + (t (setq face 'Info-title-4-face))) (put-text-property (match-beginning 1) (match-end 1) 'face face)) ;; This is a serious problem for trying to handle multiple -- 2.39.5