summaryrefslogtreecommitdiff
path: root/lisp/net
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2022-10-07 12:16:47 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2022-10-07 12:16:47 -0400
commitd28581101adb967b32b2d1de93aba34ce69e15d2 (patch)
tree8d8177c0ac8e7829d74d8c89193942aec2e90f66 /lisp/net
parent67a20bb4b54de1faf840836015389bcc3d7a3eed (diff)
downloademacs-d28581101adb967b32b2d1de93aba34ce69e15d2.tar.gz
emacs-d28581101adb967b32b2d1de93aba34ce69e15d2.tar.bz2
emacs-d28581101adb967b32b2d1de93aba34ce69e15d2.zip
Remove redundant let-bindings of `inhibit-point-motion-hooks`
`inhibit-point-motion-hooks` has defaulted to t (and been declared obsolete) since Emacs-25, so remove left-over bindings to that now default value. * lisp/dabbrev.el (dabbrev--search): * lisp/format.el (format-insert-file): * lisp/forms.el (forms-next-field, forms-prev-field): * lisp/minibuf-eldef.el (minibuf-eldef-setup-minibuffer): * lisp/simple.el (primitive-undo): * lisp/cedet/semantic/edit.el (semantic-change-function): * lisp/cedet/srecode/fields.el (srecode-field-mod-hook): * lisp/cedet/srecode/insert.el (srecode-insert-fcn): * lisp/erc/erc-button.el (erc-button-add-buttons): * lisp/erc/erc.el (erc-display-line): * lisp/eshell/em-script.el (eshell-source-file): * lisp/eshell/em-smart.el (eshell-smart-scroll-window): * lisp/eshell/esh-arg.el (eshell-parse-arguments): * lisp/eshell/esh-cmd.el (eshell-with-temp-command): * lisp/eshell/esh-mode.el (eshell-send-input, eshell-output-filter): * lisp/gnus/gnus-art.el (gnus-with-article-headers) (article-hide-headers, article-hide-boring-headers) (article-decode-mime-words, article-decode-charset) (article-decode-encoded-words, article-decode-group-name) (article-decode-idna-rhs, article-hide-list-identifiers) (article-strip-banner, article-really-strip-banner) (article-strip-leading-blank-lines) (article-strip-multiple-blank-lines, article-strip-leading-space) (article-strip-trailing-space, article-strip-all-blank-lines) (gnus-article-narrow-to-signature, gnus-article-show-hidden-text) (article-date-ut, article-verify-x-pgp-sig) (gnus-article-only-boring-p, gnus-article-highlight-signature) (gnus-article-add-buttons, gnus-signature-toggle, gnus-button-push): * lisp/gnus/gnus-cite.el (gnus-article-highlight-citation) (gnus-article-fill-cited-article, gnus-article-hide-citation) (gnus-article-toggle-cited-text, gnus-article-hide-citation-maybe) (gnus-cite-parse-wrapper, gnus-cite-add-face, gnus-cite-toggle): * lisp/gnus/gnus-gravatar.el (gnus-gravatar-insert): * lisp/gnus/gnus-rfc1843.el (rfc1843-decode-article-body): * lisp/gnus/gnus-sum.el (gnus-summary-toggle-header): * lisp/gnus/gnus-util.el (gnus-fetch-field): * lisp/gnus/message.el (message-fetch-field, message-reply) (message-followup, message-hide-headers): * lisp/net/goto-addr.el (goto-address-fontify): * lisp/obsolete/linum.el (linum-update-window): * lisp/play/zone.el (zone-shift-left, zone-shift-right) (zone-fill-out-screen): * lisp/progmodes/opascal.el (opascal-save-excursion): * lisp/progmodes/vhdl-mode.el (vhdl-prepare-search-2): * lisp/textmodes/enriched.el (enriched-encode): * lisp/textmodes/flyspell.el (flyspell-word-search-backward) (flyspell-word-search-forward): * lisp/textmodes/table.el (table--point-entered/left-cell-function): Remove let-binding of `inhibit-point-motion-hooks`.
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/goto-addr.el89
1 files changed, 44 insertions, 45 deletions
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el
index 99ed14ca8b4..86cf98004ba 100644
--- a/lisp/net/goto-addr.el
+++ b/lisp/net/goto-addr.el
@@ -164,52 +164,51 @@ and `goto-address-fontify-p'."
;; Clean up from any previous go.
(goto-address-unfontify (or start (point-min)) (or end (point-max)))
(save-excursion
- (let ((inhibit-point-motion-hooks t))
+ (goto-char (or start (point-min)))
+ (when (or (eq t goto-address-fontify-maximum-size)
+ (< (- (or end (point-max)) (point))
+ goto-address-fontify-maximum-size))
+ (while (re-search-forward goto-address-url-regexp end t)
+ (let* ((s (match-beginning 0))
+ (e (match-end 0))
+ this-overlay)
+ (when (or (not goto-address-prog-mode)
+ ;; This tests for both comment and string
+ ;; syntax.
+ (nth 8 (syntax-ppss)))
+ (setq this-overlay (make-overlay s e))
+ (and goto-address-fontify-p
+ (overlay-put this-overlay 'face goto-address-url-face))
+ (overlay-put this-overlay 'evaporate t)
+ (overlay-put this-overlay
+ 'mouse-face goto-address-url-mouse-face)
+ (overlay-put this-overlay 'follow-link t)
+ (overlay-put this-overlay
+ 'help-echo "mouse-2, C-c RET: follow URL")
+ (overlay-put this-overlay
+ 'keymap goto-address-highlight-keymap)
+ (overlay-put this-overlay 'goto-address t))))
(goto-char (or start (point-min)))
- (when (or (eq t goto-address-fontify-maximum-size)
- (< (- (or end (point-max)) (point))
- goto-address-fontify-maximum-size))
- (while (re-search-forward goto-address-url-regexp end t)
- (let* ((s (match-beginning 0))
- (e (match-end 0))
- this-overlay)
- (when (or (not goto-address-prog-mode)
- ;; This tests for both comment and string
- ;; syntax.
- (nth 8 (syntax-ppss)))
- (setq this-overlay (make-overlay s e))
- (and goto-address-fontify-p
- (overlay-put this-overlay 'face goto-address-url-face))
- (overlay-put this-overlay 'evaporate t)
- (overlay-put this-overlay
- 'mouse-face goto-address-url-mouse-face)
- (overlay-put this-overlay 'follow-link t)
- (overlay-put this-overlay
- 'help-echo "mouse-2, C-c RET: follow URL")
- (overlay-put this-overlay
- 'keymap goto-address-highlight-keymap)
- (overlay-put this-overlay 'goto-address t))))
- (goto-char (or start (point-min)))
- (while (re-search-forward goto-address-mail-regexp end t)
- (let* ((s (match-beginning 0))
- (e (match-end 0))
- this-overlay)
- (when (or (not goto-address-prog-mode)
- ;; This tests for both comment and string
- ;; syntax.
- (nth 8 (syntax-ppss)))
- (setq this-overlay (make-overlay s e))
- (and goto-address-fontify-p
- (overlay-put this-overlay 'face goto-address-mail-face))
- (overlay-put this-overlay 'evaporate t)
- (overlay-put this-overlay 'mouse-face
- goto-address-mail-mouse-face)
- (overlay-put this-overlay 'follow-link t)
- (overlay-put this-overlay
- 'help-echo "mouse-2, C-c RET: mail this address")
- (overlay-put this-overlay
- 'keymap goto-address-highlight-keymap)
- (overlay-put this-overlay 'goto-address t))))))))
+ (while (re-search-forward goto-address-mail-regexp end t)
+ (let* ((s (match-beginning 0))
+ (e (match-end 0))
+ this-overlay)
+ (when (or (not goto-address-prog-mode)
+ ;; This tests for both comment and string
+ ;; syntax.
+ (nth 8 (syntax-ppss)))
+ (setq this-overlay (make-overlay s e))
+ (and goto-address-fontify-p
+ (overlay-put this-overlay 'face goto-address-mail-face))
+ (overlay-put this-overlay 'evaporate t)
+ (overlay-put this-overlay 'mouse-face
+ goto-address-mail-mouse-face)
+ (overlay-put this-overlay 'follow-link t)
+ (overlay-put this-overlay
+ 'help-echo "mouse-2, C-c RET: mail this address")
+ (overlay-put this-overlay
+ 'keymap goto-address-highlight-keymap)
+ (overlay-put this-overlay 'goto-address t)))))))
(defun goto-address-fontify-region (start end)
"Fontify URLs and e-mail addresses in the given region."