Function: backtrace--set-frame-locals-visible
backtrace--set-frame-locals-visible is a byte-compiled function
defined in backtrace.el.gz.
Signature
(backtrace--set-frame-locals-visible VISIBLE)
Documentation
Set the visibility of the local vars for the frame at point to VISIBLE.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/backtrace.el.gz
(defun backtrace--set-frame-locals-visible (visible)
"Set the visibility of the local vars for the frame at point to VISIBLE."
(let ((pos (point))
(index (backtrace-get-index))
(start (backtrace-get-frame-start))
(end (backtrace-get-frame-end))
(view (copy-sequence (backtrace-get-view)))
(inhibit-read-only t))
(setq view (plist-put view :show-locals visible))
(goto-char (backtrace-get-frame-start))
(while (not (or (= (point) end)
(eq (backtrace-get-section) 'locals)))
(goto-char (next-single-property-change (point)
'backtrace-section nil end)))
(cond
((and (= (point) end) visible)
;; The locals section doesn't exist so create it.
(let ((standard-output (current-buffer)))
(backtrace--with-output-variables view
(backtrace--print-locals
(nth index backtrace-frames) view))
(add-text-properties end (point) `(backtrace-index ,index))
(goto-char pos)))
((/= (point) end)
;; The locals section does exist, so add or remove the overlay.
(backtrace--set-locals-visible-overlay (point) end visible)
(goto-char (if (invisible-p pos) start pos))))
(add-text-properties start (backtrace-get-frame-end)
`(backtrace-view ,view))))