diff options
Diffstat (limited to 'lisp/net/goto-addr.el')
-rw-r--r-- | lisp/net/goto-addr.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index 42c4bca8bf8..1449c9bcc38 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el @@ -93,8 +93,9 @@ But only if `goto-address-highlight-p' is also non-nil." :group 'goto-address) (defcustom goto-address-fontify-maximum-size 30000 - "*Maximum size of file in which to fontify and/or highlight URLs." - :type 'integer + "*Maximum size of file in which to fontify and/or highlight URLs. +A value of t means there is no limit--fontify regardless of the size." + :type '(choice (integer :tag "Maximum size") (const :tag "No limit" t)) :group 'goto-address) (defvar goto-address-mail-regexp @@ -155,7 +156,8 @@ and `goto-address-fontify-p'." (save-excursion (let ((inhibit-point-motion-hooks t)) (goto-char (point-min)) - (if (< (- (point-max) (point)) goto-address-fontify-maximum-size) + (if (or (eq t goto-address-fontify-maximum-size) + (< (- (point-max) (point)) goto-address-fontify-maximum-size)) (progn (while (re-search-forward goto-address-url-regexp nil t) (let* ((s (match-beginning 0)) |