Source

vm / vm-message.el

Diff from to

vm-message.el

 (provide 'vm-message)
 
 ;; data that is always shared with virtual folders
-(defmacro vm-location-data-of (message) (list 'aref message 0))
+(defsubst vm-location-data-of (message)
+  (aref message 0))
 ;; where message begins starting at the message separator in the folder
-(defmacro vm-start-of (message) (list 'aref (list 'aref message 0) 0))
+(defsubst vm-start-of (message)
+  (aref (aref message 0) 0))
 ;; where headers start (From_ line)
-(defmacro vm-headers-of (message) (list 'aref (list 'aref message 0) 1))
+(defsubst vm-headers-of (message)
+  (aref (aref message 0) 1))
 ;; where visible headers start
-(defun vm-vheaders-of (message)
+(defsubst vm-vheaders-of (message)
   (or (aref (aref message 0) 2)
       (progn (vm-reorder-message-headers message nil nil)
 	     (aref (aref message 0) 2))))
 ;; where text section starts
-(defun vm-text-of (message)
+(defsubst vm-text-of (message)
   (or (aref (aref message 0) 3) (progn (vm-find-and-set-text-of message)
 				       (aref (aref message 0) 3))))
 ;; where text portion of message ends
-(defmacro vm-text-end-of (message) (list 'aref (list 'aref message 0) 4))
+(defsubst vm-text-end-of (message)
+  (aref (aref message 0) 4))
 ;; where message ends
-(defmacro vm-end-of (message) (list 'aref (list 'aref message 0) 5))
+(defsubst vm-end-of (message)
+  (aref (aref message 0) 5))
 ;; soft data vector
-(defmacro vm-softdata-of (message) (list 'aref message 1))
-(defmacro vm-number-of (message) (list 'aref (list 'aref message 1) 0))
-(defmacro vm-padded-number-of (message) (list 'aref (list 'aref message 1) 1))
-(defmacro vm-mark-of (message) (list 'aref (list 'aref message 1) 2))
+(defsubst vm-softdata-of (message)
+  (aref message 1))
+(defsubst vm-number-of (message)
+  (aref (aref message 1) 0))
+(defsubst vm-padded-number-of (message)
+  (aref (aref message 1) 1))
+(defsubst vm-mark-of (message)
+  (aref (aref message 1) 2))
 ;; start of summary line
-(defmacro vm-su-start-of (message) (list 'aref (list 'aref message 1) 3))
+(defsubst vm-su-start-of (message)
+  (aref (aref message 1) 3))
 ;; end of summary line
-(defmacro vm-su-end-of (message) (list 'aref (list 'aref message 1) 4))
+(defsubst vm-su-end-of (message)
+  (aref (aref message 1) 4))
 ;; symbol whose value is the real message.
-(defmacro vm-real-message-sym-of (message)
-  (list 'aref (list 'aref message 1) 5))
+(defsubst vm-real-message-sym-of (message)
+  (aref (aref message 1) 5))
 ;; real message
-(defmacro vm-real-message-of (message)
-  (list 'symbol-value (list 'aref (list 'aref message 1) 5)))
+(defsubst vm-real-message-of (message)
+  (symbol-value (aref (aref message 1) 5)))
 ;; link to previous message in the message list
-(defmacro vm-reverse-link-of (message)
-  (list 'symbol-value (list 'aref (list 'aref message 1) 6)))
+(defsubst vm-reverse-link-of (message)
+  (symbol-value (aref (aref message 1) 6)))
 ;; message type
-(defmacro vm-message-type-of (message) (list 'aref (list 'aref message 1) 7))
+(defsubst vm-message-type-of (message)
+  (aref (aref message 1) 7))
 ;; number that uniquely identifies each message
 ;; this is for the set handling stuff
-(defmacro vm-message-id-number-of (message)
-  (list 'aref (list 'aref message 1) 8))
+(defsubst vm-message-id-number-of (message)
+  (aref (aref message 1) 8))
 ;; folder buffer of this message
-(defmacro vm-buffer-of (message)
-  (list 'aref (list 'aref message 1) 9))
+(defsubst vm-buffer-of (message)
+  (aref (aref message 1) 9))
 ;; cache thread indentation value
-(defmacro vm-thread-indentation-of (message)
-  (list 'aref (list 'aref message 1) 10))
+(defsubst vm-thread-indentation-of (message)
+  (aref (aref message 1) 10))
 ;; list of symbols from vm-thread-obarray that give this message's lineage
-(defmacro vm-thread-list-of (message)
-  (list 'aref (list 'aref message 1) 11))
+(defsubst vm-thread-list-of (message)
+  (aref (aref message 1) 11))
 ;; babyl header frob flag (0 or 1 at beginning of message)
-(defmacro vm-babyl-frob-flag-of (message)
-  (list 'aref (list 'aref message 1) 12))
+(defsubst vm-babyl-frob-flag-of (message)
+  (aref (aref message 1) 12))
 ;; saved attributes, if message was switched from unmirrored to mirrored
-(defmacro vm-saved-virtual-attributes-of (message)
-  (list 'aref (list 'aref message 1) 13))
+(defsubst vm-saved-virtual-attributes-of (message)
+  (aref (aref message 1) 13))
 ;; saved mirror data, if message was switched from unmirrored to mirrored
-(defmacro vm-saved-virtual-mirror-data-of (message)
-  (list 'aref (list 'aref message 1) 14))
+(defsubst vm-saved-virtual-mirror-data-of (message)
+  (aref (aref message 1) 14))
 ;; summary for unmirrored virtual message
-(defmacro vm-virtual-summary-of (message)
-  (list 'aref (list 'aref message 1) 15))
+(defsubst vm-virtual-summary-of (message)
+  (aref (aref message 1) 15))
 ;; MIME layout information; types, ids, positions, etc. of all MIME entities
-(defmacro vm-mime-layout-of (message)
-  (list 'aref (list 'aref message 1) 16))
-(defmacro vm-mime-encoded-header-flag-of (message)
-  (list 'aref (list 'aref message 1) 17))
-(defmacro vm-su-summary-mouse-track-overlay-of (message)
-  (list 'aref (list 'aref message 1) 18))
-(defmacro vm-message-access-method (message)
-  (list 'aref (list 'aref message 1) 19))
+(defsubst vm-mime-layout-of (message)
+  (aref (aref message 1) 16))
+(defsubst vm-mime-encoded-header-flag-of (message)
+  (aref (aref message 1) 17))
+(defsubst vm-su-summary-mouse-track-overlay-of (message)
+  (aref (aref message 1) 18))
+(defsubst vm-message-access-method (message)
+  (aref (aref message 1) 19))
 ;; message attribute vector
-(defmacro vm-attributes-of (message) (list 'aref message 2))
-(defmacro vm-new-flag (message) (list 'aref (list 'aref message 2) 0))
-(defmacro vm-unread-flag (message) (list 'aref (list 'aref message 2) 1))
-(defmacro vm-deleted-flag (message) (list 'aref (list 'aref message 2) 2))
-(defmacro vm-filed-flag (message) (list 'aref (list 'aref message 2) 3))
-(defmacro vm-replied-flag (message) (list 'aref (list 'aref message 2) 4))
-(defmacro vm-written-flag (message) (list 'aref (list 'aref message 2) 5))
-(defmacro vm-forwarded-flag (message) (list 'aref (list 'aref message 2) 6))
-(defmacro vm-edited-flag (message) (list 'aref (list 'aref message 2) 7))
-(defmacro vm-redistributed-flag (message) (list 'aref (list 'aref message 2) 8))
+(defsubst vm-attributes-of (message) (aref message 2))
+(defsubst vm-new-flag (message) (aref (aref message 2) 0))
+(defsubst vm-unread-flag (message) (aref (aref message 2) 1))
+(defsubst vm-deleted-flag (message) (aref (aref message 2) 2))
+(defsubst vm-filed-flag (message) (aref (aref message 2) 3))
+(defsubst vm-replied-flag (message) (aref (aref message 2) 4))
+(defsubst vm-written-flag (message) (aref (aref message 2) 5))
+(defsubst vm-forwarded-flag (message) (aref (aref message 2) 6))
+(defsubst vm-edited-flag (message) (aref (aref message 2) 7))
+(defsubst vm-redistributed-flag (message) (aref (aref message 2) 8))
 ;; message cached data
-(defmacro vm-cache-of (message) (list 'aref message 3))
+(defsubst vm-cache-of (message) (aref message 3))
 ;; message size in bytes (as a string)
-(defmacro vm-byte-count-of (message) (list 'aref (list 'aref message 3) 0))
+(defsubst vm-byte-count-of (message) (aref (aref message 3) 0))
 ;; weekday sent
-(defmacro vm-weekday-of (message) (list 'aref (list 'aref message 3) 1))
+(defsubst vm-weekday-of (message) (aref (aref message 3) 1))
 ;; month day
-(defmacro vm-monthday-of (message) (list 'aref (list 'aref message 3) 2))
+(defsubst vm-monthday-of (message) (aref (aref message 3) 2))
 ;; month sent
-(defmacro vm-month-of (message) (list 'aref (list 'aref message 3) 3))
+(defsubst vm-month-of (message) (aref (aref message 3) 3))
 ;; year sent
-(defmacro vm-year-of (message) (list 'aref (list 'aref message 3) 4))
+(defsubst vm-year-of (message) (aref (aref message 3) 4))
 ;; hour sent
-(defmacro vm-hour-of (message) (list 'aref (list 'aref message 3) 5))
+(defsubst vm-hour-of (message) (aref (aref message 3) 5))
 ;; timezone
-(defmacro vm-zone-of (message) (list 'aref (list 'aref message 3) 6))
+(defsubst vm-zone-of (message) (aref (aref message 3) 6))
 ;; message author's full name (Full-Name: or gouged from From:)
-(defmacro vm-full-name-of (message) (list 'aref (list 'aref message 3) 7))
+(defsubst vm-full-name-of (message) (aref (aref message 3) 7))
 ;; message author address (gouged from From:)
-(defmacro vm-from-of (message) (list 'aref (list 'aref message 3) 8))
+(defsubst vm-from-of (message) (aref (aref message 3) 8))
 ;; message ID (Message-Id:)
-(defmacro vm-message-id-of (message) (list 'aref (list 'aref message 3) 9))
+(defsubst vm-message-id-of (message) (aref (aref message 3) 9))
 ;; number of lines in message (as a string)
-(defmacro vm-line-count-of (message) (list 'aref (list 'aref message 3) 10))
+(defsubst vm-line-count-of (message) (aref (aref message 3) 10))
 ;; message subject (Subject:)
-(defmacro vm-subject-of (message) (list 'aref (list 'aref message 3) 11))
+(defsubst vm-subject-of (message) (aref (aref message 3) 11))
 ;; Regexp that can be used to find the start of the already ordered headers.
-(defmacro vm-vheaders-regexp-of (message)
-  (list 'aref (list 'aref message 3) 12))
+(defsubst vm-vheaders-regexp-of (message)
+  (aref (aref message 3) 12))
 ;; Addresses of recipients in a comma separated list
-(defmacro vm-to-of (message) (list 'aref (list 'aref message 3) 13))
+(defsubst vm-to-of (message) (aref (aref message 3) 13))
 ;; Full names of recipients in a comma separated list.  Addresses if
 ;; full names not available.
-(defmacro vm-to-names-of (message) (list 'aref (list 'aref message 3) 14))
+(defsubst vm-to-names-of (message) (aref (aref message 3) 14))
 ;; numeric month sent
-(defmacro vm-month-number-of (message) (list 'aref (list 'aref message 3) 15))
+(defsubst vm-month-number-of (message) (aref (aref message 3) 15))
 ;; sortable date string (used for easy sorting, naturally)
-(defmacro vm-sortable-datestring-of (message)
-  (list 'aref (list 'aref message 3) 16))
+(defsubst vm-sortable-datestring-of (message)
+  (aref (aref message 3) 16))
 ;; sortable subject, re: garbage removed
-(defmacro vm-sortable-subject-of (message)
-  (list 'aref (list 'aref message 3) 17))
+(defsubst vm-sortable-subject-of (message)
+  (aref (aref message 3) 17))
 ;; tokenized summary entry
-(defmacro vm-summary-of (message)
-  (list 'aref (list 'aref message 3) 18))
+(defsubst vm-summary-of (message)
+  (aref (aref message 3) 18))
 ;; parent of this message, as determined by threading
-(defmacro vm-parent-of (message)
-  (list 'aref (list 'aref message 3) 19))
+(defsubst vm-parent-of (message)
+  (aref (aref message 3) 19))
 ;; message IDs parsed from References header
-(defmacro vm-references-of (message)
-  (list 'aref (list 'aref message 3) 20))
+(defsubst vm-references-of (message)
+  (aref (aref message 3) 20))
 ;; have we retrieved the headers of this message?
 ;; only valid for remote folder access methods
-(defmacro vm-retrieved-headers-of (message)
-  (list 'aref (list 'aref message 3) 21))
+(defsubst vm-retrieved-headers-of (message)
+  (aref (aref message 3) 21))
 ;; have we retrieved the body of this message?
 ;; only valid for remote folder access methods
-(defmacro vm-retrieved-body-of (message)
-  (list 'aref (list 'aref message 3) 22))
+(defsubst vm-retrieved-body-of (message)
+  (aref (aref message 3) 22))
 ;; pop UIDL value for message
-(defmacro vm-pop-uidl-of (message)
-  (list 'aref (list 'aref message 3) 23))
+(defsubst vm-pop-uidl-of (message)
+  (aref (aref message 3) 23))
 ;; extra data shared by virtual messages if vm-virtual-mirror is non-nil
-(defmacro vm-mirror-data-of (message) (list 'aref message 4))
+(defsubst vm-mirror-data-of (message) (aref message 4))
 ;; if message is being edited, this is the buffer being used.
-(defmacro vm-edit-buffer-of (message) (list 'aref (list 'aref message 4) 0))
+(defsubst vm-edit-buffer-of (message) (aref (aref message 4) 0))
 ;; list of virtual messages mirroring the underlying real message
-(defmacro vm-virtual-messages-of (message)
-  (list 'symbol-value (list 'aref (list 'aref message 4) 1)))
+(defsubst vm-virtual-messages-of (message)
+  (symbol-value (aref (aref message 4) 1)))
 ;; modification flag for this message
 ;; nil if all attribute changes have been stuffed into the folder buffer
-(defmacro vm-modflag-of (message) (list 'aref (list 'aref message 4) 2))
+(defsubst vm-modflag-of (message) (aref (aref message 4) 2))
 ;; list of labels attached to this message
-(defmacro vm-labels-of (message) (list 'aref (list 'aref message 4) 3))
+(defsubst vm-labels-of (message) (aref (aref message 4) 3))
 ;; comma list of labels
-(defmacro vm-label-string-of (message) (list 'aref (list 'aref message 4) 4))
+(defsubst vm-label-string-of (message) (aref (aref message 4) 4))
 
-(defmacro vm-set-location-data-of (message vdata) (list 'aset message 0 vdata))
-(defmacro vm-set-start-of (message start)
-  (list 'aset (list 'aref message 0) 0 start))
-(defmacro vm-set-headers-of (message h)
-  (list 'aset (list 'aref message 0) 1 h))
-(defmacro vm-set-vheaders-of (message vh)
-  (list 'aset (list 'aref message 0) 2 vh))
-(defmacro vm-set-text-of (message text)
-  (list 'aset (list 'aref message 0) 3 text))
-(defmacro vm-set-text-end-of (message text)
-  (list 'aset (list 'aref message 0) 4 text))
-(defmacro vm-set-end-of (message end)
-  (list 'aset (list 'aref message 0) 5 end))
-(defmacro vm-set-softdata-of (message data)
-  (list 'aset message 1 data))
-(defmacro vm-set-number-of (message n)
-  (list 'aset (list 'aref message 1) 0 n))
-(defmacro vm-set-padded-number-of (message n)
-  (list 'aset (list 'aref message 1) 1 n))
-(defmacro vm-set-mark-of (message val)
-  (list 'aset (list 'aref message 1) 2 val))
-(defmacro vm-set-su-start-of (message pos)
-  (list 'aset (list 'aref message 1) 3 pos))
-(defmacro vm-set-su-end-of (message pos)
-  (list 'aset (list 'aref message 1) 4 pos))
-(defmacro vm-set-real-message-sym-of (message sym)
-  (list 'aset (list 'aref message 1) 5 sym))
-(defmacro vm-set-reverse-link-of (message link)
-  (list 'set (list 'aref (list 'aref message 1) 6) link))
-(defmacro vm-set-reverse-link-sym-of (message sym)
-  (list 'aset (list 'aref message 1) 6 sym))
-(defmacro vm-set-message-type-of (message type)
-  (list 'aset (list 'aref message 1) 7 type))
-(defmacro vm-set-message-id-number-of (message number)
-  (list 'aset (list 'aref message 1) 8 number))
-(defmacro vm-set-buffer-of (message buffer)
-  (list 'aset (list 'aref message 1) 9 buffer))
-(defmacro vm-set-thread-indentation-of (message val)
-  (list 'aset (list 'aref message 1) 10 val))
-(defmacro vm-set-thread-list-of (message list)
-  (list 'aset (list 'aref message 1) 11 list))
-(defmacro vm-set-babyl-frob-flag-of (message flag)
-  (list 'aset (list 'aref message 1) 12 flag))
-(defmacro vm-set-saved-virtual-attributes-of (message attrs)
-  (list 'aset (list 'aref message 1) 13 attrs))
-(defmacro vm-set-saved-virtual-mirror-data-of (message data)
-  (list 'aset (list 'aref message 1) 14 data))
-(defmacro vm-set-virtual-summary-of (message summ)
-  (list 'aset (list 'aref message 1) 15 summ))
-(defmacro vm-set-mime-layout-of (message layout)
-  (list 'aset (list 'aref message 1) 16 layout))
-(defmacro vm-set-mime-encoded-header-flag-of (message flag)
-  (list 'aset (list 'aref message 1) 17 flag))
-(defmacro vm-set-su-summary-mouse-track-overlay-of (message overlay)
-  (list 'aset (list 'aref message 1) 18 overlay))
-(defmacro vm-set-message-access-method-of (message method)
-  (list 'aset (list 'aref message 1) 19 method))
-(defmacro vm-set-attributes-of (message attrs) (list 'aset message 2 attrs))
+(defsubst vm-set-location-data-of (message vdata) (aset message 0 vdata))
+(defsubst vm-set-start-of (message start)
+  (aset (aref message 0) 0 start))
+(defsubst vm-set-headers-of (message h)
+  (aset (aref message 0) 1 h))
+(defsubst vm-set-vheaders-of (message vh)
+  (aset (aref message 0) 2 vh))
+(defsubst vm-set-text-of (message text)
+  (aset (aref message 0) 3 text))
+(defsubst vm-set-text-end-of (message text)
+  (aset (aref message 0) 4 text))
+(defsubst vm-set-end-of (message end)
+  (aset (aref message 0) 5 end))
+(defsubst vm-set-softdata-of (message data)
+  (aset message 1 data))
+(defsubst vm-set-number-of (message n)
+  (aset (aref message 1) 0 n))
+(defsubst vm-set-padded-number-of (message n)
+  (aset (aref message 1) 1 n))
+(defsubst vm-set-mark-of (message val)
+  (aset (aref message 1) 2 val))
+(defsubst vm-set-su-start-of (message pos)
+  (aset (aref message 1) 3 pos))
+(defsubst vm-set-su-end-of (message pos)
+  (aset (aref message 1) 4 pos))
+(defsubst vm-set-real-message-sym-of (message sym)
+  (aset (aref message 1) 5 sym))
+(defsubst vm-set-reverse-link-of (message link)
+  (set (aref (aref message 1) 6) link))
+(defsubst vm-set-reverse-link-sym-of (message sym)
+  (aset (aref message 1) 6 sym))
+(defsubst vm-set-message-type-of (message type)
+  (aset (aref message 1) 7 type))
+(defsubst vm-set-message-id-number-of (message number)
+  (aset (aref message 1) 8 number))
+(defsubst vm-set-buffer-of (message buffer)
+  (aset (aref message 1) 9 buffer))
+(defsubst vm-set-thread-indentation-of (message val)
+  (aset (aref message 1) 10 val))
+(defsubst vm-set-thread-list-of (message list)
+  (aset (aref message 1) 11 list))
+(defsubst vm-set-babyl-frob-flag-of (message flag)
+  (aset (aref message 1) 12 flag))
+(defsubst vm-set-saved-virtual-attributes-of (message attrs)
+  (aset (aref message 1) 13 attrs))
+(defsubst vm-set-saved-virtual-mirror-data-of (message data)
+  (aset (aref message 1) 14 data))
+(defsubst vm-set-virtual-summary-of (message summ)
+  (aset (aref message 1) 15 summ))
+(defsubst vm-set-mime-layout-of (message layout)
+  (aset (aref message 1) 16 layout))
+(defsubst vm-set-mime-encoded-header-flag-of (message flag)
+  (aset (aref message 1) 17 flag))
+(defsubst vm-set-su-summary-mouse-track-overlay-of (message overlay)
+  (aset (aref message 1) 18 overlay))
+(defsubst vm-set-message-access-method-of (message method)
+  (aset (aref message 1) 19 method))
+(defsubst vm-set-attributes-of (message attrs) (aset message 2 attrs))
 ;; The other routines in attributes group are part of the undo system.
 (defun vm-set-edited-flag-of (message flag)
   (aset (aref message 2) 7 flag)
     (vm-set-modflag-of message t))
   (and (not (buffer-modified-p)) (vm-set-buffer-modified-p t))
   (vm-clear-modification-flag-undos))
-(defmacro vm-set-cache-of (message cache) (list 'aset message 3 cache))
-(defmacro vm-set-byte-count-of (message count)
-  (list 'aset (list 'aref message 3) 0 count))
-(defmacro vm-set-weekday-of (message val)
-  (list 'aset (list 'aref message 3) 1 val))
-(defmacro vm-set-monthday-of (message val)
-  (list 'aset (list 'aref message 3) 2 val))
-(defmacro vm-set-month-of (message val)
-  (list 'aset (list 'aref message 3) 3 val))
-(defmacro vm-set-year-of (message val)
-  (list 'aset (list 'aref message 3) 4 val))
-(defmacro vm-set-hour-of (message val)
-  (list 'aset (list 'aref message 3) 5 val))
-(defmacro vm-set-zone-of (message val)
-  (list 'aset (list 'aref message 3) 6 val))
-(defmacro vm-set-full-name-of (message author)
-  (list 'aset (list 'aref message 3) 7 author))
-(defmacro vm-set-from-of (message author)
-  (list 'aset (list 'aref message 3) 8 author))
-(defmacro vm-set-message-id-of (message id)
-  (list 'aset (list 'aref message 3) 9 id))
-(defmacro vm-set-line-count-of (message count)
-  (list 'aset (list 'aref message 3) 10 count))
-(defmacro vm-set-subject-of (message subject)
-  (list 'aset (list 'aref message 3) 11 subject))
-(defmacro vm-set-vheaders-regexp-of (message regexp)
-  (list 'aset (list 'aref message 3) 12 regexp))
-(defmacro vm-set-to-of (message recips)
-  (list 'aset (list 'aref message 3) 13 recips))
-(defmacro vm-set-to-names-of (message recips)
-  (list 'aset (list 'aref message 3) 14 recips))
-(defmacro vm-set-month-number-of (message val)
-  (list 'aset (list 'aref message 3) 15 val))
-(defmacro vm-set-sortable-datestring-of (message val)
-  (list 'aset (list 'aref message 3) 16 val))
-(defmacro vm-set-sortable-subject-of (message val)
-  (list 'aset (list 'aref message 3) 17 val))
-(defmacro vm-set-summary-of (message val)
-  (list 'aset (list 'aref message 3) 18 val))
-(defmacro vm-set-parent-of (message val)
-  (list 'aset (list 'aref message 3) 19 val))
-(defmacro vm-set-references-of (message val)
-  (list 'aset (list 'aref message 3) 20 val))
-(defmacro vm-set-retrieved-header-of (message val)
-  (list 'aset (list 'aref message 3) 21 val))
-(defmacro vm-set-retrieved-body-of (message val)
-  (list 'aset (list 'aref message 3) 22 val))
-(defmacro vm-set-pop-uidl-of (message val)
-  (list 'aset (list 'aref message 3) 23 val))
-(defmacro vm-set-mirror-data-of (message data)
-  (list 'aset message 4 data))
-(defmacro vm-set-edit-buffer-of (message buf)
-  (list 'aset (list 'aref message 4) 0 buf))
-(defmacro vm-set-virtual-messages-of (message list)
-  (list 'set (list 'aref (list 'aref message 4) 1) list))
-(defmacro vm-set-virtual-messages-sym-of (message sym)
-  (list 'aset (list 'aref message 4) 1 sym))
-(defmacro vm-set-modflag-of (message val)
-  (list 'aset (list 'aref message 4) 2 val))
-(defmacro vm-set-labels-of (message labels)
-  (list 'aset (list 'aref message 4) 3 labels))
-(defmacro vm-set-label-string-of (message string)
-  (list 'aset (list 'aref message 4) 4 string))
+(defsubst vm-set-cache-of (message cache) (aset message 3 cache))
+(defsubst vm-set-byte-count-of (message count)
+  (aset (aref message 3) 0 count))
+(defsubst vm-set-weekday-of (message val)
+  (aset (aref message 3) 1 val))
+(defsubst vm-set-monthday-of (message val)
+  (aset (aref message 3) 2 val))
+(defsubst vm-set-month-of (message val)
+  (aset (aref message 3) 3 val))
+(defsubst vm-set-year-of (message val)
+  (aset (aref message 3) 4 val))
+(defsubst vm-set-hour-of (message val)
+  (aset (aref message 3) 5 val))
+(defsubst vm-set-zone-of (message val)
+  (aset (aref message 3) 6 val))
+(defsubst vm-set-full-name-of (message author)
+  (aset (aref message 3) 7 author))
+(defsubst vm-set-from-of (message author)
+  (aset (aref message 3) 8 author))
+(defsubst vm-set-message-id-of (message id)
+  (aset (aref message 3) 9 id))
+(defsubst vm-set-line-count-of (message count)
+  (aset (aref message 3) 10 count))
+(defsubst vm-set-subject-of (message subject)
+  (aset (aref message 3) 11 subject))
+(defsubst vm-set-vheaders-regexp-of (message regexp)
+  (aset (aref message 3) 12 regexp))
+(defsubst vm-set-to-of (message recips)
+  (aset (aref message 3) 13 recips))
+(defsubst vm-set-to-names-of (message recips)
+  (aset (aref message 3) 14 recips))
+(defsubst vm-set-month-number-of (message val)
+  (aset (aref message 3) 15 val))
+(defsubst vm-set-sortable-datestring-of (message val)
+  (aset (aref message 3) 16 val))
+(defsubst vm-set-sortable-subject-of (message val)
+  (aset (aref message 3) 17 val))
+(defsubst vm-set-summary-of (message val)
+  (aset (aref message 3) 18 val))
+(defsubst vm-set-parent-of (message val)
+  (aset (aref message 3) 19 val))
+(defsubst vm-set-references-of (message val)
+  (aset (aref message 3) 20 val))
+(defsubst vm-set-retrieved-header-of (message val)
+  (aset (aref message 3) 21 val))
+(defsubst vm-set-retrieved-body-of (message val)
+  (aset (aref message 3) 22 val))
+(defsubst vm-set-pop-uidl-of (message val)
+  (aset (aref message 3) 23 val))
+(defsubst vm-set-mirror-data-of (message data)
+  (aset message 4 data))
+(defsubst vm-set-edit-buffer-of (message buf)
+  (aset (aref message 4) 0 buf))
+(defsubst vm-set-virtual-messages-of (message list)
+  (set (aref (aref message 4) 1) list))
+(defsubst vm-set-virtual-messages-sym-of (message sym)
+  (aset (aref message 4) 1 sym))
+(defsubst vm-set-modflag-of (message val)
+  (aset (aref message 4) 2 val))
+(defsubst vm-set-labels-of (message labels)
+  (aset (aref message 4) 3 labels))
+(defsubst vm-set-label-string-of (message string)
+  (aset (aref message 4) 4 string))
 
 (defun vm-make-message ()
   (let ((v (make-vector 5 nil)) sym)