aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/info.el
diff options
context:
space:
mode:
authorKarl Heuer <[email protected]>1995-09-25 18:58:51 +0000
committerKarl Heuer <[email protected]>1995-09-25 18:58:51 +0000
commit98d8273c2ce8ee6f4532f5c084bd808cdb7266de (patch)
tree04a25a21e2496ea7ce3a141d4aca57bc5b00ae7c /lisp/info.el
parent79873d50275464f73d765659072c51cf205cf96e (diff)
(Info-title-face-alist): New var.
(Info-fontify-node): Check for headings that are `underlined' with characters on the following line.
Diffstat (limited to 'lisp/info.el')
-rw-r--r--lisp/info.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 2b8aa56034..8c3e591c65 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1745,6 +1745,13 @@ the variable `Info-file-list-for-emacs'."
(t
(Info-goto-emacs-command-node command)))))
+(defvar Info-title-face-alist
+ '((?* bold underline)
+ (?= bold-italic underline)
+ (?- italic underline))
+ "*Alist of face or list of faces to use for pseudo-underlined titles.
+The alist key is the character the title is underlined with (?*, ?= or ?-).")
+
(defun Info-fontify-node ()
(save-excursion
(let ((buffer-read-only nil))
@@ -1760,6 +1767,14 @@ the variable `Info-file-list-for-emacs'."
(put-text-property (match-beginning 1) (match-end 1)
'mouse-face 'highlight))))
(goto-char (point-min))
+ (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*+\\|=+\\|-+\\)$"
+ nil t)
+ (put-text-property (match-beginning 1) (match-end 1)
+ 'face
+ (assq (preceding-char) Info-title-face-alist))
+ (put-text-property (match-end 1) (match-end 2)
+ 'invisible t))
+ (goto-char (point-min))
(while (re-search-forward "\\*Note[ \n\t]+\\([^:]*\\):" nil t)
(if (= (char-after (1- (match-beginning 0))) ?\") ; hack
nil