]> code.delx.au - gnu-emacs/commitdiff
Bind inhibit-modification-hooks rather than a/b-c-f
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 12 Sep 2015 04:30:02 +0000 (00:30 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 12 Sep 2015 04:30:02 +0000 (00:30 -0400)
* lisp/wid-edit.el (widget-editable-list-insert-before)
(widget-editable-list-delete-at):
* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres)
(cperl-font-lock-unfontify-region-function):
* lisp/progmodes/antlr-mode.el (save-buffer-state-x):
* lisp/obsolete/longlines.el (longlines-mode):
* lisp/obsolete/fast-lock.el (save-buffer-state):
* lisp/mouse.el (mouse-save-then-kill-delete-region):
* lisp/gnus/message.el (message-hide-headers):
* lisp/eshell/esh-mode.el (eshell-send-input, eshell-output-filter):
* lisp/ibuffer.el (ibuffer-update-title-and-summary)
(ibuffer-redisplay-engine): Bind inhibit-modification-hooks to t rather
than after/before-change-functions to nil.

lisp/eshell/esh-mode.el
lisp/gnus/message.el
lisp/ibuffer.el
lisp/international/isearch-x.el
lisp/mouse.el
lisp/obsolete/fast-lock.el
lisp/obsolete/longlines.el
lisp/progmodes/antlr-mode.el
lisp/progmodes/cperl-mode.el
lisp/wid-edit.el

index 22ccf4e91f95379e7a696eb9b4035378d3d39212..3df820d59568e2b81004d70db91cef69e2f05a18 100644 (file)
@@ -627,10 +627,11 @@ newline."
   (let ((proc-running-p (and (eshell-interactive-process)
                             (not queue-p)))
        (inhibit-point-motion-hooks t)
-       after-change-functions)
+       (inhibit-modification-hooks t))
     (unless (and proc-running-p
                 (not (eq (process-status
-                          (eshell-interactive-process)) 'run)))
+                          (eshell-interactive-process))
+                          'run)))
       (if (or proc-running-p
              (>= (point) eshell-last-output-end))
          (goto-char (point-max))
@@ -697,7 +698,7 @@ This is done after all necessary filtering has been done."
   (let ((oprocbuf (if process (process-buffer process)
                    (current-buffer)))
        (inhibit-point-motion-hooks t)
-       after-change-functions)
+       (inhibit-modification-hooks t))
     (let ((functions eshell-preoutput-filter-functions))
       (while (and functions string)
        (setq string (funcall (car functions) string))
index 5ede15b05384ded77dcf07dc9f124c57a3f40cc2..13ed8c0580940ce0ffe3bc42ce3409c3a6848d0f 100644 (file)
@@ -8329,7 +8329,7 @@ From headers in the original article."
                     (list message-hidden-headers)
                   message-hidden-headers))
        (inhibit-point-motion-hooks t)
-       (after-change-functions nil)
+       (inhibit-modification-hooks t)
        (end-of-headers (point-min)))
     (when regexps
       (save-excursion
index 718471b7993bc06f3679947c67111e3f3e364624..dc34a63aba9739d65c2597ec65be788b1113ef89 100644 (file)
@@ -2037,7 +2037,7 @@ the value of point at the beginning of the line for that buffer."
 (defun ibuffer-update-title-and-summary (format)
   (ibuffer-assert-ibuffer-mode)
   ;; Don't do funky font-lock stuff here
-  (let ((after-change-functions nil))
+  (let ((inhibit-modification-hooks t))
     (if (get-text-property (point-min) 'ibuffer-title)
        (delete-region (point-min)
                       (next-single-property-change
@@ -2244,7 +2244,7 @@ If optional arg SILENT is non-nil, do not display progress messages."
         (orig (count-lines (point-min) (point)))
         ;; Inhibit font-lock caching tricks, since we're modifying the
         ;; entire buffer at once
-        (after-change-functions nil)
+        (inhibit-modification-hooks t)
         (ext-loaded (featurep 'ibuf-ext))
         (bgroups (if ext-loaded
                      (ibuffer-generate-filter-groups bmarklist)
index 31f841d7b56da6c8a3d0a684f3cf198e3c3dfbd1..92e55220375e969d37e6d5a929ca0e90b5255b71 100644 (file)
@@ -71,6 +71,7 @@
 
 (defun isearch-with-keyboard-coding ()
   (interactive)
+  ;; FIXME: What does this after-change-functions binding do here?
   (let ((after-change-functions '(isearch-exit-recursive-edit)))
     (recursive-edit))
   (exit-minibuffer))
index 6584733a86026a3e7fdbc607bf565fb4bfa2b3e0..d6ce31a7a537291fe78363b2935506903e940ed9 100644 (file)
@@ -1111,12 +1111,12 @@ This does not delete the region; it acts like \\[kill-ring-save]."
     ;; Delete, but make the undo-list entry share with the kill ring.
     ;; First, delete just one char, so in case buffer is being modified
     ;; for the first time, the undo list records that fact.
-    (let (before-change-functions after-change-functions)
+    (let ((inhibit-modification-hooks t))
       (delete-region beg
                     (+ beg (if (> end beg) 1 -1))))
     (let ((buffer-undo-list buffer-undo-list))
       ;; Undo that deletion--but don't change the undo list!
-      (let (before-change-functions after-change-functions)
+      (let ((inhibit-modification-hooks t))
        (primitive-undo 1 buffer-undo-list))
       ;; Now delete the rest of the specified region,
       ;; but don't record it.
index 7e3dd66a56a8d2462d8d988d8659c46c27508f18..3985d511eacaf73122070947554ff815eff5f4b2 100644 (file)
    `(let* (,@(append varlist
                      '((modified (buffer-modified-p)) (buffer-undo-list t)
                        (inhibit-read-only t) (inhibit-point-motion-hooks t)
-                       before-change-functions after-change-functions
+                       (inhibit-modification-hooks t)
                        deactivate-mark buffer-file-name buffer-file-truename)))
      ,@body
      (when (and (not modified) (buffer-modified-p))
index 01939daa709bd74b521601c6bc59cf0c2956f3f4..7cb13ce600f14bfa99ab66cdea274ff3b3cf647b 100644 (file)
@@ -143,7 +143,7 @@ newlines are indicated with a symbol."
                     'longlines-window-change-function nil t))
         (let ((buffer-undo-list t)
               (inhibit-read-only t)
-             (after-change-functions nil)
+             (inhibit-modification-hooks t)
               (mod (buffer-modified-p))
              buffer-file-name buffer-file-truename)
           ;; Turning off undo is OK since (spaces + newlines) is
@@ -184,7 +184,7 @@ newlines are indicated with a symbol."
     (if longlines-showing
         (longlines-unshow-hard-newlines))
     (let ((buffer-undo-list t)
-         (after-change-functions nil)
+         (inhibit-modification-hooks t)
           (inhibit-read-only t)
          buffer-file-name buffer-file-truename)
       (if longlines-decoded
index d59948e6447137feea78d7d7158e9d7bd79afc70..2d9bd487bb9a0f632feb240604e126d7ebb059b2 100644 (file)
             (let ((buffer-undo-list t) (inhibit-read-only t)
                   ,@(unless (featurep 'xemacs)
                       '((inhibit-point-motion-hooks t) deactivate-mark))
-                  before-change-functions after-change-functions
+                  (inhibit-modification-hooks t)
                   buffer-file-name buffer-file-truename)
               ,@body)
           (and (not ,modified) (buffer-modified-p)
index b8ba170a246f6d6c16920ab71364013643b14767..5da65084712c4cb865dd6972d119edbcbff6c3d4 100644 (file)
@@ -3672,7 +3672,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
         is-REx is-x-REx REx-subgr-start REx-subgr-end was-subgr i2 hairy-RE
         (case-fold-search nil) (inhibit-read-only t) (buffer-undo-list t)
         (modified (buffer-modified-p)) overshoot is-o-REx name
-        (after-change-functions nil)
+        (inhibit-modification-hooks t)
         (cperl-font-locking t)
         (use-syntax-state (and cperl-syntax-state
                                (>= min (car cperl-syntax-state))))
@@ -8882,7 +8882,7 @@ Delay of auto-help controlled by `cperl-lazy-help-time'."
 (defun cperl-font-lock-unfontify-region-function (beg end)
   (let* ((modified (buffer-modified-p)) (buffer-undo-list t)
         (inhibit-read-only t) (inhibit-point-motion-hooks t)
-        before-change-functions after-change-functions
+        (inhibit-modification-hooks t)
         deactivate-mark buffer-file-name buffer-file-truename)
     (remove-text-properties beg end '(face nil))
     (if (and (not modified) (buffer-modified-p))
index b64de4759d704807a72d8fc3f65052dd8e796081..0d9157a557598b7bae70cfbd2d06ed441c4de1e1 100644 (file)
@@ -2654,8 +2654,7 @@ Return an alist of (TYPE MATCH)."
   (save-excursion
     (let ((children (widget-get widget :children))
          (inhibit-read-only t)
-         before-change-functions
-         after-change-functions)
+         (inhibit-modification-hooks t))
       (cond (before
             (goto-char (widget-get before :entry-from)))
            (t
@@ -2679,8 +2678,7 @@ Return an alist of (TYPE MATCH)."
     (let ((buttons (copy-sequence (widget-get widget :buttons)))
          button
          (inhibit-read-only t)
-         before-change-functions
-         after-change-functions)
+         (inhibit-modification-hooks t))
       (while buttons
        (setq button (car buttons)
              buttons (cdr buttons))
@@ -2691,8 +2689,7 @@ Return an alist of (TYPE MATCH)."
     (let ((entry-from (widget-get child :entry-from))
          (entry-to (widget-get child :entry-to))
          (inhibit-read-only t)
-         before-change-functions
-         after-change-functions)
+         (inhibit-modification-hooks t))
       (widget-delete child)
       (delete-region entry-from entry-to)
       (set-marker entry-from nil)