emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/cpio-mode 0976f38 49/61: Version 0.12β


From: Stefan Monnier
Subject: [elpa] externals/cpio-mode 0976f38 49/61: Version 0.12β
Date: Fri, 11 Jan 2019 15:25:35 -0500 (EST)

branch: externals/cpio-mode
commit 0976f38d0a02035b2aad79c8dc48a66e82c343fe
Author: dlewan <address@hidden>
Commit: GitHub <address@hidden>

    Version 0.12β
    
    Improved installation. The automatic setting of cpio-mode for files with 
the extension .cpio works again.
---
 Makefile.in            |  27 ++++++---
 cab-test.el            |  10 +++-
 configure.ac           |   4 +-
 cpio-bin.el            |   4 +-
 cpio-crc.el            |  37 ++++++------
 cpio-dired-crc-test.el |   9 ++-
 cpio-dired-odc-test.el |   9 ++-
 cpio-dired-test.el     |  27 ++++++++-
 cpio-dired.el          |  13 +++--
 cpio-modes-test.el     |  10 +++-
 cpio-newc.el           |  19 +++---
 cpio-odc.el            |   5 +-
 cpio.el                | 153 +++++++++++++++++++++++++++----------------------
 ttt.el                 |  27 +++++----
 14 files changed, 226 insertions(+), 128 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 9cd55bc..df1e2b2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,5 +1,5 @@
 # -*- mode: makefile; coding: utf-8 -*-
-#      $Id: Makefile.in,v 1.8 2018/11/29 01:57:14 doug Exp $   
+#      $Id: Makefile.in,v 1.9 2018/12/02 00:13:07 doug Exp $   
 
 # 
 # Copyright © 2013, 2014, 2015, 2016, 2017, 2018 
@@ -33,7 +33,7 @@ OFILES                =
 
 
 SHELLS         =       
-APP_FILES      =       cpio-bin.el                     \
+CPIO_FILES     =       cpio-bin.el                     \
                        cpio-crc.el                     \
                        cpio.el                         \
                        cpio-dired.el                   \
@@ -46,8 +46,12 @@ APP_FILES    =       cpio-bin.el                     \
                        cpio-tar.el                     \
                        cpio-ustar.el                   \
                        cpio-wanted.el
+SUPPORT_FILES  =       cpio-affiliated-buffers.el      \
+                       cpio-generic.el                 \
+                       cpio-modes.el
+APP_FILES      =       ${CPIO_FILES} ${SUPPORT_FILES}
 
-ELC_FILES      =       ${EL_FILES:.el=.elc}
+ELC_FILES      =       ${APP_FILES:.el=.elc}
 
 TEST_FILES     =       cab-test.el                     \
                        cpio-modes-test.el              \
@@ -56,11 +60,6 @@ TEST_FILES   =       cab-test.el                     \
                        cpio-dired-test.el              \
                        cpio-modes-test.el
 
-
-
-SUPPORT_FILES  =       cpio-affiliated-buffers.el      \
-                       cpio-generic.el                 \
-                       cpio-modes.el
 EL_FILES       =       ${APP_FILES} ${TEST_FILES} ${SUPPORT_FILES}
 LIB_FILES      =
 DOC_FILES      =
@@ -92,6 +91,7 @@ distdir               =       ${PACKAGE}-${PACKAGE_VERSION}
 bindir         =       ${prefix}/bin
 libdir         =       ${prefix}/lib
 lispdir                =       ${prefix}/share/emacs/lisp
+installdir     =       ${lispdir}/cpio
 docdir         =       @docdir@
 dvidir         =       @infodir@
 infodir                =       @infodir@
@@ -263,11 +263,20 @@ installcheck: check
 # Installation
 # 
 
-install:       check_gnu
+.PHONY:        install simple_install 
+install:       check_gnu uninstall ${ELC_FILES} installdirs
+       ${INSTALL} ${ELC_FILES} ${installdir}
+
+simple_install: check_gnu uninstall installdirs
+       ${INSTALL} ${APP_FILES} ${installdir}
+
+# ${ELC_FILES}:        elc
 
 installdirs:   check_gnu
+       test -d ${installdir} || mkdir -p ${installdir}
 
 uninstall:
+       rm -rf ${installdir}/*.el ${installdir}/*.elc
 
 install-html:
 install-dvi:
diff --git a/cab-test.el b/cab-test.el
index ed0738d..ddec263 100644
--- a/cab-test.el
+++ b/cab-test.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cab-text.el --- brief description
-;      $Id: cab-test.el,v 1.7 2018/11/29 01:57:14 doug Exp $   
+;      $Id: cab-test.el,v 1.8 2018/11/29 17:46:58 doug Exp $   
 
 ;; COPYRIGHT
 
@@ -52,7 +52,13 @@
 ;; Make the byte compiler happy.
 (defvar *cab-parent)
 (defvar *cab-subordinates*)
-
+(declare-function ert-set-test "/usr/share/emacs/24.5/lisp/emacs-lisp/ert.el")
+(declare-function ert--signal-should-execution 
"/usr/share/emacs/24.5/lisp/emacs-lisp/ert.el")
+(declare-function ert-fail "/usr/share/emacs/24.5/lisp/emacs-lisp/ert.el")
+(declare-function ert "/usr/share/emacs/24.5/lisp/emacs-lisp/ert.el")
+(declare-function cdmt-message "test-generic.el")
+;; EO making the byte compiler happy.
+;;;;;;;;;;;;;;;;
 
 ;; 
 ;; Vars
diff --git a/configure.ac b/configure.ac
index b2528e8..968efb9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-dnl    $Id: configure.ac,v 1.11 2018/11/29 02:17:39 doug Exp $ 
+dnl    $Id: configure.ac,v 1.13 2018/12/02 00:13:07 doug Exp $ 
 
 # 
 # Copyright © 2015, 2017, 2018 Douglas Lewan, address@hidden
@@ -20,7 +20,7 @@ dnl   $Id: configure.ac,v 1.11 2018/11/29 02:17:39 doug Exp $
 # 
 
 dnl Autoconf requirements
-AC_INIT(cpio-mode, 0.11β, address@hidden)
+AC_INIT(cpio-mode, 0.12β, address@hidden)
 AC_PREFIX_DEFAULT(${HOME}/local)
 dnl information on the package
 dnl checks for programs
diff --git a/cpio-bin.el b/cpio-bin.el
index b78c06b..56a1fe0 100644
--- a/cpio-bin.el
+++ b/cpio-bin.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-bin.el --- handle bin cpio entry header formats
-;      $Id: cpio-bin.el,v 1.11 2018/11/29 01:57:14 doug Exp $  
+;      $Id: cpio-bin.el,v 1.13 2018/12/02 00:13:07 doug Exp $  
 
 ;; COPYRIGHT
 ;; 
@@ -38,6 +38,7 @@
 ;; 
 (eval-when-compile
   (require 'bindat))
+(require 'bindat)
 
 ;;;;;;;;;;;;;;;;
 ;; Things to make the byte compiler happy.
@@ -527,4 +528,5 @@ once the TRAILER is written and padded."
 ;; 
 
 
+(provide 'cpio-bin)
 ;;; cpio-bin.el ends here.
diff --git a/cpio-crc.el b/cpio-crc.el
index facb9a3..b6035b7 100644
--- a/cpio-crc.el
+++ b/cpio-crc.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-crc.el --- handle crc cpio entry header formats
-;      $Id: cpio-crc.el,v 1.13 2018/11/29 01:57:14 doug Exp $  
+;      $Id: cpio-crc.el,v 1.14 2018/12/02 00:13:07 doug Exp $  
 
 ;; COPYRIGHT
 ;; 
@@ -36,19 +36,22 @@
 ;;
 ;; Dependencies
 ;; 
-(eval-when-compile
-  (condition-case err
-      (require 'cpio-generic)
-    (error 
-     (if (file-exists-p (concat default-directory "cpio-generic.elc"))
-        (load (concat default-directory "cpio-generic.elc"))
-       (load (concat default-directory "cpio-generic.el")))))
-  (condition-case err
-      (require 'cpio-newc)
-    (error
-     (if (file-exists-p (concat default-directory "cpio-newc.elc"))
-        (load (concat default-directory "cpio-newc.elc"))
-       (load (concat default-directory "cpio-newc.el"))))))
+
+;; (eval-when-compile
+;;   (condition-case err
+;;       (require 'cpio-generic)
+;;     (error 
+;;      (if (file-exists-p (concat default-directory "cpio-generic.elc"))
+;;      (load (concat default-directory "cpio-generic.elc"))
+;;        (load (concat default-directory "cpio-generic.el")))))
+;;   (condition-case err
+;;       (require 'cpio-newc)
+;;     (error
+;;      (if (file-exists-p (concat default-directory "cpio-newc.elc"))
+;;      (load (concat default-directory "cpio-newc.elc"))
+;;        (load (concat default-directory "cpio-newc.el"))))))
+
+(require 'cpio-newc)
 
 ;;;;;;;;;;;;;;;;
 ;; Things to make the byte compiler happy.
@@ -454,8 +457,8 @@ CAVEAT: This respects neither narrowing nor the point."
 
 ;; 
 ;; Commands
-;; 
-
-
+;;
+ 
 
+(provide 'cpio-crc)
 ;;; cpio-crc.el ends here.
diff --git a/cpio-dired-crc-test.el b/cpio-dired-crc-test.el
index a593fdb..70125ae 100644
--- a/cpio-dired-crc-test.el
+++ b/cpio-dired-crc-test.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-dired-crc-test.el --- brief description
-;      $Id: cpio-dired-crc-test.el,v 1.11 2018/11/29 01:57:15 doug Exp $       
+;      $Id: cpio-dired-crc-test.el,v 1.12 2018/11/29 17:46:58 doug Exp $       
 
 ;; COPYRIGHT
 
@@ -159,6 +159,10 @@
 (declare-function cpio-image-dired-tag-entries "cpio-dired.el")
 (declare-function cpio-mode "cpio.el")
 (declare-function cpio-view-dired-style-buffer "cpio-dired.el")
+(declare-function cdmt-global-sub "test-generic.el")
+(declare-function cdmt-reset "test-generic.el")
+(declare-function cdmt-tidy-up-catalog "test-generic.el")
+(declare-function cdmt-test-save "test-generic.el")
 ;; EO things for the byte compiler.
 ;;;;;;;;;;;;;;;;
 
@@ -174,8 +178,11 @@
   "A large archive used for testing.")
 (setq *cdmt-crc-large-archive* "test_data/alphabet/alphabet.crc.cpio")
 
+(defvar *cdmt-small-archive* *cdmt-crc-small-archive*)
 (setq *cdmt-small-archive* *cdmt-crc-small-archive*)
+(defvar *cdmt-large-archive* *cdmt-crc-large-archive*)
 (setq *cdmt-large-archive* *cdmt-crc-large-archive*)
+(defvar *cdmt-archive-format* "crc")
 (setq *cdmt-archive-format* "crc")
 
 (defvar *cdmt-crc-untouched-small-archive* "070702     (( magic    ))
diff --git a/cpio-dired-odc-test.el b/cpio-dired-odc-test.el
index f3aefdf..5cc41c0 100644
--- a/cpio-dired-odc-test.el
+++ b/cpio-dired-odc-test.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-dired-test.el --- Tests of cpio-dired-mode.
-;      $Id: cpio-dired-odc-test.el,v 1.9 2018/11/29 01:57:15 doug Exp $        
+;      $Id: cpio-dired-odc-test.el,v 1.10 2018/11/29 17:46:58 doug Exp $       
 
 ;; COPYRIGHT
 
@@ -179,6 +179,10 @@
 (declare-function cpio-image-dired-tag-entries "cpio-dired.el")
 (declare-function cpio-mode "cpio.el")
 (declare-function cpio-view-dired-style-buffer "cpio.el")
+(declare-function cdmt-global-sub "test-generic.el")
+(declare-function cdmt-reset "test-generic.el")
+(declare-function cdmt-test-save "test-generic.el")
+(declare-function cdmt-tidy-up-catalog "test-generic.el")
 ;; EO for the byte compiler.
 ;;;;;;;;;;;;;;;;
 
@@ -194,8 +198,11 @@
   "A large archive used for testing.")
 (setq *cdmt-odc-large-archive* "test_data/alphabet/alphabet.odc.cpio")
 
+(defvar *cdmt-small-archive* *cdmt-odc-small-archive*)
 (setq *cdmt-small-archive* *cdmt-odc-small-archive*)
+(defvar *cdmt-large-archive* *cdmt-odc-large-archive*)
 (setq *cdmt-large-archive* *cdmt-odc-large-archive*)
+(defvar *cdmt-archive-format* "odc")
 (setq *cdmt-archive-format* "odc")
 
 (defvar *cdmt-odc-untouched-small-archive* "070707     (( magic    ))
diff --git a/cpio-dired-test.el b/cpio-dired-test.el
index c0770fe..b7e0d96 100644
--- a/cpio-dired-test.el
+++ b/cpio-dired-test.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-dired-test.el --- Tests of cpio-dired-mode.
-;      $Id: cpio-dired-test.el,v 1.11 2018/11/29 01:57:15 doug Exp $   
+;      $Id: cpio-dired-test.el,v 1.12 2018/11/29 17:46:58 doug Exp $   
 
 ;; COPYRIGHT
 
@@ -51,7 +51,9 @@
 ;; 
 ;; Hacks
 ;; 
-(setq buffers (buffer-list))
+(defvar cdmt-buffers ()
+  "A list of the current set of buffers.")
+(setq cdmt-buffers (buffer-list))
 
 
 ;;
@@ -170,6 +172,10 @@
 (declare-function cpio-image-dired-tag-entries "cpio-dired.el")
 (declare-function cpio-mode "cpio.el")
 (declare-function cpio-view-dired-style-buffer "cpio-dired.el")
+(declare-function cdmt-reset "test-generic.el")
+(declare-function cdmt-tidy-up-catalog "test-generic.el")
+(declare-function cdmt-filter-archive-contents "test-generic.el")
+(declare-function cdmt-test-save "test-generic.el")
 ;; EO things for the byte compiler.
 ;;;;;;;;;;;;;;;;
 
@@ -185,8 +191,11 @@
   "A large archive used for testing.")
 (setq *cdmt-newc-large-archive* "test_data/alphabet/alphabet.newc.cpio")
 
+(defvar *cdmt-small-archive* *cdmt-newc-small-archive*)
 (setq *cdmt-small-archive* *cdmt-newc-small-archive*)
+(defvar *cdmt-large-archive* *cdmt-newc-large-archive*)
 (setq *cdmt-large-archive* *cdmt-newc-large-archive*)
+(defvar *cdmt-archive-format* "newc")
 (setq *cdmt-archive-format* "newc")
 
 (defvar *cdmt-newc-untouched-small-archive* "070701    (( magic    ))
@@ -6736,21 +6745,35 @@ TRAILER!!!      (( filename ))
 ")
 
 
+(defvar *cdmt-small-archive* *cdmt-newc-small-archive*)
 (setq *cdmt-small-archive* *cdmt-newc-small-archive*)
+(defvar *cdmt-large-archive* *cdmt-newc-large-archive*)
 (setq *cdmt-large-archive* *cdmt-newc-large-archive*)
+(defvar *cdmt-header-re* *cpio-newc-header-re*)
 (setq *cdmt-header-re* *cpio-newc-header-re*)
 
+(defvar *cpio-magic-re-idx* *cpio-newc-magic-re-idx*)
 (setq *cpio-magic-re-idx* *cpio-newc-magic-re-idx*)
+(defvar *cpio-mode-re-idx* *cpio-newc-mode-re-idx*)
 (setq *cpio-mode-re-idx* *cpio-newc-mode-re-idx*)
+(defvar *cpio-uid-re-idx* *cpio-newc-uid-re-idx*)
 (setq *cpio-uid-re-idx* *cpio-newc-uid-re-idx*)
+(defvar *cpio-gid-re-idx* *cpio-newc-gid-re-idx*)
 (setq *cpio-gid-re-idx* *cpio-newc-gid-re-idx*)
+(defvar *cpio-nlink-re-idx* *cpio-newc-nlink-re-idx*)
 (setq *cpio-nlink-re-idx* *cpio-newc-nlink-re-idx*)
+(defvar *cpio-mtime-re-idx* *cpio-newc-mtime-re-idx*)
 (setq *cpio-mtime-re-idx* *cpio-newc-mtime-re-idx*)
+(defvar *cpio-filesize-re-idx* *cpio-newc-filesize-re-idx*)
 (setq *cpio-filesize-re-idx* *cpio-newc-filesize-re-idx*)
+(defvar *cpio-namesize-re-idx* *cpio-newc-namesize-re-idx*)
 (setq *cpio-namesize-re-idx* *cpio-newc-namesize-re-idx*)
+(defvar *cpio-chksum-re-idx* *cpio-newc-chksum-re-idx*)
 (setq *cpio-chksum-re-idx* *cpio-newc-chksum-re-idx*)
+(defvar *cpio-filename-re-idx* *cpio-newc-filename-re-idx*)
 (setq *cpio-filename-re-idx* *cpio-newc-filename-re-idx*)
 
+(defvar *cdmt-archive-format* "newc")
 (setq *cdmt-archive-format* "newc")
 
 
diff --git a/cpio-dired.el b/cpio-dired.el
index 45a2aa8..891416f 100644
--- a/cpio-dired.el
+++ b/cpio-dired.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-dired.el --- UI definition à la dired.
-;      $Id: cpio-dired.el,v 1.14 2018/11/29 01:57:15 doug Exp $        
+;      $Id: cpio-dired.el,v 1.15 2018/11/29 17:46:58 doug Exp $        
 
 ;; COPYRIGHT
 
@@ -98,9 +98,14 @@ Keep any preceding comments."
 ;;
 ;; Dependencies
 ;; 
+
 (eval-when-compile
-  (require 'dired-aux))
+  (require 'dired))
+(require 'dired)
 
+(eval-when-compile
+  (require 'dired-aux))
+(require 'dired-aux)
 
 ;; 
 ;; Vars
@@ -1821,7 +1826,7 @@ significance for `dired-do-shell-command', and are passed 
through
 normally to the shell, but you must confirm first.
 
 If you want to use `*' as a shell wildcard with whitespace around
-it, write `*""' in place of just `*'.  This is equivalent to just
+it, write `*\"\"' in place of just `*'.  This is equivalent to just
 `*' in the shell, but avoids Dired's special handling.
 
 If COMMAND ends in `&', `;', or `;&', it is executed in the
@@ -1915,7 +1920,7 @@ See function `dired-do-rename-regexp' for more info."
               (cpio-set-mtime (cpio-entry-attrs entry) time)
               (cpio-dired-replace-dired-line entry))
             (setq human-timestamp nil))
-           ((y-or-n-p (format "[[%s]] looks ambiguous. Try again?"))
+           ((y-or-n-p (format "[[%s]] looks ambiguous. Try again?" time))
             (setq human-timestamp (read-from-minibuffer prompt)))
            (t (setq human-timestamp nil))))
     (cpio-dired-set-modified)))
diff --git a/cpio-modes-test.el b/cpio-modes-test.el
index 2aa26d9..8d3f5a5 100644
--- a/cpio-modes-test.el
+++ b/cpio-modes-test.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-modes-test.el --- tests of the code in cpio-modes.el.
-;      $Id: cpio-modes-test.el,v 1.5 2018/11/29 01:57:15 doug Exp $    
+;      $Id: cpio-modes-test.el,v 1.6 2018/11/29 17:46:58 doug Exp $    
 
 ;; COPYRIGHT
 ;; 
@@ -40,6 +40,14 @@
   (require 'ert))
 (load (concat default-directory "cpio-modes.el"))
 
+;;;;;;;;;;;;;;;;
+;; Make the byte compiler happy.
+(declare-function ert-set-test "/usr/share/emacs/24.5/lisp/emacs-lisp/ert.el")
+(declare-function ert--signal-should-execution 
"/usr/share/emacs/24.5/lisp/emacs-lisp/ert.el")
+(declare-function ert-fail "/usr/share/emacs/24.5/lisp/emacs-lisp/ert.el")
+(declare-function ert "/usr/share/emacs/24.5/lisp/emacs-lisp/ert.el")
+;; EO making the byte compiler happy.
+;;;;;;;;;;;;;;;;
 
 ;; 
 ;; Vars
diff --git a/cpio-newc.el b/cpio-newc.el
index e653bb7..f8a399c 100644
--- a/cpio-newc.el
+++ b/cpio-newc.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-newc.el --- handle portable SVR4 cpio entry header formats.
-;      $Id: cpio-newc.el,v 1.15 2018/11/29 01:57:15 doug Exp $ 
+;      $Id: cpio-newc.el,v 1.17 2018/12/02 00:13:07 doug Exp $ 
 
 ;; COPYRIGHT
 ;; 
@@ -53,12 +53,17 @@
 ;;
 ;; Dependencies
 ;; 
-(condition-case err
-    (require 'cpio-generic)
-    (error
-     (if (file-exists-p (concat default-directory "cpio-generic.elc"))
-        (load-file (concat default-directory "cpio-generic.elc"))
-       (load-file (concat default-directory "cpio-generic.el")))))
+(eval-when-compile
+  (require 'cl))
+(unless (featurep 'cl)
+  (require 'cl))
+
+;; (condition-case err
+;;     (require 'cpio-generic)
+;;     (error
+;;      (if (file-exists-p (concat default-directory "cpio-generic.elc"))
+;;      (load-file (concat default-directory "cpio-generic.elc"))
+;;        (load-file (concat default-directory "cpio-generic.el")))))
 
 ;;;;;;;;;;;;;;;;
 ;; Things to make the byte compiler happy.
diff --git a/cpio-odc.el b/cpio-odc.el
index 3765dab..c448c9d 100644
--- a/cpio-odc.el
+++ b/cpio-odc.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio-odc.el --- handle old portable cpio entry header format
-;      $Id: cpio-odc.el,v 1.11 2018/11/29 01:57:15 doug Exp $  
+;      $Id: cpio-odc.el,v 1.12 2018/12/02 00:13:07 doug Exp $  
 
 ;; COPYRIGHT
 ;; 
@@ -37,7 +37,8 @@
 ;;
 ;; Dependencies
 ;; 
-(load-file (concat default-directory "cpio-generic.el"))
+
+;; (load-file (concat default-directory "cpio-generic.el"))
 
 ;;;;;;;;;;;;;;;;
 ;; Things to make the byte compiler happy.
diff --git a/cpio.el b/cpio.el
index 7d4127d..61eb89f 100644
--- a/cpio.el
+++ b/cpio.el
@@ -1,6 +1,6 @@
 ;; -*- coding: utf-8 -*-
 ;;; cpio.el --- cpio-mode for emacs
-;      $Id: cpio.el,v 1.17 2018/11/29 01:57:16 doug Exp $      
+;      $Id: cpio.el,v 1.19 2018/12/02 00:13:07 doug Exp $      
 
 ;; COPYRIGHT 2015, 2017, 2018 Douglas Lewan, address@hidden
 ;; All rights reserved.
@@ -242,65 +242,82 @@
 
 
 ;; During development I need access to local files.
-(setq load-path (add-to-list 'load-path (substring default-directory -1)))
 
-(eval-when-compile
+;; (setq load-path (add-to-list 'load-path (substring default-directory -1)))
+
+;; (require 'dired)
+;; (if (file-exists-p (concat default-directory "cpio-generic.elc"))
+;;     (load (concat default-directory "cpio-generic.elc"))
+;;   (load (concat default-directory "cpio-generic.el")))
+;; (if (file-exists-p (concat default-directory "cpio-modes.elc"))
+;;     (load (concat default-directory "cpio-modes.elc"))
+;;   (load (concat default-directory "cpio-modes.el")))
+;; (if (file-exists-p (concat default-directory "cpio-affiliated-buffers.elc"))
+;;     (load (concat default-directory "cpio-affiliated-buffers.elc"))
+;;   (load (concat default-directory "cpio-affiliated-buffers.el")))
+;; (if (file-exists-p (concat default-directory "cpio-bin.elc"))
+;;     (load (concat default-directory "cpio-bin.elc"))
+;;   (load (concat default-directory "cpio-bin.el")))
+;; newc has to precede crc.
+;; (if (file-exists-p (concat default-directory "cpio-newc.elc"))
+;;     (load (concat default-directory "cpio-newc.elc"))
+;;   (load (concat default-directory "cpio-newc.el")))
+;; (if (file-exists-p (concat default-directory "cpio-crc.elc"))
+;;     (load (concat default-directory "cpio-crc.elc"))
+;;   (load (concat default-directory "cpio-crc.el")))
+;; (if (file-exists-p (concat default-directory "cpio-hpbin.elc"))
+;;     (load (concat default-directory "cpio-hpbin.elc"))
+;;   (load (concat default-directory "cpio-hpbin.el")))
+;; (if (file-exists-p (concat default-directory "cpio-hpodc.elc"))
+;;     (load (concat default-directory "cpio-hpodc.elc"))
+;;   (load (concat default-directory "cpio-hpodc.el")))
+;; (if (file-exists-p (concat default-directory "cpio-odc.elc"))
+;;     (load (concat default-directory "cpio-odc.elc"))
+;;   (load (concat default-directory "cpio-odc.el")))
+;; (if (file-exists-p (concat default-directory "cpio-dired.elc"))
+;;     (load (concat default-directory "cpio-dired.elc"))
+;;   (load (concat default-directory "cpio-dired.el")))
+;; (if (file-exists-p (concat default-directory 
"cpio-entry-contents-mode.elc"))
+;;     (load (concat default-directory "cpio-entry-contents-mode.elc"))
+;;   (load (concat default-directory "cpio-entry-contents-mode.el")))
+
+(unless (featurep 'dired)
   (require 'dired))
 
-;; (require 'cpio-generic)
-(if (file-exists-p (concat default-directory "cpio-generic.elc"))
-    (load (concat default-directory "cpio-generic.elc"))
-  (load (concat default-directory "cpio-generic.el")))
-;; (require 'cpio-modes)
-(if (file-exists-p (concat default-directory "cpio-modes.elc"))
-    (load (concat default-directory "cpio-modes.elc"))
-  (load (concat default-directory "cpio-modes.el")))
-;; (require 'cpio-affiliated-buffers)
-(if (file-exists-p (concat default-directory "cpio-affiliated-buffers.elc"))
-    (load (concat default-directory "cpio-affiliated-buffers.elc"))
-  (load (concat default-directory "cpio-affiliated-buffers.el")))
-
-
-;; (require 'cpio-bin)
-(if (file-exists-p (concat default-directory "cpio-bin.elc"))
-    (load (concat default-directory "cpio-bin.elc"))
-  (load (concat default-directory "cpio-bin.el")))
-;; newc has to precede crc.
-;; (require 'cpio-newc)
-(if (file-exists-p (concat default-directory "cpio-newc.elc"))
-    (load (concat default-directory "cpio-newc.elc"))
-  (load (concat default-directory "cpio-newc.el")))
-;; (require 'cpio-crc)
-(if (file-exists-p (concat default-directory "cpio-crc.elc"))
-    (load (concat default-directory "cpio-crc.elc"))
-  (load (concat default-directory "cpio-crc.el")))
-;; (require 'cpio-hpbin)
-(if (file-exists-p (concat default-directory "cpio-hpbin.elc"))
-    (load (concat default-directory "cpio-hpbin.elc"))
-  (load (concat default-directory "cpio-hpbin.el")))
-;; (require 'cpio-hpodc)
-(if (file-exists-p (concat default-directory "cpio-hpodc.elc"))
-    (load (concat default-directory "cpio-hpodc.elc"))
-  (load (concat default-directory "cpio-hpodc.el")))
-;; (require 'cpio-odc)
-(if (file-exists-p (concat default-directory "cpio-odc.elc"))
-    (load (concat default-directory "cpio-odc.elc"))
-  (load (concat default-directory "cpio-odc.el")))
-;; (require 'cpio-tar)
-;; (require 'cpio-ustar)
-
-;; (require 'cpio-wanted)
-(if (file-exists-p (concat default-directory "cpio-wanted.elc"))
-    (load (concat default-directory "cpio-wanted.elc"))
-  (load (concat default-directory "cpio-wanted.el")))
-;; (require 'cpio-dired)
-(if (file-exists-p (concat default-directory "cpio-dired.elc"))
-    (load (concat default-directory "cpio-dired.elc"))
-  (load (concat default-directory "cpio-dired.el")))
-;; (require 'cpio-entry-contents-mode)
-(if (file-exists-p (concat default-directory "cpio-entry-contents-mode.elc"))
-    (load (concat default-directory "cpio-entry-contents-mode.elc"))
-  (load (concat default-directory "cpio-entry-contents-mode.el")))
+(unless (featurep 'cpio-generic)
+  (require 'cpio-generic))
+(unless (featurep 'cpio-modes)
+  (require 'cpio-modes))
+
+(unless (featurep 'cpio-affiliated-buffers)
+  (require 'cpio-affiliated-buffers))
+
+(unless (featurep 'cpio-bin)
+  (require 'cpio-bin))
+;; While I like things to be alphabetical, newc /must/ precede crc.
+(unless (featurep 'cpio-newc)
+  (require 'cpio-newc))
+(unless (featurep 'cpio-crc)
+  (require 'cpio-crc))
+(unless (featurep 'cpio-hpbin)
+  (require 'cpio-hpbin))
+(unless (featurep 'cpio-hpodc)
+  (require 'cpio-hpodc))
+(unless (featurep 'cpio-odc)
+  (require 'cpio-odc))
+(unless (featurep 'cpio-dired)
+  (require 'cpio-dired))
+(unless (featurep 'cpio-entry-contents-mode)
+  (require 'cpio-entry-contents-mode))
+
+;; Formats not supported:
+;;   (require 'cpio-tar)
+;;   (require 'cpio-ustar)
+;; Obsolete files:
+;;   (require 'cpio-wanted)
+;;   (if (file-exists-p (concat default-directory "cpio-wanted.elc"))
+;;       (load (concat default-directory "cpio-wanted.elc"))
+;;     (load (concat default-directory "cpio-wanted.el")))
 
 ;;;;;;;;;;;;;;;;
 ;; Things to make the byte compiler happy.
@@ -338,7 +355,7 @@
 (defvar *cpio-uid-parsed-idx*)
 (defvar cpio-entry-name)
 (defvar cpio-try-names)
-(declare-function cpio-contents-buffer-name "cpio-dired.el")
+;;;; (declare-function cpio-contents-buffer-name "cpio-dired.el")
 (declare-function cpio-dired-buffer-name "cpio-dired.el")
 (declare-function cpio-dired-move-to-first-entry "cpio-dired.el")
 (declare-function cpio-dired-next-line "cpio-dired.el")
@@ -827,7 +844,7 @@ CAVEAT: See `cpio-magic'."
   "Return the end of the unpadded header specified in ENTRY."
   (let ((fname "cpio-entry-header-end")
        (attrs (aref entry *cpio-catalog-entry-attrs-idx*)))
-    (+ (cpio-entry-header-start entry) *cpio-header-length* (cpio-name-size 
attrs))
+    (+ (cpio-entry-header-start entry) *cpio-header-length* (cpio-namesize 
attrs))
     ))
 
 (defun cpio-entry-contents-start (entry)
@@ -1591,15 +1608,15 @@ use \"coding: 'raw-text\" instead."
          (make-local-variable 'enable-character-translation)
          (setq enable-character-translation nil))
        (if coding-system
-           (cons coding-system :coding))))
-      ;; Finally, try all the `auto-coding-functions'.
-      (let ((funcs auto-coding-functions)
-           (coding-system nil))
-       (while (and funcs (not coding-system))
-         (setq coding-system (ignore-errors
-                               (save-excursion
-                                 (goto-char (point-min))
-                                 (funcall (pop funcs) size)))))
+           (cons coding-system :coding)))
+       ;; Finally, try all the `auto-coding-functions'.
+       (let ((funcs auto-coding-functions)
+             (coding-system nil))
+         (while (and funcs (not coding-system))
+           (setq coding-system (ignore-errors
+                                 (save-excursion
+                                   (goto-char (point-min))
+                                   (funcall (pop funcs) size))))))
        (if coding-system
            (cons coding-system 'auto-coding-functions)))))
 
diff --git a/ttt.el b/ttt.el
index dbad181..b10c347 100644
--- a/ttt.el
+++ b/ttt.el
@@ -1,4 +1,4 @@
-;      $Id: ttt.el,v 1.2 2018/11/29 01:57:16 doug Exp $        
+;      $Id: ttt.el,v 1.4 2018/12/02 00:13:07 doug Exp $        
 
 ;;
 ;; Eval this buffer to run lots of tests against cpio-mode.
@@ -12,16 +12,21 @@
          (sort (mapcar (lambda (le)
                          (cons (random) le))
                        ltr)
-               '(lambda (l r)
-                  (cond ((< (car l) (car r))
-                         t)
-                        (t
-                         nil))))))
+               (lambda (l r)
+                 (cond ((< (car l) (car r))
+                        t)
+                       (t
+                        nil))))))
+
+(defvar ttt-buffers)
+(setq ttt-buffers (list "cab-test.el" "cpio-dired-bin-test.el" 
"cpio-dired-crc-test.el" "cpio-dired-odc-test.el" "cpio-dired-test.el"))
+(mapc 'find-file-noselect ttt-buffers)
+(setq ttt-buffers (randomize-list (append ttt-buffers ttt-buffers ttt-buffers 
ttt-buffers ttt-buffers ttt-buffers ttt-buffers ttt-buffers)))
+(setq ttt-buffers (randomize-list ttt-buffers))
+
+(shell-command "make clean" "*clean*")
+(shell-command "make elc" "*elc*")
 
-(setq buffers (list "cab-test.el" "cpio-dired-bin-test.el" 
"cpio-dired-crc-test.el" "cpio-dired-odc-test.el" "cpio-dired-test.el"))
-(mapc 'find-file-noselect buffers)
-(setq buffers (randomize-list (append buffers buffers buffers buffers buffers 
buffers buffers buffers)))
-(setq buffers (randomize-list buffers))
 ;; (mapc 'eval-buffer b)
 (let ((ct 0))
   (mapc (lambda (b)
@@ -30,5 +35,5 @@
            (rename-buffer (format "*ert*<%d>" ct)))
          (setq ct (1+ ct))
          (sit-for 2.0))
-       buffers))
+       ttt-buffers))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]