diff options
| author | Dave Love | 2000-06-15 11:43:01 +0000 |
|---|---|---|
| committer | Dave Love | 2000-06-15 11:43:01 +0000 |
| commit | 28223a7ebc34af3c5b03fcd4b907cf426da2b469 (patch) | |
| tree | 94ead0311a442843ffa332df307555fdeca4ed7c | |
| parent | 8a33cf7b2129899072050b94c9dd8ee2d95c79ea (diff) | |
| download | emacs-28223a7ebc34af3c5b03fcd4b907cf426da2b469.tar.gz emacs-28223a7ebc34af3c5b03fcd4b907cf426da2b469.zip | |
(goto-address-fontify): Use keymap property, not local-map.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/net/goto-addr.el | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6e8b424cbf1..a864949c18f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2000-06-15 Dave Love <fx@gnu.org> | ||
| 2 | |||
| 3 | * net/goto-addr.el (goto-address-fontify): Use keymap property, | ||
| 4 | not local-map. | ||
| 5 | |||
| 1 | 2000-06-15 Kenichi Handa <handa@etl.go.jp> | 6 | 2000-06-15 Kenichi Handa <handa@etl.go.jp> |
| 2 | 7 | ||
| 3 | * international/mule.el (set-buffer-file-coding-system): Almost | 8 | * international/mule.el (set-buffer-file-coding-system): Almost |
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index d5da380f2e5..667439710c5 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | ;; | 39 | ;; |
| 40 | ;; (add-hook 'mh-show-mode-hook 'goto-address) | 40 | ;; (add-hook 'mh-show-mode-hook 'goto-address) |
| 41 | ;; | 41 | ;; |
| 42 | ;; The mouse click method is bound to [mouse-2] on highlighted URL's or | 42 | ;; The mouse click method is bound to [mouse-2] on highlighted URLs or |
| 43 | ;; e-mail addresses only; it functions normally everywhere else. To bind | 43 | ;; e-mail addresses only; it functions normally everywhere else. To bind |
| 44 | ;; another mouse click to the function, add the following to your .emacs | 44 | ;; another mouse click to the function, add the following to your .emacs |
| 45 | ;; (for example): | 45 | ;; (for example): |
| @@ -75,18 +75,18 @@ | |||
| 75 | 75 | ||
| 76 | ;;; I don't expect users to want fontify'ing without highlighting. | 76 | ;;; I don't expect users to want fontify'ing without highlighting. |
| 77 | (defcustom goto-address-fontify-p t | 77 | (defcustom goto-address-fontify-p t |
| 78 | "*If t, URL's and e-mail addresses in buffer are fontified. | 78 | "*If t, URLs and e-mail addresses in buffer are fontified. |
| 79 | But only if `goto-address-highlight-p' is also non-nil." | 79 | But only if `goto-address-highlight-p' is also non-nil." |
| 80 | :type 'boolean | 80 | :type 'boolean |
| 81 | :group 'goto-address) | 81 | :group 'goto-address) |
| 82 | 82 | ||
| 83 | (defcustom goto-address-highlight-p t | 83 | (defcustom goto-address-highlight-p t |
| 84 | "*If t, URL's and e-mail addresses in buffer are highlighted." | 84 | "*If t, URLs and e-mail addresses in buffer are highlighted." |
| 85 | :type 'boolean | 85 | :type 'boolean |
| 86 | :group 'goto-address) | 86 | :group 'goto-address) |
| 87 | 87 | ||
| 88 | (defcustom goto-address-fontify-maximum-size 30000 | 88 | (defcustom goto-address-fontify-maximum-size 30000 |
| 89 | "*Maximum size of file in which to fontify and/or highlight URL's." | 89 | "*Maximum size of file in which to fontify and/or highlight URLs." |
| 90 | :type 'integer | 90 | :type 'integer |
| 91 | :group 'goto-address) | 91 | :group 'goto-address) |
| 92 | 92 | ||
| @@ -129,7 +129,7 @@ But only if `goto-address-highlight-p' is also non-nil." | |||
| 129 | :group 'goto-address) | 129 | :group 'goto-address) |
| 130 | 130 | ||
| 131 | (defun goto-address-fontify () | 131 | (defun goto-address-fontify () |
| 132 | "Fontify the URL's and e-mail addresses in the current buffer. | 132 | "Fontify the URLs and e-mail addresses in the current buffer. |
| 133 | This function implements `goto-address-highlight-p' | 133 | This function implements `goto-address-highlight-p' |
| 134 | and `goto-address-fontify-p'." | 134 | and `goto-address-fontify-p'." |
| 135 | (save-excursion | 135 | (save-excursion |
| @@ -150,7 +150,7 @@ and `goto-address-fontify-p'." | |||
| 150 | (overlay-put this-overlay | 150 | (overlay-put this-overlay |
| 151 | 'help-echo "mouse-2: follow URL") | 151 | 'help-echo "mouse-2: follow URL") |
| 152 | (overlay-put this-overlay | 152 | (overlay-put this-overlay |
| 153 | 'local-map goto-address-highlight-keymap))) | 153 | 'keymap goto-address-highlight-keymap))) |
| 154 | (goto-char (point-min)) | 154 | (goto-char (point-min)) |
| 155 | (while (re-search-forward goto-address-mail-regexp nil t) | 155 | (while (re-search-forward goto-address-mail-regexp nil t) |
| 156 | (let* ((s (match-beginning 0)) | 156 | (let* ((s (match-beginning 0)) |
| @@ -163,7 +163,7 @@ and `goto-address-fontify-p'." | |||
| 163 | (overlay-put this-overlay | 163 | (overlay-put this-overlay |
| 164 | 'help-echo "mouse-2: follow URL") | 164 | 'help-echo "mouse-2: follow URL") |
| 165 | (overlay-put this-overlay | 165 | (overlay-put this-overlay |
| 166 | 'local-map goto-address-highlight-keymap))))) | 166 | 'keymap goto-address-highlight-keymap))))) |
| 167 | (and (buffer-modified-p) | 167 | (and (buffer-modified-p) |
| 168 | (not modified) | 168 | (not modified) |
| 169 | (set-buffer-modified-p nil))))) | 169 | (set-buffer-modified-p nil))))) |