aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/info.el31
1 files changed, 25 insertions, 6 deletions
diff --git a/lisp/info.el b/lisp/info.el
index c2eff14e424..11e60c09c54 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -2221,10 +2221,25 @@ the variable `Info-file-list-for-emacs'."
2221 (t 2221 (t
2222 (Info-goto-emacs-command-node command))))) 2222 (Info-goto-emacs-command-node command)))))
2223 2223
2224(defface Info-title-1-face
2225 '((t (:family "helv" :height 240 :weight bold)))
2226 "Face for Info titles at level 1."
2227 :group 'info)
2228
2229(defface Info-title-2-face
2230 '((t (:family "helv" :height 180 :weight bold)))
2231 "Face for Info titles at level 2."
2232 :group 'info)
2233
2234(defface Info-title-3-face
2235 '((t (:family "helv" :height 160 :weight bold)))
2236 "Face for Info titles at level 3."
2237 :group 'info)
2238
2224(defcustom Info-title-face-alist 2239(defcustom Info-title-face-alist
2225 '((?* bold underline) 2240 '((?* (face (variable-pitch bold) display (height (+ 4))))
2226 (?= bold-italic underline) 2241 (?= (face (variable-pitch bold) display (height (+ 3))))
2227 (?- italic underline)) 2242 (?- (face (variable-pitch bold) display (height (+ 2)))))
2228 "*Alist of face or list of faces to use for pseudo-underlined titles. 2243 "*Alist of face or list of faces to use for pseudo-underlined titles.
2229The alist key is the character the title is underlined with (?*, ?= or ?-)." 2244The alist key is the character the title is underlined with (?*, ?= or ?-)."
2230 :type '(repeat (list character face face)) 2245 :type '(repeat (list character face face))
@@ -2252,9 +2267,13 @@ The alist key is the character the title is underlined with (?*, ?= or ?-)."
2252 (goto-char (point-min)) 2267 (goto-char (point-min))
2253 (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*+\\|=+\\|-+\\)$" 2268 (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*+\\|=+\\|-+\\)$"
2254 nil t) 2269 nil t)
2255 (put-text-property (match-beginning 1) (match-end 1) 2270 (let ((c (preceding-char))
2256 'face 2271 face)
2257 (cdr (assq (preceding-char) Info-title-face-alist))) 2272 (cond ((= c ?*) (setq face 'Info-title-1-face))
2273 ((= c ?=) (setq face 'Info-title-2-face))
2274 (t (setq face 'Info-title-3-face)))
2275 (put-text-property (match-beginning 1) (match-end 1)
2276 'face face))
2258 ;; This is a serious problem for trying to handle multiple 2277 ;; This is a serious problem for trying to handle multiple
2259 ;; frame types at once. We want this text to be invisible 2278 ;; frame types at once. We want this text to be invisible
2260 ;; on frames that can display the font above. 2279 ;; on frames that can display the font above.