]> git.eshelyaron.com Git - emacs.git/commitdiff
Set `find-file-not-found-functions', not `find-file-not-found-hooks'; use
authorJuanma Barranquero <lekktu@gmail.com>
Mon, 9 May 2005 00:34:58 +0000 (00:34 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Mon, 9 May 2005 00:34:58 +0000 (00:34 +0000)
`add-hook'.
(uncompress-while-visiting): Set `write-file-functions', not `write-file-hooks';
use `add-hook'.

lisp/obsolete/uncompress.el

index ac567be67b015fd711f20758daaa46e5e2a84687..28ad5f06c7b62fa3c79a1b89704b053bf3ea88dd 100644 (file)
@@ -83,14 +83,10 @@ It then selects a major mode from the uncompressed file name and contents."
   (goto-char (point-min))
   (message "Uncompressing...done")
   (set-buffer-modified-p nil)
-  (make-local-variable 'write-file-hooks)
-  (or (memq 'uncompress-backup-file write-file-hooks)
-      (setq write-file-hooks (cons 'uncompress-backup-file write-file-hooks)))
+  (add-hook 'write-file-functions 'uncompress-backup-file nil t)
   (normal-mode))
 
-(or (memq 'find-compressed-version find-file-not-found-hooks)
-    (setq find-file-not-found-hooks
-         (cons 'find-compressed-version find-file-not-found-hooks)))
+(add-hook 'find-file-not-found-functions 'find-compressed-version)
 
 (defun find-compressed-version ()
   "Hook to read and uncompress the compressed version of a file."