comparison lisp/info.el @ 75750:9d47b3ad340e

(Info-fontify-maximum-menu-size): Document the effect of a nil value. (Info-fontify-node): Make sure Info-fontify-maximum-menu-size is non-nil before using it as size.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 10 Feb 2007 11:10:49 +0000
parents e3694f1cb928
children a05e2047bdb8 52a7f3f50b89
comparison
equal deleted inserted replaced
75749:cb02cf6abcf1 75750:9d47b3ad340e
144 :version "22.1" 144 :version "22.1"
145 :type 'boolean 145 :type 'boolean
146 :group 'info) 146 :group 'info)
147 147
148 (defcustom Info-fontify-maximum-menu-size 1000000 148 (defcustom Info-fontify-maximum-menu-size 1000000
149 "*Maximum size of menu to fontify if `font-lock-mode' is non-nil." 149 "*Maximum size of menu to fontify if `font-lock-mode' is non-nil.
150 Set to nil to disable node fontification."
150 :type 'integer 151 :type 'integer
151 :group 'info) 152 :group 'info)
152 153
153 (defcustom Info-use-header-line t 154 (defcustom Info-use-header-line t
154 "*Non-nil means to put the beginning-of-node links in an Emacs header-line. 155 "*Non-nil means to put the beginning-of-node links in an Emacs header-line.
3703 (not (let ((where (next-property-change (point-min)))) 3704 (not (let ((where (next-property-change (point-min))))
3704 (and where (not (= where (point-max))))))) 3705 (and where (not (= where (point-max)))))))
3705 (fontify-visited-p ; visited nodes need to be re-fontified 3706 (fontify-visited-p ; visited nodes need to be re-fontified
3706 (and Info-fontify-visited-nodes 3707 (and Info-fontify-visited-nodes
3707 ;; Don't take time to refontify visited nodes in huge nodes 3708 ;; Don't take time to refontify visited nodes in huge nodes
3709 Info-fontify-maximum-menu-size
3708 (< (- (point-max) (point-min)) Info-fontify-maximum-menu-size))) 3710 (< (- (point-max) (point-min)) Info-fontify-maximum-menu-size)))
3709 rbeg rend) 3711 rbeg rend)
3710 3712
3711 ;; Fontify header line 3713 ;; Fontify header line
3712 (goto-char (point-min)) 3714 (goto-char (point-min))
3938 ;; Fontify menu items 3940 ;; Fontify menu items
3939 (goto-char (point-min)) 3941 (goto-char (point-min))
3940 (when (and (or not-fontified-p fontify-visited-p) 3942 (when (and (or not-fontified-p fontify-visited-p)
3941 (search-forward "\n* Menu:" nil t) 3943 (search-forward "\n* Menu:" nil t)
3942 ;; Don't take time to annotate huge menus 3944 ;; Don't take time to annotate huge menus
3945 Info-fontify-maximum-menu-size
3943 (< (- (point-max) (point)) Info-fontify-maximum-menu-size)) 3946 (< (- (point-max) (point)) Info-fontify-maximum-menu-size))
3944 (let ((n 0) 3947 (let ((n 0)
3945 cont) 3948 cont)
3946 (while (re-search-forward 3949 (while (re-search-forward
3947 (concat "^\\* Menu:\\|\\(?:^\\* +\\(" Info-menu-entry-name-re "\\)\\(:" 3950 (concat "^\\* Menu:\\|\\(?:^\\* +\\(" Info-menu-entry-name-re "\\)\\(:"