X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/53baf48a6e99b5ff434d5177b00beda3fc9a8f71..cfbf790d80eaa399afceecd9a6c3e2e76bca59b0:/lisp/arc-mode.el diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index a97a052dc0..4fc04b706b 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -1,6 +1,7 @@ ;;; arc-mode.el --- simple editing of archives -;; Copyright (C) 1995, 1997-1998, 2001-2012 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997-1998, 2001-2013 Free Software Foundation, +;; Inc. ;; Author: Morten Welinder ;; Keywords: files archives msdog editing major-mode @@ -96,7 +97,7 @@ ;; ;; archive-mode-hook ;; archive-foo-mode-hook -;; archive-extract-hooks +;; archive-extract-hook ;;; Code: @@ -140,8 +141,10 @@ A local copy of the archive will be used when updating." :type 'regexp :group 'archive) -(defcustom archive-extract-hooks nil - "Hooks to run when an archive member has been extracted." +(define-obsolete-variable-alias 'archive-extract-hooks + 'archive-extract-hook "24.3") +(defcustom archive-extract-hook nil + "Hook run when an archive member has been extracted." :type 'hook :group 'archive) ;; ------------------------------ @@ -787,7 +790,8 @@ is visible (and the real data of the buffer is hidden). Optional argument SHUT-UP, if non-nil, means don't print messages when parsing the archive." (widen) - (let ((inhibit-read-only t)) + (let ((buffer-file-truename nil) ; avoid changing dir mtime by lock_file + (inhibit-read-only t)) (setq archive-proper-file-start (copy-marker (point-min) t)) (set (make-local-variable 'change-major-mode-hook) 'archive-desummarize) (or shut-up @@ -971,11 +975,6 @@ using `make-temp-file', and the generated name is returned." (save-excursion (funcall set-auto-coding-function filename (- (point-max) (point-min))))) - ;; dos-w32.el defines the function - ;; find-buffer-file-type-coding-system for DOS/Windows - ;; systems which preserves the coding-system of existing files. - ;; (That function is called via file-coding-system-alist.) - ;; Here, we want it to act as if the extracted file existed. ;; The following let-binding of file-name-handler-alist forces ;; find-file-not-found-set-buffer-file-coding-system to ignore ;; the file's name (see dos-w32.el). @@ -1077,7 +1076,7 @@ using `make-temp-file', and the generated name is returned." ;; We will write out the archive ourselves if it is ;; part of another archive. (remove-hook 'write-contents-functions 'archive-write-file t)) - (run-hooks 'archive-extract-hooks) + (run-hooks 'archive-extract-hook) (if archive-read-only (message "Note: altering this archive is not implemented.")))) (archive-maybe-update t))