Commit 98d8273c authored by Karl Heuer's avatar Karl Heuer
Browse files

(Info-title-face-alist): New var.

(Info-fontify-node): Check for headings that are `underlined' with
characters on the following line.
parent 79873d50
...@@ -1745,6 +1745,13 @@ the variable `Info-file-list-for-emacs'." ...@@ -1745,6 +1745,13 @@ the variable `Info-file-list-for-emacs'."
(t (t
(Info-goto-emacs-command-node command))))) (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 () (defun Info-fontify-node ()
(save-excursion (save-excursion
(let ((buffer-read-only nil)) (let ((buffer-read-only nil))
...@@ -1760,6 +1767,14 @@ the variable `Info-file-list-for-emacs'." ...@@ -1760,6 +1767,14 @@ the variable `Info-file-list-for-emacs'."
(put-text-property (match-beginning 1) (match-end 1) (put-text-property (match-beginning 1) (match-end 1)
'mouse-face 'highlight)))) 'mouse-face 'highlight))))
(goto-char (point-min)) (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) (while (re-search-forward "\\*Note[ \n\t]+\\([^:]*\\):" nil t)
(if (= (char-after (1- (match-beginning 0))) ?\") ; hack (if (= (char-after (1- (match-beginning 0))) ?\") ; hack
nil nil
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment