Commit 48039f4b authored by Matthew Leach's avatar Matthew Leach Committed by Eli Zaretskii

Fix bug #1702 with missing feature in arc-mode.el.

 lisp/arc-mode.el (archive-visit-single-files): New.
 (archive-mode): Visit file if archive contains a single file.
parent 1b351d46
2014-11-13 Matthew Leach <>
* arc-mode.el (archive-visit-single-files): New.
(archive-mode): Visit file if archive contains a single file.
2014-11-21 Ulrich Müller <>
* vc/vc.el: Fix a typo in the commentary.
......@@ -147,6 +147,15 @@ A local copy of the archive will be used when updating."
"Hook run when an archive member has been extracted."
:type 'hook
:group 'archive)
(defcustom archive-visit-single-files nil
"If non-nil, opening an archive with a single file visits that file.
If this option's value is nil, visiting such archives will
display the archive summary."
:type '(choice (const :tag "Visit the single file" t)
(const :tag "Show the archive summary" nil))
:group 'archive)
;; ------------------------------
;; Arc archive configuration
......@@ -742,7 +751,12 @@ archive.
(if (default-value 'enable-multibyte-characters)
(set-buffer-multibyte 'to))
(archive-summarize nil)
(setq buffer-read-only t))))
(setq buffer-read-only t)
(when (and archive-visit-single-files
(= (length archive-files) 1))
(rename-buffer (concat " " (buffer-name)))
;; Archive mode is suitable only for specially formatted data.
(put 'archive-mode 'mode-class 'special)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment