comparison lisp/info.el @ 27536:e640e22d23c8

(Info-title-face-alist): Removed. (Info-title-1-face, Info-title-2-face, Info-title-3-face): New faces. (Info-fontify-node): Use these faces.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 31 Jan 2000 19:46:04 +0000
parents 407a5a4056e8
children e1acd68998c8
comparison
equal deleted inserted replaced
27535:a6edcce8ada3 27536:e640e22d23c8
2219 (Info-goto-emacs-command-node 2219 (Info-goto-emacs-command-node
2220 (read-command "Find documentation for command: "))) 2220 (read-command "Find documentation for command: ")))
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.
2229 The alist key is the character the title is underlined with (?*, ?= or ?-)." 2244 The 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))
2231 :group 'info) 2246 :group 'info)
2232 2247
2250 (put-text-property (match-beginning 2) (match-end 2) 2265 (put-text-property (match-beginning 2) (match-end 2)
2251 'mouse-face 'highlight)))) 2266 'mouse-face 'highlight))))
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.
2261 (if (memq (framep (selected-frame)) '(x pc w32)) 2280 (if (memq (framep (selected-frame)) '(x pc w32))
2262 (put-text-property (match-end 1) (match-end 2) 2281 (put-text-property (match-end 1) (match-end 2)