aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-05-19 14:49:25 +0000
committerRichard M. Stallman2003-05-19 14:49:25 +0000
commit3e61755b3d4a53d00c2b5d50ed6df21018e0eda3 (patch)
tree62dada74446c8a136993ae0ab4291920483fcdb4
parentcb4f3fc8a86eec1ea0fef06963b71c9cbe43fdbb (diff)
downloademacs-3e61755b3d4a53d00c2b5d50ed6df21018e0eda3.tar.gz
emacs-3e61755b3d4a53d00c2b5d50ed6df21018e0eda3.zip
(goto-address-fontify-maximum-size): Value t means no limit.
(goto-address-fontify): Implement that feature.
-rw-r--r--lisp/net/goto-addr.el8
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."
93 :group 'goto-address) 93 :group 'goto-address)
94 94
95(defcustom goto-address-fontify-maximum-size 30000 95(defcustom goto-address-fontify-maximum-size 30000
96 "*Maximum size of file in which to fontify and/or highlight URLs." 96 "*Maximum size of file in which to fontify and/or highlight URLs.
97 :type 'integer 97A value of t means there is no limit--fontify regardless of the size."
98 :type '(choice (integer :tag "Maximum size") (const :tag "No limit" t))
98 :group 'goto-address) 99 :group 'goto-address)
99 100
100(defvar goto-address-mail-regexp 101(defvar goto-address-mail-regexp
@@ -155,7 +156,8 @@ and `goto-address-fontify-p'."
155 (save-excursion 156 (save-excursion
156 (let ((inhibit-point-motion-hooks t)) 157 (let ((inhibit-point-motion-hooks t))
157 (goto-char (point-min)) 158 (goto-char (point-min))
158 (if (< (- (point-max) (point)) goto-address-fontify-maximum-size) 159 (if (or (eq t goto-address-fontify-maximum-size)
160 (< (- (point-max) (point)) goto-address-fontify-maximum-size))
159 (progn 161 (progn
160 (while (re-search-forward goto-address-url-regexp nil t) 162 (while (re-search-forward goto-address-url-regexp nil t)
161 (let* ((s (match-beginning 0)) 163 (let* ((s (match-beginning 0))