+ (with-temp-buffer
+ ;; As far as I know, current implementation of ACAP server
+ ;; (cyrus-smlacapd 0.5) does not accept literal argument for STORE.
+ ;; If literal argument is available, command arguments can be sent using
+ ;; function `acap-send-command-wait'.
+ (set-buffer-multibyte nil)
+ (insert "STORE (")
+ (let (beg tag)
+ (while entries
+ (cond
+ ((stringp (car entries))
+ (setq beg (point))
+ (insert (car entries))
+ (goto-char beg)
+ (while (re-search-forward "\\\\" nil t)
+ (replace-match "\\\\\\\\"))
+ (goto-char beg)
+ (while (re-search-forward "\"" nil t)
+ (replace-match "\\\\\""))
+ (goto-char beg)
+ (insert "\"")
+ (goto-char (point-max))
+ (insert "\""))
+ ((symbolp (car entries))
+ (insert (prin1-to-string (car entries)))))
+ (if (cdr entries)(insert " "))
+ (setq entries (cdr entries)))
+ (insert ")")
+ (goto-char (point-min))
+ (insert (with-current-buffer (process-buffer process)
+ (number-to-string (setq tag (setq acap-tag (1+ acap-tag)))))
+ " ")
+ (process-send-region process (point-min) (point-max))
+ (acap-debug (concat (buffer-string) acap-client-eol))
+ (process-send-string process acap-client-eol)
+ (acap-wait-for-response process tag))))