1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-24 10:38:38 +00:00

Replace uses of the obsolete local-write-file-hooks

* lisp/net/quickurl.el (quickurl-reread-hook-postfix):
* lisp/progmodes/ebrowse.el (ebrowse-tree-mode)
(ebrowse-write-file-hook-fn):
* lisp/progmodes/glasses.el (glasses-mode):
* lisp/progmodes/vhdl-mode.el (vhdl-write-file-hooks-init):
* lisp/vc/ediff-merg.el (ediff-set-merge-mode):
* lisp/vc/ediff-util.el (ediff-setup):
Replace local-write-file-hooks, obsolete since 22.1,
with write-file-functions.
This commit is contained in:
Glenn Morris 2018-03-08 20:03:13 -05:00
parent f0c590b857
commit cb0f634895
6 changed files with 9 additions and 9 deletions

View File

@ -155,7 +155,7 @@ could be used here."
(defconst quickurl-reread-hook-postfix
"
;; Local Variables:
;; eval: (progn (require 'quickurl) (add-hook 'local-write-file-hooks (lambda () (quickurl-read) nil)))
;; eval: (progn (require 'quickurl) (add-hook 'write-file-functions (lambda () (quickurl-read) nil) nil t))
;; End:
"
"Example `quickurl-postfix' text that adds a local variable to the

View File

@ -1107,7 +1107,7 @@ Tree mode key bindings:
(and tree (ebrowse-build-tree-obarray tree)))
(set (make-local-variable 'ebrowse--frozen-flag) nil)
(add-hook 'local-write-file-hooks 'ebrowse-write-file-hook-fn nil t)
(add-hook 'write-file-functions 'ebrowse-write-file-hook-fn nil t)
(modify-syntax-entry ?_ (char-to-string (char-syntax ?a)))
(when tree
(ebrowse-redraw-tree)
@ -4023,7 +4023,7 @@ If VIEW is non-nil, view else find source files."
(defun ebrowse-write-file-hook-fn ()
"Write current buffer as a class tree.
Installed on `local-write-file-hooks'."
Added to `write-file-functions'."
(ebrowse-save-tree)
t)

View File

@ -326,10 +326,10 @@ add virtual separators (like underscores) at places they belong to."
(if glasses-mode
(progn
(jit-lock-register 'glasses-change)
(add-hook 'local-write-file-hooks
(add-hook 'write-file-functions
'glasses-convert-to-unreadable nil t))
(jit-lock-unregister 'glasses-change)
(remove-hook 'local-write-file-hooks
(remove-hook 'write-file-functions
'glasses-convert-to-unreadable t)))))

View File

@ -4953,8 +4953,8 @@ Key bindings:
(defun vhdl-write-file-hooks-init ()
"Add/remove hooks when buffer is saved."
(if vhdl-modify-date-on-saving
(add-hook 'local-write-file-hooks 'vhdl-template-modify-noerror nil t)
(remove-hook 'local-write-file-hooks 'vhdl-template-modify-noerror t))
(add-hook 'write-file-functions 'vhdl-template-modify-noerror nil t)
(remove-hook 'write-file-functions 'vhdl-template-modify-noerror t))
(if (featurep 'xemacs) (make-local-hook 'after-save-hook))
(add-hook 'after-save-hook 'vhdl-add-modified-file nil t))

View File

@ -194,7 +194,7 @@ Buffer B."
(defun ediff-set-merge-mode ()
(normal-mode t)
(remove-hook 'local-write-file-hooks 'ediff-set-merge-mode))
(remove-hook 'write-file-functions 'ediff-set-merge-mode t))
;; Go over all diffs starting with DIFF-NUM and copy regions into buffer C

View File

@ -347,7 +347,7 @@ to invocation.")
(goto-char (point-min))
(funcall (ediff-with-current-buffer buf major-mode))
(widen) ; merge buffer is always widened
(add-hook 'local-write-file-hooks 'ediff-set-merge-mode nil t)
(add-hook 'write-file-functions 'ediff-set-merge-mode nil t)
)))
(setq buffer-read-only nil
ediff-buffer-A buffer-A