emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r118082: Allow Info-fontify-maximum-menu-size to spe


From: Glenn Morris
Subject: [Emacs-diffs] trunk r118082: Allow Info-fontify-maximum-menu-size to specify unlimited
Date: Fri, 10 Oct 2014 03:24:50 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 118082
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2014-10-09 20:24:41 -0700
message:
  Allow Info-fontify-maximum-menu-size to specify unlimited
  
  * lisp/info.el (Info-fontify-maximum-menu-size): Fix :type.
  Allow t to mean no limit.
  (Info-fontify-node): Handle Info-fontify-maximum-menu-size = t.
modified:
  etc/NEWS                       news-20141002041645-34n5fasbwydbo8t6-1
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/info.el                   info.el-20091113204419-o5vbwnq5f7feedwu-261
=== modified file 'etc/NEWS'
--- a/etc/NEWS  2014-10-09 01:52:47 +0000
+++ b/etc/NEWS  2014-10-10 03:24:41 +0000
@@ -172,6 +172,9 @@
 ** New ERT function `ert-summarize-tests-batch-and-exit'.
 
 ---
+** `Info-fontify-maximum-menu-size' can be t for no limit.
+
+---
 ** ntlm.el has support for NTLM2.
 
 ---

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-10-10 01:11:24 +0000
+++ b/lisp/ChangeLog    2014-10-10 03:24:41 +0000
@@ -1,6 +1,8 @@
 2014-10-10  Glenn Morris  <address@hidden>
 
        * info.el (Info-fontify-maximum-menu-size): Bump to 400k.  (Bug#16227)
+       Fix :type.  Allow t to mean no limit.
+       (Info-fontify-node): Handle Info-fontify-maximum-menu-size = t.
 
 2014-10-09  Glenn Morris  <address@hidden>
 

=== modified file 'lisp/info.el'
--- a/lisp/info.el      2014-10-10 01:11:24 +0000
+++ b/lisp/info.el      2014-10-10 03:24:41 +0000
@@ -138,10 +138,14 @@
   :type 'boolean
   :group 'info)
 
+;; 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)
 
@@ -4606,7 +4610,9 @@
             (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
@@ -4863,7 +4869,9 @@
                  (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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]