OSDN Git Service

Use car-safe to typecheck.
authorDaiki Ueno <ueno@unixuser.org>
Mon, 30 Oct 2006 12:49:13 +0000 (12:49 +0000)
committerDaiki Ueno <ueno@unixuser.org>
Mon, 30 Oct 2006 12:49:13 +0000 (12:49 +0000)
epg.el

diff --git a/epg.el b/epg.el
index 87e8c5c..dc54370 100644 (file)
--- a/epg.el
+++ b/epg.el
 
 (defun epg-data-file (data)
   "Return the file of DATA."
-  (unless (eq (car data) 'epg-data)
+  (unless (eq (car-safe data) 'epg-data)
     (signal 'wrong-type-argument (list 'epg-data-p data)))
   (aref (cdr data) 0))
 
 (defun epg-data-string (data)
   "Return the string of DATA."
-  (unless (eq (car data) 'epg-data)
+  (unless (eq (car-safe data) 'epg-data)
     (signal 'wrong-type-argument (list 'epg-data-p data)))
   (aref (cdr data) 1))
 
 
 (defun epg-context-protocol (context)
   "Return the protocol used within CONTEXT."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aref (cdr context) 0))
 
 (defun epg-context-armor (context)
   "Return t if the output shouled be ASCII armored in CONTEXT."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aref (cdr context) 1))
 
 (defun epg-context-textmode (context)
   "Return t if canonical text mode should be used in CONTEXT."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aref (cdr context) 2))
 
 (defun epg-context-include-certs (context)
   "Return how many certificates should be included in an S/MIME signed
 message."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aref (cdr context) 3))
 
 (defun epg-context-cipher-algorithm (context)
   "Return the cipher algorithm in CONTEXT."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aref (cdr context) 4))
 
 (defun epg-context-digest-algorithm (context)
   "Return the digest algorithm in CONTEXT."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aref (cdr context) 5))
 
 (defun epg-context-compress-algorithm (context)
   "Return the compress algorithm in CONTEXT."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aref (cdr context) 6))
 
 (defun epg-context-passphrase-callback (context)
   "Return the function used to query passphrase."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aref (cdr context) 7))
 
 (defun epg-context-progress-callback (context)
   "Return the function which handles progress update."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aref (cdr context) 8))
 
 (defun epg-context-signers (context)
   "Return the list of key-id for singning."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aref (cdr context) 9))
 
 (defun epg-context-process (context)
   "Return the process object of `epg-gpg-program'.
 This function is for internal use only."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aref (cdr context) 10))
 
 (defun epg-context-output-file (context)
   "Return the output file of `epg-gpg-program'.
 This function is for internal use only."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aref (cdr context) 11))
 
 (defun epg-context-result (context)
   "Return the result of the previous cryptographic operation."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aref (cdr context) 12))
 
 (defun epg-context-operation (context)
   "Return the name of the current cryptographic operation."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aref (cdr context) 13))
 
 (defun epg-context-set-protocol (context protocol)
   "Set the protocol used within CONTEXT."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 0 protocol))
 
 (defun epg-context-set-armor (context armor)
   "Specify if the output shouled be ASCII armored in CONTEXT."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 1 armor))
 
 (defun epg-context-set-textmode (context textmode)
   "Specify if canonical text mode should be used in CONTEXT."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 2 textmode))
 
 (defun epg-context-set-include-certs (context include-certs)
  "Set how many certificates should be included in an S/MIME signed message."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 3 include-certs))
 
 (defun epg-context-set-cipher-algorithm (context cipher-algorithm)
  "Set the cipher algorithm in CONTEXT."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 4 cipher-algorithm))
 
 (defun epg-context-set-digest-algorithm (context digest-algorithm)
  "Set the digest algorithm in CONTEXT."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 5 digest-algorithm))
 
 (defun epg-context-set-compress-algorithm (context compress-algorithm)
  "Set the compress algorithm in CONTEXT."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 6 compress-algorithm))
 
 (defun epg-context-set-passphrase-callback (context
                                                 passphrase-callback)
   "Set the function used to query passphrase."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 7 passphrase-callback))
 
 (defun epg-context-set-progress-callback (context progress-callback)
   "Set the function which handles progress update."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 8 progress-callback))
 
 (defun epg-context-set-signers (context signers)
  "Set the list of key-id for singning."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 9 signers))
 
 (defun epg-context-set-process (context process)
   "Set the process object of `epg-gpg-program'.
 This function is for internal use only."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 10 process))
 
 (defun epg-context-set-output-file (context output-file)
   "Set the output file of `epg-gpg-program'.
 This function is for internal use only."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 11 output-file))
 
 (defun epg-context-set-result (context result)
   "Set the result of the previous cryptographic operation."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 12 result))
 
 (defun epg-context-set-operation (context operation)
   "Set the name of the current cryptographic operation."
-  (unless (eq (car context) 'epg-context)
+  (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 13 operation))
 
@@ -369,121 +369,121 @@ This function is for internal use only."
 
 (defun epg-signature-status (signature)
   "Return the status code of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aref (cdr signature) 0))
 
 (defun epg-signature-key-id (signature)
   "Return the key-id of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aref (cdr signature) 1))
 
 (defun epg-signature-validity (signature)
   "Return the validity of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aref (cdr signature) 2))
 
 (defun epg-signature-fingerprint (signature)
   "Return the fingerprint of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aref (cdr signature) 3))
 
 (defun epg-signature-creation-time (signature)
   "Return the creation time of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aref (cdr signature) 4))
 
 (defun epg-signature-expiration-time (signature)
   "Return the expiration time of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aref (cdr signature) 5))
 
 (defun epg-signature-pubkey-algorithm (signature)
   "Return the public key algorithm of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aref (cdr signature) 6))
 
 (defun epg-signature-digest-algorithm (signature)
   "Return the digest algorithm of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aref (cdr signature) 7))
 
 (defun epg-signature-class (signature)
   "Return the class of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aref (cdr signature) 8))
 
 (defun epg-signature-version (signature)
   "Return the version of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aref (cdr signature) 9))
 
 (defun epg-signature-set-status (signature status)
  "Set the status code of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aset (cdr signature) 0 status))
 
 (defun epg-signature-set-key-id (signature key-id)
  "Set the key-id of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aset (cdr signature) 1 key-id))
 
 (defun epg-signature-set-validity (signature validity)
  "Set the validity of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aset (cdr signature) 2 validity))
 
 (defun epg-signature-set-fingerprint (signature fingerprint)
  "Set the fingerprint of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aset (cdr signature) 3 fingerprint))
 
 (defun epg-signature-set-creation-time (signature creation-time)
   "Set the creation time of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aset (cdr signature) 4 creation-time))
 
 (defun epg-signature-set-expiration-time (signature expiration-time)
   "Set the expiration time of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aset (cdr signature) 5 expiration-time))
 
 (defun epg-signature-set-pubkey-algorithm (signature pubkey-algorithm)
   "Set the public key algorithm of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aset (cdr signature) 6 pubkey-algorithm))
 
 (defun epg-signature-set-digest-algorithm (signature digest-algorithm)
   "Set the digest algorithm of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aset (cdr signature) 7 digest-algorithm))
 
 (defun epg-signature-set-class (signature class)
   "Set the class of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aset (cdr signature) 8 class))
 
 (defun epg-signature-set-version (signature version)
   "Set the version of SIGNATURE."
-  (unless (eq (car signature) 'epg-signature)
+  (unless (eq (car-safe signature) 'epg-signature)
     (signal 'wrong-type-argument (list 'epg-signature-p signature)))
   (aset (cdr signature) 9 version))
 
@@ -495,37 +495,37 @@ This function is for internal use only."
 
 (defun epg-new-signature-type (new-signature)
   "Return the type of NEW-SIGNATURE."
-  (unless (eq (car new-signature) 'epg-new-signature)
+  (unless (eq (car-safe new-signature) 'epg-new-signature)
     (signal 'wrong-type-argument (list 'epg-new-signature-p new-signature)))
   (aref (cdr new-signature) 0))
 
 (defun epg-new-signature-pubkey-algorithm (new-signature)
   "Return the public key algorithm of NEW-SIGNATURE."
-  (unless (eq (car new-signature) 'epg-new-signature)
+  (unless (eq (car-safe new-signature) 'epg-new-signature)
     (signal 'wrong-type-argument (list 'epg-new-signature-p new-signature)))
   (aref (cdr new-signature) 1))
 
 (defun epg-new-signature-digest-algorithm (new-signature)
   "Return the digest algorithm of NEW-SIGNATURE."
-  (unless (eq (car new-signature) 'epg-new-signature)
+  (unless (eq (car-safe new-signature) 'epg-new-signature)
     (signal 'wrong-type-argument (list 'epg-new-signature-p new-signature)))
   (aref (cdr new-signature) 2))
 
 (defun epg-new-signature-class (new-signature)
   "Return the class of NEW-SIGNATURE."
-  (unless (eq (car new-signature) 'epg-new-signature)
+  (unless (eq (car-safe new-signature) 'epg-new-signature)
     (signal 'wrong-type-argument (list 'epg-new-signature-p new-signature)))
   (aref (cdr new-signature) 3))
 
 (defun epg-new-signature-creation-time (new-signature)
   "Return the creation time of NEW-SIGNATURE."
-  (unless (eq (car new-signature) 'epg-new-signature)
+  (unless (eq (car-safe new-signature) 'epg-new-signature)
     (signal 'wrong-type-argument (list 'epg-new-signature-p new-signature)))
   (aref (cdr new-signature) 4))
 
 (defun epg-new-signature-fingerprint (new-signature)
   "Return the fingerprint of NEW-SIGNATURE."
-  (unless (eq (car new-signature) 'epg-new-signature)
+  (unless (eq (car-safe new-signature) 'epg-new-signature)
     (signal 'wrong-type-argument (list 'epg-new-signature-p new-signature)))
   (aref (cdr new-signature) 5))
 
@@ -535,31 +535,31 @@ This function is for internal use only."
 
 (defun epg-key-owner-trust (key)
   "Return the owner trust of KEY."
-  (unless (eq (car key) 'epg-key)
+  (unless (eq (car-safe key) 'epg-key)
     (signal 'wrong-type-argument (list 'epg-key-p key)))
   (aref (cdr key) 0))
 
 (defun epg-key-sub-key-list (key)
   "Return the sub key list of KEY."
-  (unless (eq (car key) 'epg-key)
+  (unless (eq (car-safe key) 'epg-key)
     (signal 'wrong-type-argument (list 'epg-key-p key)))
   (aref (cdr key) 1))
 
 (defun epg-key-user-id-list (key)
   "Return the user ID list of KEY."
-  (unless (eq (car key) 'epg-key)
+  (unless (eq (car-safe key) 'epg-key)
     (signal 'wrong-type-argument (list 'epg-key-p key)))
   (aref (cdr key) 2))
 
 (defun epg-key-set-sub-key-list (key sub-key-list)
   "Set the sub key list of KEY."
-  (unless (eq (car key) 'epg-key)
+  (unless (eq (car-safe key) 'epg-key)
     (signal 'wrong-type-argument (list 'epg-key-p key)))
   (aset (cdr key) 1 sub-key-list))
 
 (defun epg-key-set-user-id-list (key user-id-list)
   "Set the user ID list of KEY."
-  (unless (eq (car key) 'epg-key)
+  (unless (eq (car-safe key) 'epg-key)
     (signal 'wrong-type-argument (list 'epg-key-p key)))
   (aset (cdr key) 2 user-id-list))
 
@@ -572,62 +572,62 @@ This function is for internal use only."
 
 (defun epg-sub-key-validity (sub-key)
   "Return the validity of SUB-KEY."
-  (unless (eq (car sub-key) 'epg-sub-key)
+  (unless (eq (car-safe sub-key) 'epg-sub-key)
     (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
   (aref (cdr sub-key) 0))
 
 (defun epg-sub-key-capability (sub-key)
   "Return the capability of SUB-KEY."
-  (unless (eq (car sub-key) 'epg-sub-key)
+  (unless (eq (car-safe sub-key) 'epg-sub-key)
     (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
   (aref (cdr sub-key) 1))
 
 (defun epg-sub-key-secret-p (sub-key)
   "Return non-nil if SUB-KEY is a secret key."
-  (unless (eq (car sub-key) 'epg-sub-key)
+  (unless (eq (car-safe sub-key) 'epg-sub-key)
     (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
   (aref (cdr sub-key) 2))
 
 (defun epg-sub-key-algorithm (sub-key)
   "Return the algorithm of SUB-KEY."
-  (unless (eq (car sub-key) 'epg-sub-key)
+  (unless (eq (car-safe sub-key) 'epg-sub-key)
     (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
   (aref (cdr sub-key) 3))
 
 (defun epg-sub-key-length (sub-key)
   "Return the length of SUB-KEY."
-  (unless (eq (car sub-key) 'epg-sub-key)
+  (unless (eq (car-safe sub-key) 'epg-sub-key)
     (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
   (aref (cdr sub-key) 4))
 
 (defun epg-sub-key-id (sub-key)
   "Return the ID of SUB-KEY."
-  (unless (eq (car sub-key) 'epg-sub-key)
+  (unless (eq (car-safe sub-key) 'epg-sub-key)
     (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
   (aref (cdr sub-key) 5))
 
 (defun epg-sub-key-creation-time (sub-key)
   "Return the creation time of SUB-KEY."
-  (unless (eq (car sub-key) 'epg-sub-key)
+  (unless (eq (car-safe sub-key) 'epg-sub-key)
     (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
   (aref (cdr sub-key) 6))
 
 (defun epg-sub-key-expiration-time (sub-key)
   "Return the expiration time of SUB-KEY."
-  (unless (eq (car sub-key) 'epg-sub-key)
+  (unless (eq (car-safe sub-key) 'epg-sub-key)
     (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
   (aref (cdr sub-key) 7))
 
 (defun epg-sub-key-fingerprint (sub-key)
   "Return the fingerprint of SUB-KEY."
-  (unless (eq (car sub-key) 'epg-sub-key)
+  (unless (eq (car-safe sub-key) 'epg-sub-key)
     (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
   (aref (cdr sub-key) 8))
 
 (defun epg-sub-key-set-fingerprint (sub-key fingerprint)
   "Set the fingerprint of SUB-KEY.
 This function is for internal use only."
-  (unless (eq (car sub-key) 'epg-sub-key)
+  (unless (eq (car-safe sub-key) 'epg-sub-key)
     (signal 'wrong-type-argument (list 'epg-sub-key-p sub-key)))
   (aset (cdr sub-key) 8 fingerprint))
 
@@ -637,25 +637,25 @@ This function is for internal use only."
 
 (defun epg-user-id-validity (user-id)
   "Return the validity of USER-ID."
-  (unless (eq (car user-id) 'epg-user-id)
+  (unless (eq (car-safe user-id) 'epg-user-id)
     (signal 'wrong-type-argument (list 'epg-user-id-p user-id)))
   (aref (cdr user-id) 0))
 
 (defun epg-user-id-string (user-id)
   "Return the name of USER-ID."
-  (unless (eq (car user-id) 'epg-user-id)
+  (unless (eq (car-safe user-id) 'epg-user-id)
     (signal 'wrong-type-argument (list 'epg-user-id-p user-id)))
   (aref (cdr user-id) 1))
 
 (defun epg-user-id-signature-list (user-id)
   "Return the signature list of USER-ID."
-  (unless (eq (car user-id) 'epg-user-id)
+  (unless (eq (car-safe user-id) 'epg-user-id)
     (signal 'wrong-type-argument (list 'epg-user-id-p user-id)))
   (aref (cdr user-id) 2))
 
 (defun epg-user-id-set-signature-list (user-id signature-list)
   "Set the signature list of USER-ID."
-  (unless (eq (car user-id) 'epg-user-id)
+  (unless (eq (car-safe user-id) 'epg-user-id)
     (signal 'wrong-type-argument (list 'epg-user-id-p user-id)))
   (aset (cdr user-id) 2 signature-list))
 
@@ -669,49 +669,49 @@ This function is for internal use only."
 
 (defun epg-key-signature-validity (key-signature)
   "Return the validity of KEY-SIGNATURE."
-  (unless (eq (car key-signature) 'epg-key-signature)
+  (unless (eq (car-safe key-signature) 'epg-key-signature)
     (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
   (aref (cdr key-signature) 0))
 
 (defun epg-key-signature-pubkey-algorithm (key-signature)
   "Return the public key algorithm of KEY-SIGNATURE."
-  (unless (eq (car key-signature) 'epg-key-signature)
+  (unless (eq (car-safe key-signature) 'epg-key-signature)
     (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
   (aref (cdr key-signature) 1))
 
 (defun epg-key-signature-key-id (key-signature)
   "Return the key-id of KEY-SIGNATURE."
-  (unless (eq (car key-signature) 'epg-key-signature)
+  (unless (eq (car-safe key-signature) 'epg-key-signature)
     (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
   (aref (cdr key-signature) 2))
 
 (defun epg-key-signature-creation-time (key-signature)
   "Return the creation time of KEY-SIGNATURE."
-  (unless (eq (car key-signature) 'epg-key-signature)
+  (unless (eq (car-safe key-signature) 'epg-key-signature)
     (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
   (aref (cdr key-signature) 3))
 
 (defun epg-key-signature-expiration-time (key-signature)
   "Return the expiration time of KEY-SIGNATURE."
-  (unless (eq (car key-signature) 'epg-key-signature)
+  (unless (eq (car-safe key-signature) 'epg-key-signature)
     (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
   (aref (cdr key-signature) 4))
 
 (defun epg-key-signature-user-id (key-signature)
   "Return the user-id of KEY-SIGNATURE."
-  (unless (eq (car key-signature) 'epg-key-signature)
+  (unless (eq (car-safe key-signature) 'epg-key-signature)
     (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
   (aref (cdr key-signature) 5))
 
 (defun epg-key-signature-class (key-signature)
   "Return the class of KEY-SIGNATURE."
-  (unless (eq (car key-signature) 'epg-key-signature)
+  (unless (eq (car-safe key-signature) 'epg-key-signature)
     (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
   (aref (cdr key-signature) 6))
 
 (defun epg-key-signature-exportable-p (key-signature)
   "Return t if KEY-SIGNATURE is exportable."
-  (unless (eq (car key-signature) 'epg-key-signature)
+  (unless (eq (car-safe key-signature) 'epg-key-signature)
     (signal 'wrong-type-argument (list 'epg-key-signature-p key-signature)))
   (aref (cdr key-signature) 7))