mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-24 10:38:38 +00:00
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.
This commit is contained in:
parent
e125dce50b
commit
166812addb
@ -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))
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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))
|
||||
|
@ -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.
|
||||
|
@ -200,7 +200,7 @@
|
||||
`(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))
|
||||
|
@ -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
|
||||
|
@ -171,7 +171,7 @@
|
||||
(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)
|
||||
|
@ -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))
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user