diff options
| author | Stefan Monnier | 2015-09-12 00:30:02 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2015-09-12 00:30:02 -0400 |
| commit | 166812addb0a1b9b2258ef3ce76424cd7facfa8b (patch) | |
| tree | 9ed1838de7761bf24b94d2182e66a6a696d5baf2 | |
| parent | e125dce50b2fa1c5f57f6ca00ea679437593bdc4 (diff) | |
| download | emacs-166812addb0a1b9b2258ef3ce76424cd7facfa8b.tar.gz emacs-166812addb0a1b9b2258ef3ce76424cd7facfa8b.zip | |
Bind inhibit-modification-hooks rather than a/b-c-f
* 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.
| -rw-r--r-- | lisp/eshell/esh-mode.el | 7 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 2 | ||||
| -rw-r--r-- | lisp/ibuffer.el | 4 | ||||
| -rw-r--r-- | lisp/international/isearch-x.el | 1 | ||||
| -rw-r--r-- | lisp/mouse.el | 4 | ||||
| -rw-r--r-- | lisp/obsolete/fast-lock.el | 2 | ||||
| -rw-r--r-- | lisp/obsolete/longlines.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/antlr-mode.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/cperl-mode.el | 4 | ||||
| -rw-r--r-- | lisp/wid-edit.el | 9 |
10 files changed, 19 insertions, 20 deletions
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index 22ccf4e91f9..3df820d5956 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el | |||
| @@ -627,10 +627,11 @@ newline." | |||
| 627 | (let ((proc-running-p (and (eshell-interactive-process) | 627 | (let ((proc-running-p (and (eshell-interactive-process) |
| 628 | (not queue-p))) | 628 | (not queue-p))) |
| 629 | (inhibit-point-motion-hooks t) | 629 | (inhibit-point-motion-hooks t) |
| 630 | after-change-functions) | 630 | (inhibit-modification-hooks t)) |
| 631 | (unless (and proc-running-p | 631 | (unless (and proc-running-p |
| 632 | (not (eq (process-status | 632 | (not (eq (process-status |
| 633 | (eshell-interactive-process)) 'run))) | 633 | (eshell-interactive-process)) |
| 634 | 'run))) | ||
| 634 | (if (or proc-running-p | 635 | (if (or proc-running-p |
| 635 | (>= (point) eshell-last-output-end)) | 636 | (>= (point) eshell-last-output-end)) |
| 636 | (goto-char (point-max)) | 637 | (goto-char (point-max)) |
| @@ -697,7 +698,7 @@ This is done after all necessary filtering has been done." | |||
| 697 | (let ((oprocbuf (if process (process-buffer process) | 698 | (let ((oprocbuf (if process (process-buffer process) |
| 698 | (current-buffer))) | 699 | (current-buffer))) |
| 699 | (inhibit-point-motion-hooks t) | 700 | (inhibit-point-motion-hooks t) |
| 700 | after-change-functions) | 701 | (inhibit-modification-hooks t)) |
| 701 | (let ((functions eshell-preoutput-filter-functions)) | 702 | (let ((functions eshell-preoutput-filter-functions)) |
| 702 | (while (and functions string) | 703 | (while (and functions string) |
| 703 | (setq string (funcall (car functions) string)) | 704 | (setq string (funcall (car functions) string)) |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 5ede15b0538..13ed8c05809 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -8329,7 +8329,7 @@ From headers in the original article." | |||
| 8329 | (list message-hidden-headers) | 8329 | (list message-hidden-headers) |
| 8330 | message-hidden-headers)) | 8330 | message-hidden-headers)) |
| 8331 | (inhibit-point-motion-hooks t) | 8331 | (inhibit-point-motion-hooks t) |
| 8332 | (after-change-functions nil) | 8332 | (inhibit-modification-hooks t) |
| 8333 | (end-of-headers (point-min))) | 8333 | (end-of-headers (point-min))) |
| 8334 | (when regexps | 8334 | (when regexps |
| 8335 | (save-excursion | 8335 | (save-excursion |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 718471b7993..dc34a63aba9 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -2037,7 +2037,7 @@ the value of point at the beginning of the line for that buffer." | |||
| 2037 | (defun ibuffer-update-title-and-summary (format) | 2037 | (defun ibuffer-update-title-and-summary (format) |
| 2038 | (ibuffer-assert-ibuffer-mode) | 2038 | (ibuffer-assert-ibuffer-mode) |
| 2039 | ;; Don't do funky font-lock stuff here | 2039 | ;; Don't do funky font-lock stuff here |
| 2040 | (let ((after-change-functions nil)) | 2040 | (let ((inhibit-modification-hooks t)) |
| 2041 | (if (get-text-property (point-min) 'ibuffer-title) | 2041 | (if (get-text-property (point-min) 'ibuffer-title) |
| 2042 | (delete-region (point-min) | 2042 | (delete-region (point-min) |
| 2043 | (next-single-property-change | 2043 | (next-single-property-change |
| @@ -2244,7 +2244,7 @@ If optional arg SILENT is non-nil, do not display progress messages." | |||
| 2244 | (orig (count-lines (point-min) (point))) | 2244 | (orig (count-lines (point-min) (point))) |
| 2245 | ;; Inhibit font-lock caching tricks, since we're modifying the | 2245 | ;; Inhibit font-lock caching tricks, since we're modifying the |
| 2246 | ;; entire buffer at once | 2246 | ;; entire buffer at once |
| 2247 | (after-change-functions nil) | 2247 | (inhibit-modification-hooks t) |
| 2248 | (ext-loaded (featurep 'ibuf-ext)) | 2248 | (ext-loaded (featurep 'ibuf-ext)) |
| 2249 | (bgroups (if ext-loaded | 2249 | (bgroups (if ext-loaded |
| 2250 | (ibuffer-generate-filter-groups bmarklist) | 2250 | (ibuffer-generate-filter-groups bmarklist) |
diff --git a/lisp/international/isearch-x.el b/lisp/international/isearch-x.el index 31f841d7b56..92e55220375 100644 --- a/lisp/international/isearch-x.el +++ b/lisp/international/isearch-x.el | |||
| @@ -71,6 +71,7 @@ | |||
| 71 | 71 | ||
| 72 | (defun isearch-with-keyboard-coding () | 72 | (defun isearch-with-keyboard-coding () |
| 73 | (interactive) | 73 | (interactive) |
| 74 | ;; FIXME: What does this after-change-functions binding do here? | ||
| 74 | (let ((after-change-functions '(isearch-exit-recursive-edit))) | 75 | (let ((after-change-functions '(isearch-exit-recursive-edit))) |
| 75 | (recursive-edit)) | 76 | (recursive-edit)) |
| 76 | (exit-minibuffer)) | 77 | (exit-minibuffer)) |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 6584733a860..d6ce31a7a53 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -1111,12 +1111,12 @@ This does not delete the region; it acts like \\[kill-ring-save]." | |||
| 1111 | ;; Delete, but make the undo-list entry share with the kill ring. | 1111 | ;; Delete, but make the undo-list entry share with the kill ring. |
| 1112 | ;; First, delete just one char, so in case buffer is being modified | 1112 | ;; First, delete just one char, so in case buffer is being modified |
| 1113 | ;; for the first time, the undo list records that fact. | 1113 | ;; for the first time, the undo list records that fact. |
| 1114 | (let (before-change-functions after-change-functions) | 1114 | (let ((inhibit-modification-hooks t)) |
| 1115 | (delete-region beg | 1115 | (delete-region beg |
| 1116 | (+ beg (if (> end beg) 1 -1)))) | 1116 | (+ beg (if (> end beg) 1 -1)))) |
| 1117 | (let ((buffer-undo-list buffer-undo-list)) | 1117 | (let ((buffer-undo-list buffer-undo-list)) |
| 1118 | ;; Undo that deletion--but don't change the undo list! | 1118 | ;; Undo that deletion--but don't change the undo list! |
| 1119 | (let (before-change-functions after-change-functions) | 1119 | (let ((inhibit-modification-hooks t)) |
| 1120 | (primitive-undo 1 buffer-undo-list)) | 1120 | (primitive-undo 1 buffer-undo-list)) |
| 1121 | ;; Now delete the rest of the specified region, | 1121 | ;; Now delete the rest of the specified region, |
| 1122 | ;; but don't record it. | 1122 | ;; but don't record it. |
diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el index 7e3dd66a56a..3985d511eac 100644 --- a/lisp/obsolete/fast-lock.el +++ b/lisp/obsolete/fast-lock.el | |||
| @@ -200,7 +200,7 @@ | |||
| 200 | `(let* (,@(append varlist | 200 | `(let* (,@(append varlist |
| 201 | '((modified (buffer-modified-p)) (buffer-undo-list t) | 201 | '((modified (buffer-modified-p)) (buffer-undo-list t) |
| 202 | (inhibit-read-only t) (inhibit-point-motion-hooks t) | 202 | (inhibit-read-only t) (inhibit-point-motion-hooks t) |
| 203 | before-change-functions after-change-functions | 203 | (inhibit-modification-hooks t) |
| 204 | deactivate-mark buffer-file-name buffer-file-truename))) | 204 | deactivate-mark buffer-file-name buffer-file-truename))) |
| 205 | ,@body | 205 | ,@body |
| 206 | (when (and (not modified) (buffer-modified-p)) | 206 | (when (and (not modified) (buffer-modified-p)) |
diff --git a/lisp/obsolete/longlines.el b/lisp/obsolete/longlines.el index 01939daa709..7cb13ce600f 100644 --- a/lisp/obsolete/longlines.el +++ b/lisp/obsolete/longlines.el | |||
| @@ -143,7 +143,7 @@ newlines are indicated with a symbol." | |||
| 143 | 'longlines-window-change-function nil t)) | 143 | 'longlines-window-change-function nil t)) |
| 144 | (let ((buffer-undo-list t) | 144 | (let ((buffer-undo-list t) |
| 145 | (inhibit-read-only t) | 145 | (inhibit-read-only t) |
| 146 | (after-change-functions nil) | 146 | (inhibit-modification-hooks t) |
| 147 | (mod (buffer-modified-p)) | 147 | (mod (buffer-modified-p)) |
| 148 | buffer-file-name buffer-file-truename) | 148 | buffer-file-name buffer-file-truename) |
| 149 | ;; Turning off undo is OK since (spaces + newlines) is | 149 | ;; Turning off undo is OK since (spaces + newlines) is |
| @@ -184,7 +184,7 @@ newlines are indicated with a symbol." | |||
| 184 | (if longlines-showing | 184 | (if longlines-showing |
| 185 | (longlines-unshow-hard-newlines)) | 185 | (longlines-unshow-hard-newlines)) |
| 186 | (let ((buffer-undo-list t) | 186 | (let ((buffer-undo-list t) |
| 187 | (after-change-functions nil) | 187 | (inhibit-modification-hooks t) |
| 188 | (inhibit-read-only t) | 188 | (inhibit-read-only t) |
| 189 | buffer-file-name buffer-file-truename) | 189 | buffer-file-name buffer-file-truename) |
| 190 | (if longlines-decoded | 190 | (if longlines-decoded |
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index d59948e6447..2d9bd487bb9 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el | |||
| @@ -171,7 +171,7 @@ | |||
| 171 | (let ((buffer-undo-list t) (inhibit-read-only t) | 171 | (let ((buffer-undo-list t) (inhibit-read-only t) |
| 172 | ,@(unless (featurep 'xemacs) | 172 | ,@(unless (featurep 'xemacs) |
| 173 | '((inhibit-point-motion-hooks t) deactivate-mark)) | 173 | '((inhibit-point-motion-hooks t) deactivate-mark)) |
| 174 | before-change-functions after-change-functions | 174 | (inhibit-modification-hooks t) |
| 175 | buffer-file-name buffer-file-truename) | 175 | buffer-file-name buffer-file-truename) |
| 176 | ,@body) | 176 | ,@body) |
| 177 | (and (not ,modified) (buffer-modified-p) | 177 | (and (not ,modified) (buffer-modified-p) |
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index b8ba170a246..5da65084712 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el | |||
| @@ -3672,7 +3672,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3672 | is-REx is-x-REx REx-subgr-start REx-subgr-end was-subgr i2 hairy-RE | 3672 | is-REx is-x-REx REx-subgr-start REx-subgr-end was-subgr i2 hairy-RE |
| 3673 | (case-fold-search nil) (inhibit-read-only t) (buffer-undo-list t) | 3673 | (case-fold-search nil) (inhibit-read-only t) (buffer-undo-list t) |
| 3674 | (modified (buffer-modified-p)) overshoot is-o-REx name | 3674 | (modified (buffer-modified-p)) overshoot is-o-REx name |
| 3675 | (after-change-functions nil) | 3675 | (inhibit-modification-hooks t) |
| 3676 | (cperl-font-locking t) | 3676 | (cperl-font-locking t) |
| 3677 | (use-syntax-state (and cperl-syntax-state | 3677 | (use-syntax-state (and cperl-syntax-state |
| 3678 | (>= min (car cperl-syntax-state)))) | 3678 | (>= min (car cperl-syntax-state)))) |
| @@ -8882,7 +8882,7 @@ Delay of auto-help controlled by `cperl-lazy-help-time'." | |||
| 8882 | (defun cperl-font-lock-unfontify-region-function (beg end) | 8882 | (defun cperl-font-lock-unfontify-region-function (beg end) |
| 8883 | (let* ((modified (buffer-modified-p)) (buffer-undo-list t) | 8883 | (let* ((modified (buffer-modified-p)) (buffer-undo-list t) |
| 8884 | (inhibit-read-only t) (inhibit-point-motion-hooks t) | 8884 | (inhibit-read-only t) (inhibit-point-motion-hooks t) |
| 8885 | before-change-functions after-change-functions | 8885 | (inhibit-modification-hooks t) |
| 8886 | deactivate-mark buffer-file-name buffer-file-truename) | 8886 | deactivate-mark buffer-file-name buffer-file-truename) |
| 8887 | (remove-text-properties beg end '(face nil)) | 8887 | (remove-text-properties beg end '(face nil)) |
| 8888 | (if (and (not modified) (buffer-modified-p)) | 8888 | (if (and (not modified) (buffer-modified-p)) |
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index b64de4759d7..0d9157a5575 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -2654,8 +2654,7 @@ Return an alist of (TYPE MATCH)." | |||
| 2654 | (save-excursion | 2654 | (save-excursion |
| 2655 | (let ((children (widget-get widget :children)) | 2655 | (let ((children (widget-get widget :children)) |
| 2656 | (inhibit-read-only t) | 2656 | (inhibit-read-only t) |
| 2657 | before-change-functions | 2657 | (inhibit-modification-hooks t)) |
| 2658 | after-change-functions) | ||
| 2659 | (cond (before | 2658 | (cond (before |
| 2660 | (goto-char (widget-get before :entry-from))) | 2659 | (goto-char (widget-get before :entry-from))) |
| 2661 | (t | 2660 | (t |
| @@ -2679,8 +2678,7 @@ Return an alist of (TYPE MATCH)." | |||
| 2679 | (let ((buttons (copy-sequence (widget-get widget :buttons))) | 2678 | (let ((buttons (copy-sequence (widget-get widget :buttons))) |
| 2680 | button | 2679 | button |
| 2681 | (inhibit-read-only t) | 2680 | (inhibit-read-only t) |
| 2682 | before-change-functions | 2681 | (inhibit-modification-hooks t)) |
| 2683 | after-change-functions) | ||
| 2684 | (while buttons | 2682 | (while buttons |
| 2685 | (setq button (car buttons) | 2683 | (setq button (car buttons) |
| 2686 | buttons (cdr buttons)) | 2684 | buttons (cdr buttons)) |
| @@ -2691,8 +2689,7 @@ Return an alist of (TYPE MATCH)." | |||
| 2691 | (let ((entry-from (widget-get child :entry-from)) | 2689 | (let ((entry-from (widget-get child :entry-from)) |
| 2692 | (entry-to (widget-get child :entry-to)) | 2690 | (entry-to (widget-get child :entry-to)) |
| 2693 | (inhibit-read-only t) | 2691 | (inhibit-read-only t) |
| 2694 | before-change-functions | 2692 | (inhibit-modification-hooks t)) |
| 2695 | after-change-functions) | ||
| 2696 | (widget-delete child) | 2693 | (widget-delete child) |
| 2697 | (delete-region entry-from entry-to) | 2694 | (delete-region entry-from entry-to) |
| 2698 | (set-marker entry-from nil) | 2695 | (set-marker entry-from nil) |