Function: python-nav-with-cache
python-nav-with-cache is a byte-compiled function defined in
python.el.gz.
Signature
(python-nav-with-cache KIND FUNC)
Documentation
Cached version of the navigation FUNC.
If a value is obtained from the navigation cache using KIND, it will navigate there and return the position. Otherwise, use FUNC to navigate and cache the result.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-nav-with-cache (kind func)
"Cached version of the navigation FUNC.
If a value is obtained from the navigation cache using KIND, it will
navigate there and return the position. Otherwise, use FUNC to navigate
and cache the result."
(let ((target (python-nav-cache-get kind)))
(if target
(progn
(goto-char target)
(point-marker))
(let ((current (line-number-at-pos nil t)))
(python-nav-cache-set kind current (funcall func))))))