X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/f036e167feaf875873636972b28a4adc12c32254..5c0fbcfc8aa6ee13fbd4ea1516f25c804bebcf8c:/lisp/info.el diff --git a/lisp/info.el b/lisp/info.el index 405d6a2244..2a8ba9064b 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -138,10 +138,15 @@ The Lisp code is executed when the node is selected.") :type 'boolean :group 'info) -(defcustom Info-fontify-maximum-menu-size 100000 +;; It's unfortunate that nil means no fontification, as opposed to no limit, +;; since that differs from font-lock-maximum-size. +(defcustom Info-fontify-maximum-menu-size 400000 "Maximum size of menu to fontify if `font-lock-mode' is non-nil. -Set to nil to disable node fontification." - :type 'integer +Set to nil to disable node fontification; set to t for no limit." + :type '(choice (const :tag "No fontification" nil) + (const :tag "No size limit" t) + (integer :tag "Up to this many characters")) + :version "25.1" ; 100k -> 400k :group 'info) (defcustom Info-use-header-line t @@ -774,8 +779,7 @@ with the top-level Info directory. In interactive use, a non-numeric prefix argument directs this command to read a file name from the minibuffer. -A numeric prefix argument N selects an Info buffer named -\"*info*<%s>\". +A numeric prefix argument of N selects an Info buffer named \"*info*\". The search path for Info files is in the variable `Info-directory-list'. The top-level Info directory is made by combining all the files named `dir' @@ -4009,6 +4013,7 @@ If FORK is non-nil, it is passed to `Info-goto-node'." (define-key map "," 'Info-index-next) (define-key map "\177" 'Info-scroll-down) (define-key map [mouse-2] 'Info-mouse-follow-nearest-node) + (define-key map [down-mouse-2] 'ignore) ;Override potential global binding. (define-key map [follow-link] 'mouse-face) (define-key map [XF86Back] 'Info-history-back) (define-key map [XF86Forward] 'Info-history-forward) @@ -4605,7 +4610,9 @@ first line or header line, and for breadcrumb links.") (and Info-fontify-visited-nodes ;; Don't take time to refontify visited nodes in huge nodes Info-fontify-maximum-menu-size - (< (- (point-max) (point-min)) Info-fontify-maximum-menu-size))) + (or (eq Info-fontify-maximum-menu-size t) + (< (- (point-max) (point-min)) + Info-fontify-maximum-menu-size)))) rbeg rend) ;; Fontify header line @@ -4862,7 +4869,9 @@ first line or header line, and for breadcrumb links.") (search-forward "\n* Menu:" nil t) ;; Don't take time to annotate huge menus Info-fontify-maximum-menu-size - (< (- (point-max) (point)) Info-fontify-maximum-menu-size)) + (or (eq Info-fontify-maximum-menu-size t) + (< (- (point-max) (point)) + Info-fontify-maximum-menu-size))) (let ((n 0) cont) (while (re-search-forward