Function: org-table-with-shrunk-field

org-table-with-shrunk-field is a macro defined in org-table.el.gz.

Signature

(org-table-with-shrunk-field &rest BODY)

Documentation

Save field shrunk state, execute BODY and restore state.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-table.el.gz
(defmacro org-table-with-shrunk-field (&rest body)
  "Save field shrunk state, execute BODY and restore state."
  (declare (debug (body)))
  (org-with-gensyms (end shrunk size)
    `(let* ((,shrunk (save-match-data (org-table--shrunk-field)))
	    (,end (and ,shrunk (copy-marker (overlay-end ,shrunk) t)))
	    (,size (and ,shrunk (- ,end (overlay-start ,shrunk)))))
       (when ,shrunk (delete-overlay ,shrunk))
       (unwind-protect (progn ,@body)
	 (when ,shrunk (move-overlay ,shrunk (- ,end ,size) ,end))))))