emacs-diffs
[Top][All Lists]
Advanced

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

master d28581101a: Remove redundant let-bindings of `inhibit-point-motio


From: Stefan Monnier
Subject: master d28581101a: Remove redundant let-bindings of `inhibit-point-motion-hooks`
Date: Fri, 7 Oct 2022 12:17:56 -0400 (EDT)

branch: master
commit d28581101adb967b32b2d1de93aba34ce69e15d2
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    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`.
---
 lisp/cedet/semantic/edit.el  |   8 +-
 lisp/cedet/srecode/fields.el |   4 +-
 lisp/cedet/srecode/insert.el |   4 +-
 lisp/dabbrev.el              |   3 -
 lisp/erc/erc-button.el       |   1 -
 lisp/erc/erc.el              |   3 +-
 lisp/eshell/em-script.el     |   3 +-
 lisp/eshell/em-smart.el      |   3 +-
 lisp/eshell/esh-arg.el       |   3 +-
 lisp/eshell/esh-cmd.el       |   3 +-
 lisp/eshell/esh-mode.el      |   2 -
 lisp/format.el               |   7 +-
 lisp/forms.el                |   6 +-
 lisp/gnus/gnus-art.el        | 206 +++++++++++++++++++------------------------
 lisp/gnus/gnus-cite.el       |  22 ++---
 lisp/gnus/gnus-gravatar.el   |   1 -
 lisp/gnus/gnus-group.el      |   1 +
 lisp/gnus/gnus-rfc1843.el    |   3 +-
 lisp/gnus/gnus-sum.el        |   1 -
 lisp/gnus/gnus-util.el       |   5 +-
 lisp/gnus/message.el         |   6 +-
 lisp/minibuf-eldef.el        |   3 +-
 lisp/net/goto-addr.el        |  89 +++++++++----------
 lisp/obsolete/linum.el       |   5 +-
 lisp/play/zone.el            |  12 +--
 lisp/progmodes/opascal.el    |   3 +-
 lisp/progmodes/vhdl-mode.el  |   7 +-
 lisp/simple.el               |   2 -
 lisp/textmodes/enriched.el   |   3 +-
 lisp/textmodes/flyspell.el   |   2 -
 lisp/textmodes/table.el      |  19 ++--
 lisp/textmodes/tex-mode.el   |   2 +-
 32 files changed, 183 insertions(+), 259 deletions(-)

diff --git a/lisp/cedet/semantic/edit.el b/lisp/cedet/semantic/edit.el
index 7cb6768f7e..4efc283520 100644
--- a/lisp/cedet/semantic/edit.el
+++ b/lisp/cedet/semantic/edit.el
@@ -128,11 +128,9 @@ If nil, errors are still displayed, but informative 
messages are not."
   "Provide a mechanism for semantic tag management.
 Argument START, END, and LENGTH specify the bounds of the change."
    (setq semantic-unmatched-syntax-cache-check t)
-   (let ((inhibit-point-motion-hooks t)
-        )
-     (save-match-data
-       (run-hook-with-args 'semantic-change-functions start end length)
-       )))
+   (save-match-data
+     (run-hook-with-args 'semantic-change-functions start end length)
+     ))
 
 (defun semantic-changes-in-region (start end &optional buffer)
   "Find change overlays which exist in whole or in part between START and END.
diff --git a/lisp/cedet/srecode/fields.el b/lisp/cedet/srecode/fields.el
index 2fc79d01a7..67ee82c73e 100644
--- a/lisp/cedet/srecode/fields.el
+++ b/lisp/cedet/srecode/fields.el
@@ -334,9 +334,7 @@ START and END are the bounds of the change.
 PRE-LEN is used in the after mode for the length of the changed text."
   (when (and after (not undo-in-progress))
     (let* ((field (overlay-get ol 'srecode))
-          (inhibit-point-motion-hooks t)
-          (inhibit-modification-hooks t)
-          )
+          (inhibit-modification-hooks t))
       ;; Sometimes a field is deleted, but we might still get a stray
       ;; event.  Let's just ignore those events.
       (when (slot-boundp field 'overlay)
diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el
index db17b7f23f..f8cfe2a733 100644
--- a/lisp/cedet/srecode/insert.el
+++ b/lisp/cedet/srecode/insert.el
@@ -125,9 +125,7 @@ has set everything up already."
        ;; I tried `combine-after-change-calls', but it did not have
        ;; the effect I wanted.
        (let ((start (point)))
-         (let ((inhibit-point-motion-hooks t)
-               (inhibit-modification-hooks t)
-               )
+         (let ((inhibit-modification-hooks t))
            (srecode--insert-into-buffer template dictionary)
            )
          ;; Now call those after change functions.
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el
index 215425f136..e909da3c20 100644
--- a/lisp/dabbrev.el
+++ b/lisp/dabbrev.el
@@ -985,9 +985,6 @@ Leaves point at the location of the start of the expansion."
                            "\\(" dabbrev--abbrev-char-regexp "\\)"))
          (pattern2 (concat (regexp-quote abbrev)
                           "\\(\\(" dabbrev--abbrev-char-regexp "\\)+\\)"))
-         ;; This makes it possible to find matches in minibuffer prompts
-         ;; even when they are "inviolable".
-         (inhibit-point-motion-hooks t)
          found-string result)
       ;; Limited search.
       (save-restriction
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el
index bccf0e6f1f..445595e2da 100644
--- a/lisp/erc/erc-button.el
+++ b/lisp/erc/erc-button.el
@@ -248,7 +248,6 @@ specified by `erc-button-alist'."
   (save-excursion
     (with-syntax-table erc-button-syntax-table
       (let ((buffer-read-only nil)
-            (inhibit-point-motion-hooks t)
             (inhibit-field-text-motion t)
             (alist erc-button-alist)
             regexp)
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 20f22c896f..f128387bcf 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -2749,8 +2749,7 @@ current session.  `active' means the current active buffer
 buffer is used.  `erc-display-line-1' is used to display STRING.
 
 If STRING is nil, the function does nothing."
-  (let ((inhibit-point-motion-hooks t)
-        new-bufs)
+  (let (new-bufs)
     (dolist (buf (cond
                   ((bufferp buffer) (list buffer))
                   ((listp buffer) buffer)
diff --git a/lisp/eshell/em-script.el b/lisp/eshell/em-script.el
index e0bcd8b099..06ddda1424 100644
--- a/lisp/eshell/em-script.el
+++ b/lisp/eshell/em-script.el
@@ -90,8 +90,7 @@ This includes when running `eshell-command'."
   "Execute a series of Eshell commands in FILE, passing ARGS.
 Comments begin with `#'."
   (let ((orig (point))
-       (here (point-max))
-       (inhibit-point-motion-hooks t))
+       (here (point-max)))
     (goto-char (point-max))
     (with-silent-modifications
       ;; FIXME: Why not use a temporary buffer and avoid this
diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el
index 6768cee4c3..c52ce31899 100644
--- a/lisp/eshell/em-smart.el
+++ b/lisp/eshell/em-smart.el
@@ -197,8 +197,7 @@ The options are `begin', `after' or `end'."
 (defun eshell-smart-scroll-window (wind _start)
   "Scroll the given Eshell window WIND accordingly."
   (unless eshell-currently-handling-window
-    (let ((inhibit-point-motion-hooks t)
-         (eshell-currently-handling-window t))
+    (let ((eshell-currently-handling-window t))
       (with-selected-window wind
        (eshell-smart-redisplay)))))
 
diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el
index 576d32b8c5..f87cc2f20a 100644
--- a/lisp/eshell/esh-arg.el
+++ b/lisp/eshell/esh-arg.el
@@ -285,8 +285,7 @@ Point is left at the end of the arguments."
     (save-restriction
       (goto-char beg)
       (narrow-to-region beg end)
-      (let ((inhibit-point-motion-hooks t)
-           (args (list t))
+      (let ((args (list t))
            delim)
         (with-silent-modifications
           (remove-text-properties (point-min) (point-max)
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index 413336e3eb..3f3a1616ee 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -372,8 +372,7 @@ The value returned is the last form in BODY."
          ;; Since parsing relies partly on buffer-local state
          ;; (e.g. that of `eshell-parse-argument-hook'), we need to
          ;; perform the parsing in the Eshell buffer.
-         (let ((begin (point)) end
-              (inhibit-point-motion-hooks t))
+         (let ((begin (point)) end)
            (with-silent-modifications
              (insert reg)
              (setq end (point))
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 8f11e6f04a..92523fd99e 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -598,7 +598,6 @@ newline."
   ;; Note that the input string does not include its terminal newline.
   (let ((proc-running-p (and (eshell-head-process)
                             (not queue-p)))
-       (inhibit-point-motion-hooks t)
        (inhibit-modification-hooks t))
     (unless (and proc-running-p
                 (not (eq (process-status
@@ -687,7 +686,6 @@ newline."
 This is done after all necessary filtering has been done."
   (let ((oprocbuf (if process (process-buffer process)
                     (current-buffer)))
-        (inhibit-point-motion-hooks t)
         (inhibit-modification-hooks t))
     (when (and string oprocbuf (buffer-name oprocbuf))
       (with-current-buffer oprocbuf
diff --git a/lisp/format.el b/lisp/format.el
index 2c368b8f9c..5cd2d4bfb4 100644
--- a/lisp/format.el
+++ b/lisp/format.el
@@ -440,10 +440,9 @@ a list (ABSOLUTE-FILE-NAME SIZE)."
                                             (file-name-nondirectory file)))))
      (list file fmt)))
   (let (value size old-undo)
-    ;; Record only one undo entry for the insertion.  Inhibit point-motion and
-    ;; modification hooks as with `insert-file-contents'.
-    (let ((inhibit-point-motion-hooks t)
-         (inhibit-modification-hooks t))
+    ;; Record only one undo entry for the insertion.
+    ;; Inhibit modification hooks as with `insert-file-contents'.
+    (let ((inhibit-modification-hooks t))
       ;; Don't bind `buffer-undo-list' to t here to assert that
       ;; `insert-file-contents' may record whether the buffer was unmodified
       ;; before.
diff --git a/lisp/forms.el b/lisp/forms.el
index fdc44b5214..b97fdbe04c 100644
--- a/lisp/forms.el
+++ b/lisp/forms.el
@@ -1928,8 +1928,7 @@ after writing out the data."
   (let ((i 0)
        (here (point))
        there
-       (cnt 0)
-       (inhibit-point-motion-hooks t))
+       (cnt 0))
 
     (if (zerop arg)
        (setq cnt 1)
@@ -1955,8 +1954,7 @@ after writing out the data."
   (let ((i (length forms--markers))
        (here (point))
        there
-       (cnt 0)
-       (inhibit-point-motion-hooks t))
+       (cnt 0))
 
     (if (zerop arg)
        (setq cnt 1)
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index fbcf801313..3bea1a4c1d 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -1765,7 +1765,6 @@ Initialized from `text-mode-syntax-table'.")
   `(with-current-buffer gnus-article-buffer
      (save-restriction
        (let ((inhibit-read-only t)
-            (inhibit-point-motion-hooks t)
             (case-fold-search t))
         (article-narrow-to-head)
         ,@forms))))
@@ -1852,7 +1851,6 @@ Initialized from `text-mode-syntax-table'.")
     (let ((inhibit-read-only t)
          (case-fold-search t)
          (max (1+ (length gnus-sorted-header-list)))
-         (inhibit-point-motion-hooks t)
          (cur (current-buffer))
          ignored visible beg)
       (save-excursion
@@ -1919,8 +1917,7 @@ always hide."
             (not gnus-show-all-headers))
     (save-excursion
       (save-restriction
-       (let ((inhibit-read-only t)
-             (inhibit-point-motion-hooks t))
+       (let ((inhibit-read-only t))
          (article-narrow-to-head)
          (dolist (elem gnus-boring-article-headers)
            (goto-char (point-min))
@@ -2567,8 +2564,7 @@ fill width."
   "Decode all MIME-encoded words in the article."
   (interactive nil gnus-article-mode gnus-summary-mode)
   (gnus-with-article-buffer
-    (let ((inhibit-point-motion-hooks t)
-         (mail-parse-charset gnus-newsgroup-charset)
+    (let ((mail-parse-charset gnus-newsgroup-charset)
          (mail-parse-ignored-charsets
           (with-current-buffer gnus-summary-buffer
             gnus-newsgroup-ignored-charsets)))
@@ -2578,7 +2574,7 @@ fill width."
   "Decode charset-encoded text in the article.
 If PROMPT (the prefix), prompt for a coding system to use."
   (interactive "P" gnus-article-mode)
-  (let ((inhibit-point-motion-hooks t) (case-fold-search t)
+  (let ((case-fold-search t)
        (inhibit-read-only t)
        (mail-parse-charset gnus-newsgroup-charset)
        (mail-parse-ignored-charsets
@@ -2620,8 +2616,7 @@ If PROMPT (the prefix), prompt for a coding system to 
use."
 
 (defun article-decode-encoded-words ()
   "Remove encoded-word encoding from headers."
-  (let ((inhibit-point-motion-hooks t)
-       (mail-parse-charset gnus-newsgroup-charset)
+  (let ((mail-parse-charset gnus-newsgroup-charset)
        (mail-parse-ignored-charsets
         (save-excursion (condition-case nil
                             (set-buffer gnus-summary-buffer)
@@ -2668,8 +2663,7 @@ If PROMPT (the prefix), prompt for a coding system to 
use."
 
 (defun article-decode-group-name ()
   "Decode group names in Newsgroups, Followup-To and Xref headers."
-  (let ((inhibit-point-motion-hooks t)
-       (inhibit-read-only t)
+  (let ((inhibit-read-only t)
        (method (gnus-find-method-for-group gnus-newsgroup-name))
        regexp)
     (when (and (or gnus-group-name-charset-method-alist
@@ -2699,8 +2693,7 @@ The following headers are decoded: From:, To:, Cc:, 
Reply-To:,
 Mail-Reply-To: and Mail-Followup-To:."
   (when gnus-use-idna
     (save-restriction
-      (let ((inhibit-point-motion-hooks t)
-           (inhibit-read-only t))
+      (let ((inhibit-read-only t))
        (article-narrow-to-head)
        (goto-char (point-min))
        (while (re-search-forward "@[^ \t\n\r,>]*\\(xn--[-A-Za-z0-9.]*\\)[ 
\t\n\r,>]" nil t)
@@ -3171,8 +3164,7 @@ images if any to the browser, and deletes them when 
exiting the group
   "Remove list identifiers from the Subject header.
 The `gnus-list-identifiers' variable specifies what to do."
   (interactive nil gnus-article-mode)
-  (let ((inhibit-point-motion-hooks t)
-        (regexp (gnus-group-get-list-identifiers gnus-newsgroup-name))
+  (let ((regexp (gnus-group-get-list-identifiers gnus-newsgroup-name))
         (inhibit-read-only t))
     (when regexp
       (save-excursion
@@ -3221,34 +3213,32 @@ always hide."
   (interactive nil gnus-article-mode)
   (save-excursion
     (save-restriction
-      (let ((inhibit-point-motion-hooks t))
-       (when (gnus-parameter-banner gnus-newsgroup-name)
-         (article-really-strip-banner
-          (gnus-parameter-banner gnus-newsgroup-name)))
-       (when gnus-article-address-banner-alist
-         ;; Note that the From header is decoded here, so it is
-         ;; required that the *-extract-address-components function
-         ;; supports non-ASCII text.
-         (let ((from (save-restriction
-                       (widen)
-                       (article-narrow-to-head)
-                       (mail-fetch-field "from"))))
-           (when (and from
-                      (setq from
-                            (cadr (funcall gnus-extract-address-components
-                                           from))))
-             (catch 'found
-               (dolist (pair gnus-article-address-banner-alist)
-                 (when (string-match (car pair) from)
-                   (throw 'found
-                          (article-really-strip-banner (cdr pair)))))))))))))
+      (when (gnus-parameter-banner gnus-newsgroup-name)
+       (article-really-strip-banner
+        (gnus-parameter-banner gnus-newsgroup-name)))
+      (when gnus-article-address-banner-alist
+       ;; Note that the From header is decoded here, so it is
+       ;; required that the *-extract-address-components function
+       ;; supports non-ASCII text.
+       (let ((from (save-restriction
+                     (widen)
+                     (article-narrow-to-head)
+                     (mail-fetch-field "from"))))
+         (when (and from
+                    (setq from
+                          (cadr (funcall gnus-extract-address-components
+                                         from))))
+           (catch 'found
+             (dolist (pair gnus-article-address-banner-alist)
+               (when (string-match (car pair) from)
+                 (throw 'found
+                        (article-really-strip-banner (cdr pair))))))))))))
 
 (defun article-really-strip-banner (banner)
   "Strip the banner specified by the argument."
   (save-excursion
     (save-restriction
-      (let ((inhibit-point-motion-hooks t)
-           (gnus-signature-limit nil)
+      (let ((gnus-signature-limit nil)
            (inhibit-read-only t))
        (article-goto-body)
        (cond
@@ -3307,8 +3297,7 @@ always hide."
   "Remove all blank lines from the beginning of the article."
   (interactive nil gnus-article-mode)
   (save-excursion
-    (let ((inhibit-point-motion-hooks t)
-         (inhibit-read-only t))
+    (let ((inhibit-read-only t))
       (when (article-goto-body)
        (while (and (not (eobp))
                    (looking-at "[ \t]*$"))
@@ -3349,8 +3338,7 @@ Point is left at the beginning of the narrowed-to region."
   "Replace consecutive blank lines with one empty line."
   (interactive nil gnus-article-mode)
   (save-excursion
-    (let ((inhibit-point-motion-hooks t)
-         (inhibit-read-only t))
+    (let ((inhibit-read-only t))
       ;; First make all blank lines empty.
       (article-goto-body)
       (while (re-search-forward "^[ \t]+$" nil t)
@@ -3368,8 +3356,7 @@ Point is left at the beginning of the narrowed-to region."
   "Remove all white space from the beginning of the lines in the article."
   (interactive nil gnus-article-mode)
   (save-excursion
-    (let ((inhibit-point-motion-hooks t)
-         (inhibit-read-only t))
+    (let ((inhibit-read-only t))
       (article-goto-body)
       (while (re-search-forward "^[ \t]+" nil t)
        (replace-match "" t t)))))
@@ -3378,8 +3365,7 @@ Point is left at the beginning of the narrowed-to region."
   "Remove all white space from the end of the lines in the article."
   (interactive nil gnus-article-mode)
   (save-excursion
-    (let ((inhibit-point-motion-hooks t)
-         (inhibit-read-only t))
+    (let ((inhibit-read-only t))
       (article-goto-body)
       (while (re-search-forward "[ \t]+$" nil t)
        (replace-match "" t t)))))
@@ -3395,37 +3381,35 @@ Point is left at the beginning of the narrowed-to 
region."
   "Strip all blank lines."
   (interactive nil gnus-article-mode)
   (save-excursion
-    (let ((inhibit-point-motion-hooks t)
-         (inhibit-read-only t))
+    (let ((inhibit-read-only t))
       (article-goto-body)
       (while (re-search-forward "^[ \t]*\n" nil t)
        (replace-match "" t t)))))
 
 (defun gnus-article-narrow-to-signature ()
   "Narrow to the signature; return t if a signature is found, else nil."
-  (let ((inhibit-point-motion-hooks t))
-    (when (gnus-article-search-signature)
-      (forward-line 1)
-      ;; Check whether we have some limits to what we consider
-      ;; to be a signature.
-      (let ((limits (if (listp gnus-signature-limit) gnus-signature-limit
-                     (list gnus-signature-limit)))
-           limit limited)
-       (while (setq limit (pop limits))
-         (if (or (and (integerp limit)
-                      (< (- (point-max) (point)) limit))
-                 (and (floatp limit)
-                      (< (count-lines (point) (point-max)) limit))
-                 (and (functionp limit)
-                      (funcall limit))
-                 (and (stringp limit)
-                      (not (re-search-forward limit nil t))))
-             ()                        ; This limit did not succeed.
-           (setq limited t
-                 limits nil)))
-       (unless limited
-         (narrow-to-region (point) (point-max))
-         t)))))
+  (when (gnus-article-search-signature)
+    (forward-line 1)
+    ;; Check whether we have some limits to what we consider
+    ;; to be a signature.
+    (let ((limits (if (listp gnus-signature-limit) gnus-signature-limit
+                   (list gnus-signature-limit)))
+         limit limited)
+      (while (setq limit (pop limits))
+       (if (or (and (integerp limit)
+                    (< (- (point-max) (point)) limit))
+               (and (floatp limit)
+                    (< (count-lines (point) (point-max)) limit))
+               (and (functionp limit)
+                    (funcall limit))
+               (and (stringp limit)
+                    (not (re-search-forward limit nil t))))
+           ()                          ; This limit did not succeed.
+         (setq limited t
+               limits nil)))
+      (unless limited
+       (narrow-to-region (point) (point-max))
+       t))))
 
 (defun gnus-article-search-signature ()
   "Search the current buffer for the signature separator.
@@ -3485,8 +3469,7 @@ means show, 0 means toggle."
 (defun gnus-article-show-hidden-text (type &optional _dummy)
   "Show all hidden text of type TYPE.
 Originally it is hide instead of DUMMY."
-  (let ((inhibit-read-only t)
-       (inhibit-point-motion-hooks t))
+  (let ((inhibit-read-only t))
     (gnus-remove-text-properties-when
      'article-type type
      (point-min) (point-max)
@@ -3528,7 +3511,6 @@ possible values."
   (interactive (list 'ut t) gnus-article-mode)
   (let* ((case-fold-search t)
         (inhibit-read-only t)
-        (inhibit-point-motion-hooks t)
         (visible-date (mail-fetch-field "Date"))
         pos date bface eface)
     (save-excursion
@@ -4351,8 +4333,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is
            (insert-buffer-substring gnus-original-article-buffer)
            (setq items (split-string sig))
            (message-narrow-to-head)
-           (let ((inhibit-point-motion-hooks t)
-                 (case-fold-search t))
+           (let ((case-fold-search t))
              ;; Don't verify multiple headers.
              (setq headers (mapconcat (lambda (header)
                                         (concat header ": "
@@ -6811,16 +6792,15 @@ not have a face in `gnus-article-boring-faces'."
             (boundp 'gnus-article-boring-faces)
             (symbol-value 'gnus-article-boring-faces))
     (save-excursion
-      (let ((inhibit-point-motion-hooks t))
-       (catch 'only-boring
-         (while (re-search-forward "\\b\\w\\w" nil t)
-           (forward-char -1)
-            (when (not (seq-intersection
-                       (gnus-faces-at (point))
-                        (symbol-value 'gnus-article-boring-faces)
-                        #'eq))
-             (throw 'only-boring nil)))
-         (throw 'only-boring t))))))
+      (catch 'only-boring
+       (while (re-search-forward "\\b\\w\\w" nil t)
+         (forward-char -1)
+          (when (not (seq-intersection
+                     (gnus-faces-at (point))
+                      (symbol-value 'gnus-article-boring-faces)
+                      #'eq))
+           (throw 'only-boring nil)))
+       (throw 'only-boring t)))))
 
 (defun gnus-article-refer-article ()
   "Read article specified by message-id around point."
@@ -8112,18 +8092,17 @@ It does this by highlighting everything after
 `gnus-signature-separator' using the face `gnus-signature'."
   (interactive nil gnus-article-mode gnus-summary-mode)
   (gnus-with-article-buffer
-    (let ((inhibit-point-motion-hooks t))
-      (save-restriction
-       (when (and gnus-signature-face
-                  (gnus-article-narrow-to-signature))
-         (overlay-put (make-overlay (point-min) (point-max) nil t)
-                      'face gnus-signature-face)
-         (widen)
-         (gnus-article-search-signature)
-         (let ((start (match-beginning 0))
-               (end (set-marker (make-marker) (1+ (match-end 0)))))
-           (gnus-article-add-button start (1- end) 'gnus-signature-toggle
-                                    end)))))))
+   (save-restriction
+     (when (and gnus-signature-face
+               (gnus-article-narrow-to-signature))
+       (overlay-put (make-overlay (point-min) (point-max) nil t)
+                   'face gnus-signature-face)
+       (widen)
+       (gnus-article-search-signature)
+       (let ((start (match-beginning 0))
+            (end (set-marker (make-marker) (1+ (match-end 0)))))
+        (gnus-article-add-button start (1- end) 'gnus-signature-toggle
+                                 end))))))
 
 (defun gnus-button-in-region-p (b e prop)
   "Say whether PROP exists in the region."
@@ -8135,8 +8114,7 @@ It does this by highlighting everything after
 specified by `gnus-button-alist'."
   (interactive nil gnus-article-mode gnus-summary-mode)
   (gnus-with-article-buffer
-    (let ((inhibit-point-motion-hooks t)
-         (case-fold-search t)
+    (let ((case-fold-search t)
          (alist gnus-button-alist)
          beg entry regexp)
       ;; We skip the headers.
@@ -8292,19 +8270,18 @@ url is put as the `gnus-button-url' overlay property on 
the button."
 
 (defun gnus-signature-toggle (end)
   (gnus-with-article-buffer
-    (let ((inhibit-point-motion-hooks t))
-      (if (text-property-any end (point-max) 'article-type 'signature)
-         (progn
-           (gnus-delete-wash-type 'signature)
-           (gnus-remove-text-properties-when
-            'article-type 'signature end (point-max)
-            (cons 'article-type (cons 'signature
-                                      gnus-hidden-properties))))
-       (gnus-add-wash-type 'signature)
-       (gnus-add-text-properties-when
-        'article-type nil end (point-max)
-        (cons 'article-type (cons 'signature
-                                  gnus-hidden-properties)))))
+   (if (text-property-any end (point-max) 'article-type 'signature)
+       (progn
+        (gnus-delete-wash-type 'signature)
+        (gnus-remove-text-properties-when
+         'article-type 'signature end (point-max)
+         (cons 'article-type (cons 'signature
+                                   gnus-hidden-properties))))
+     (gnus-add-wash-type 'signature)
+     (gnus-add-text-properties-when
+      'article-type nil end (point-max)
+      (cons 'article-type (cons 'signature
+                               gnus-hidden-properties))))
     (let ((gnus-article-mime-handle-alist-1 gnus-article-mime-handle-alist))
       (gnus-set-mode-line 'article))))
 
@@ -8313,8 +8290,7 @@ url is put as the `gnus-button-url' overlay property on 
the button."
   (save-excursion
     (let* ((marker (car marker-and-entry))
            (entry (cadr marker-and-entry))
-           (regexp (car entry))
-           (inhibit-point-motion-hooks t))
+           (regexp (car entry)))
       (goto-char marker)
       ;; This is obviously true, or something bad is happening :)
       ;; But we need it to have the match-data
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el
index b4d7661d74..e344b071bf 100644
--- a/lisp/gnus/gnus-cite.el
+++ b/lisp/gnus/gnus-cite.el
@@ -341,7 +341,6 @@ Lines matching `gnus-cite-attribution-suffix' and perhaps
     (let ((buffer-read-only nil)
          (alist gnus-cite-prefix-alist)
          (faces gnus-cite-face-list)
-         (inhibit-point-motion-hooks t)
          face entry prefix skip numbers number face-alist)
       ;; Loop through citation prefixes.
       (while alist
@@ -462,7 +461,6 @@ text (i.e., computer code and the like) will not be folded."
   (interactive "P" gnus-article-mode gnus-summary-mode)
   (with-current-buffer gnus-article-buffer
     (let ((buffer-read-only nil)
-         (inhibit-point-motion-hooks t)
          (marks (gnus-dissect-cited-text))
          (adaptive-fill-mode nil)
          (fill-column (if width (prefix-numeric-value width) fill-column)))
@@ -536,7 +534,6 @@ always hide."
   (with-current-buffer gnus-article-buffer
     (let ((buffer-read-only nil)
           marks
-          (inhibit-point-motion-hooks t)
           (props (nconc (list 'article-type 'cite)
                         gnus-hidden-properties))
           (point (point-min))
@@ -613,7 +610,6 @@ means show, nil means toggle."
         (start (cadr args))
         (hidden
          (text-property-any beg (1- end) 'article-type 'cite))
-        (inhibit-point-motion-hooks t)
         buffer-read-only)
     (when (or (null arg)
              (zerop arg)
@@ -673,7 +669,6 @@ See also the documentation for 
`gnus-article-highlight-citation'."
        (let ((start (point))
              (atts gnus-cite-attribution-alist)
              (buffer-read-only nil)
-             (inhibit-point-motion-hooks t)
              (hidden 0)
              total)
          (goto-char (point-max))
@@ -731,13 +726,12 @@ See also the documentation for 
`gnus-article-highlight-citation'."
 (defun gnus-cite-parse-wrapper ()
   ;; Wrap chopped gnus-cite-parse.
   (article-goto-body)
-  (let ((inhibit-point-motion-hooks t))
-    (save-excursion
-      (gnus-cite-parse-attributions))
-    (save-excursion
-      (gnus-cite-parse))
-    (save-excursion
-      (gnus-cite-connect-attributions))))
+  (save-excursion
+    (gnus-cite-parse-attributions))
+  (save-excursion
+    (gnus-cite-parse))
+  (save-excursion
+    (gnus-cite-connect-attributions)))
 
 (defun gnus-cite-parse ()
   ;; Parse and connect citation prefixes and attribution lines.
@@ -1020,8 +1014,7 @@ See also the documentation for 
`gnus-article-highlight-citation'."
 (defun gnus-cite-add-face (number prefix face)
   ;; At line NUMBER, ignore PREFIX and add FACE to the rest of the line.
   (when face
-    (let ((inhibit-point-motion-hooks t)
-         from to overlay)
+    (let (from to overlay)
       (goto-char (point-min))
       (when (zerop (forward-line (1- number)))
        (forward-char (length prefix))
@@ -1041,7 +1034,6 @@ See also the documentation for 
`gnus-article-highlight-citation'."
     (gnus-cite-parse-maybe nil t)
     (let ((buffer-read-only nil)
          (numbers (cdr (assoc prefix gnus-cite-prefix-alist)))
-         (inhibit-point-motion-hooks t)
          number)
       (while numbers
        (setq number (car numbers)
diff --git a/lisp/gnus/gnus-gravatar.el b/lisp/gnus/gnus-gravatar.el
index d64e000d70..93b18f9555 100644
--- a/lisp/gnus/gnus-gravatar.el
+++ b/lisp/gnus/gnus-gravatar.el
@@ -87,7 +87,6 @@ callback for `gravatar-retrieve'."
         (let ((real-name (car address))
               (mail-address (cadr address))
               (mark (point-marker))
-              (inhibit-point-motion-hooks t)
               (case-fold-search t))
           (save-restriction
             (article-narrow-to-head)
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 35103e9c4f..e69f0857e7 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -2651,6 +2651,7 @@ If EXCLUDE-GROUP, do not go to that group."
     (and best-point (gnus-group-group-name))))
 
 ;; Is there something like an after-point-motion-hook?
+;; FIXME: There's `cursor-sensor-mode's `cursor-sensor-functions' property.
 ;; (inhibit-point-motion-hooks?).  Is there a tool-bar-update function?
 
 ;; (defun gnus-group-menu-bar-update ()
diff --git a/lisp/gnus/gnus-rfc1843.el b/lisp/gnus/gnus-rfc1843.el
index 9872f7b994..da1afb672a 100644
--- a/lisp/gnus/gnus-rfc1843.el
+++ b/lisp/gnus/gnus-rfc1843.el
@@ -40,8 +40,7 @@
       (save-excursion
        (save-restriction
          (message-narrow-to-head)
-         (let* ((inhibit-point-motion-hooks t)
-                (case-fold-search t)
+         (let* ((case-fold-search t)
                 (ct (message-fetch-field "Content-Type" t))
                 (ctl (and ct (mail-header-parse-content-type ct))))
            (if (and ctl (not (string-search "/" (car ctl))))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 107ad8fd4a..18ba55a439 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -9856,7 +9856,6 @@ If ARG is a negative number, hide the unwanted header 
lines."
       (widen)
       (article-narrow-to-head)
       (let* ((inhibit-read-only t)
-            (inhibit-point-motion-hooks t)
             (hidden (if (numberp arg)
                         (>= arg 0)
                       (or
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index fe556b155a..95c9539593 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -166,9 +166,8 @@ is slower."
   (require 'message)
   (save-excursion
     (save-restriction
-      (let ((inhibit-point-motion-hooks t))
-       (nnheader-narrow-to-headers)
-       (message-fetch-field field)))))
+      (nnheader-narrow-to-headers)
+      (message-fetch-field field))))
 
 (defun gnus-fetch-original-field (field)
   "Fetch FIELD from the original version of the current article."
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index beccef6f5f..67ec0531fa 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -2172,8 +2172,7 @@ If FIRST is non-nil, only the first value is returned.
 
 The buffer is expected to be narrowed to just the header of the message;
 see `message-narrow-to-headers-or-head'."
-  (let* ((inhibit-point-motion-hooks t)
-        (value (mail-fetch-field header nil (not first))))
+  (let* ((value (mail-fetch-field header nil (not first))))
     (when value
       (while (string-match "\n[\t ]+" value)
        (setq value (replace-match " " t t value)))
@@ -7309,7 +7308,6 @@ specified by FUNCTIONS, if non-nil, or by the variable
   (let ((cur (current-buffer))
        from subject date
        references message-id follow-to
-       (inhibit-point-motion-hooks t)
        (message-this-is-mail t)
        gnus-warning)
     (save-restriction
@@ -7370,7 +7368,6 @@ If TO-NEWSGROUPS, use that as the new Newsgroups line."
   (let ((cur (current-buffer))
        from subject date reply-to mrt mct
        references message-id follow-to
-       (inhibit-point-motion-hooks t)
        (message-this-is-news t)
        followup-to distribution newsgroups gnus-warning posted-to)
     (save-restriction
@@ -8609,7 +8606,6 @@ From headers in the original article."
   (let ((regexps (if (stringp message-hidden-headers)
                     (list message-hidden-headers)
                   message-hidden-headers))
-       (inhibit-point-motion-hooks t)
        (inhibit-modification-hooks t)
        end-of-headers)
     (when regexps
diff --git a/lisp/minibuf-eldef.el b/lisp/minibuf-eldef.el
index ba7e68eb81..935c9111ee 100644
--- a/lisp/minibuf-eldef.el
+++ b/lisp/minibuf-eldef.el
@@ -110,8 +110,7 @@ should be displayed in its place.")
   "Set up a minibuffer for `minibuffer-electric-default-mode'.
 The prompt and initial input should already have been inserted."
   (let ((regexps minibuffer-default-in-prompt-regexps)
-       (match nil)
-       (inhibit-point-motion-hooks t))
+       (match nil))
     (save-excursion
       (save-restriction
        ;; Narrow to only the prompt.
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el
index 99ed14ca8b..86cf98004b 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."
diff --git a/lisp/obsolete/linum.el b/lisp/obsolete/linum.el
index c6ce3d6d11..e94cf5086c 100644
--- a/lisp/obsolete/linum.el
+++ b/lisp/obsolete/linum.el
@@ -209,10 +209,7 @@ Linum mode is a buffer-local minor mode."
             (overlay-put ov 'before-string
                          (propertize " " 'display `((margin left-margin) 
,str)))
             (overlay-put ov 'linum-str str))))
-      ;; Text may contain those nasty intangible properties, but that
-      ;; shouldn't prevent us from counting those lines.
-      (let ((inhibit-point-motion-hooks t))
-        (forward-line))
+      (forward-line)
       (setq line (1+ line)))
     (when (display-graphic-p)
       (setq width (ceiling
diff --git a/lisp/play/zone.el b/lisp/play/zone.el
index 34523fef05..b0ce0194cf 100644
--- a/lisp/play/zone.el
+++ b/lisp/play/zone.el
@@ -204,8 +204,7 @@ If the element is a function or a list of a function and a 
number,
     (insert s)))
 
 (defun zone-shift-left ()
-  (let ((inhibit-point-motion-hooks t)
-        s)
+  (let (s)
     (while (not (eobp))
       (unless (eolp)
         (setq s (buffer-substring (point) (1+ (point))))
@@ -216,8 +215,7 @@ If the element is a function or a list of a function and a 
number,
 
 (defun zone-shift-right ()
   (goto-char (point-max))
-  (let ((inhibit-point-motion-hooks t)
-        s)
+  (let (s)
     (while (not (bobp))
       (unless (bolp)
         (setq s (buffer-substring (1- (point)) (point)))
@@ -448,8 +446,7 @@ If the element is a function or a list of a function and a 
number,
 
 (defun zone-fill-out-screen (width height)
   (let ((start (window-start))
-       (line (make-string width 32))
-       (inhibit-point-motion-hooks t))
+       (line (make-string width 32)))
     (goto-char start)
     ;; fill out rectangular ws block
     (while (progn (end-of-line)
@@ -664,8 +661,7 @@ If nil, `zone-pgm-random-life' chooses a value from 0-3 
(inclusive).")
       (setq c (point))
       (move-to-column 9)
       (setq col (cons (buffer-substring (point) c) col))
-;      (let ((inhibit-point-motion-hooks t))
-        (end-of-line 0);)
+      (end-of-line 0)
       (forward-char -10))
     (let ((life-patterns (vector
                           (if (and col (search-forward "@" max t))
diff --git a/lisp/progmodes/opascal.el b/lisp/progmodes/opascal.el
index 5ed719b5a7..fb1e501066 100644
--- a/lisp/progmodes/opascal.el
+++ b/lisp/progmodes/opascal.el
@@ -275,8 +275,7 @@ nested routine.")
   (declare (debug t))
   `(save-excursion
      (save-match-data
-      (let ((inhibit-point-motion-hooks t)
-            (deactivate-mark nil))
+      (let ((deactivate-mark nil))
         (progn ,@forms)))))
 
 
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index b763da3fbc..a36bb7fbe4 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -2507,11 +2507,10 @@ consistent searching."
 
 (defmacro vhdl-prepare-search-2 (&rest body)
   "Enable case insensitive search, switch to syntax table that includes `_',
-arrange to ignore `intangible' overlays, then execute BODY, and finally restore
-the old environment.  Used for consistent searching."
+then execute BODY, and finally restore the old environment.
+Used for consistent searching."
   (declare (debug t))
-  `(let ((case-fold-search t)          ; case insensitive search
-         (inhibit-point-motion-hooks t))
+  `(let ((case-fold-search t))         ; case insensitive search
      ;; use extended syntax table
      (with-syntax-table vhdl-mode-ext-syntax-table
        ;; execute BODY safely
diff --git a/lisp/simple.el b/lisp/simple.el
index 6b73ccb516..7556b5adcf 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3526,8 +3526,6 @@ Return what remains of the list."
         ;; In a writable buffer, enable undoing read-only text that is
         ;; so because of text properties.
         (inhibit-read-only t)
-        ;; Don't let `intangible' properties interfere with undo.
-        (inhibit-point-motion-hooks t)
         ;; We use oldlist only to check for EQ.  ++kfs
         (oldlist buffer-undo-list)
         (did-apply nil)
diff --git a/lisp/textmodes/enriched.el b/lisp/textmodes/enriched.el
index 935be06812..26f22a9a4a 100644
--- a/lisp/textmodes/enriched.el
+++ b/lisp/textmodes/enriched.el
@@ -325,8 +325,7 @@ the region, and the START and END of each region."
 ;;;###autoload
 (defun enriched-encode (from to orig-buf)
   (if enriched-verbose (message "Enriched: encoding document..."))
-  (let ((inhibit-read-only t)
-       (inhibit-point-motion-hooks t))
+  (let ((inhibit-read-only t))
     (save-restriction
       (narrow-to-region from to)
       (delete-to-left-margin)
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 774e7ac737..a66b72cfd0 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1032,7 +1032,6 @@ Mostly we check word delimiters."
 (defun flyspell-word-search-backward (word bound &optional ignore-case)
   (save-excursion
     (let* ((r '())
-          (inhibit-point-motion-hooks t)
           (flyspell-not-casechars (flyspell-get-not-casechars))
           (bound (if (and bound
                           (> bound (point-min)))
@@ -1066,7 +1065,6 @@ Mostly we check word delimiters."
 (defun flyspell-word-search-forward (word bound)
   (save-excursion
     (let* ((r '())
-          (inhibit-point-motion-hooks t)
           (flyspell-not-casechars (flyspell-get-not-casechars))
           (bound (if (and bound
                           (< bound (point-max)))
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index fc06c4c0da..964f94228b 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -5221,16 +5221,15 @@ instead of the current buffer and returns the OBJECT."
   "Point has entered a cell.
 Refresh the menu bar."
   ;; Avoid calling point-motion-hooks recursively.
-  (let ((inhibit-point-motion-hooks t))
-    (force-mode-line-update)
-    (pcase dir
-     ('left
-      (setq table-mode-indicator nil)
-      (run-hooks 'table-point-left-cell-hook))
-     ('entered
-      (setq table-mode-indicator t)
-      (table--warn-incompatibility)
-      (run-hooks 'table-point-entered-cell-hook)))))
+  (force-mode-line-update)
+  (pcase dir
+    ('left
+     (setq table-mode-indicator nil)
+     (run-hooks 'table-point-left-cell-hook))
+    ('entered
+     (setq table-mode-indicator t)
+     (table--warn-incompatibility)
+     (run-hooks 'table-point-entered-cell-hook))))
 
 (defun table--warn-incompatibility ()
   "If called from interactive operation warn the know incompatibilities.
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index bb8ea0d942..ca0312d8fb 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1039,7 +1039,7 @@ says which mode to use."
 ;; have files annotated with -*- LaTeX -*- (e.g. because they received
 ;; them from someone using AUCTeX).
 ;; FIXME: Turn them into autoloads so that AUCTeX can override them
-;; with it's own autoloads?  Or maybe rely on `major-mode-remap-alist'?
+;; with its own autoloads?  Or maybe rely on `major-mode-remap-alist'?
 ;;;###autoload (defalias 'TeX-mode #'tex-mode)
 ;;;###autoload (defalias 'plain-TeX-mode #'plain-tex-mode)
 ;;;###autoload (defalias 'LaTeX-mode #'latex-mode)



reply via email to

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