Function: pdf-info-query--transform-action

pdf-info-query--transform-action is a natively compiled function defined in pdf-info.el.

Signature

(pdf-info-query--transform-action ACTION)

Documentation

Transform ACTION response into a Lisp form.

Source Code

;; Defined in /nix/store/63h5z2vmzn0mfavcxi2idi23g5xcgkbl-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20260102.1101/pdf-info.el
(defun pdf-info-query--transform-action (action)
  "Transform ACTION response into a Lisp form."
  (let ((type (intern (pop action))))
    `((type . ,type)
      (title . ,(pop action))
      ,@(cl-case type
          (goto-dest
           `((page . ,(string-to-number (pop action)))
             (top . ,(and (> (length (car action)) 0)
                          (string-to-number (pop action))))))
          (goto-remote
           `((filename . ,(pop action))
             (page . ,(string-to-number (pop action)))
             (top . ,(and (> (length (car action)) 0)
                          (string-to-number (pop action))))))
          (t `((uri . ,(pop action))))))))