]> git.eshelyaron.com Git - emacs.git/commitdiff
Replace uses of the obsolete local-write-file-hooks
authorGlenn Morris <rgm@gnu.org>
Fri, 9 Mar 2018 01:03:13 +0000 (20:03 -0500)
committerGlenn Morris <rgm@gnu.org>
Fri, 9 Mar 2018 01:03:13 +0000 (20:03 -0500)
* 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.

lisp/net/quickurl.el
lisp/progmodes/ebrowse.el
lisp/progmodes/glasses.el
lisp/progmodes/vhdl-mode.el
lisp/vc/ediff-merg.el
lisp/vc/ediff-util.el

index abfca383e09da77b57c85083832308c809ceb7b4..a5ba26bcdc5e5bf93da2f773dfc88d585a472cf6 100644 (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
index ca64af5c915cf5da2d4de0e040b865da7e5f5ea3..08b1acd4da003fa61c60a9136f21b73de5b095ea 100644 (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)
 
index de176019a5788ce24deacc6966ba6a9cea7f6a43..c3e8ac35f32f4c2385709b830eb577a259aa9d5d 100644 (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)))))
 
 
index a841f87f3c3efb74a2aacc4a41e6842ebea386f8..f6cb2419de8dac8d1282e8ba84ff0c3d1a86fad3 100644 (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))
 
index ad72d7570c57d4d01f60987bc9c0b9205025f30b..b67f520ca070e1ba9c999e77f972d617d9ecbb4c 100644 (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
index 8670ba4603ff4669061f90bcb5cbe9e0f77dae01..be36273592b8b1c4db8a1d8700ef4a75ed715e3a 100644 (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