TAB folds a frame, which is what the header always said it did
This commit is contained in:
parent
3439dec5b1
commit
8d56bd0ced
@ -362,7 +362,7 @@ answers; anything that needs to know what a form means asks.
|
||||
longer empty. It lists the stopped program's frames, innermost first, each with
|
||||
where it is and how many named slots it has.
|
||||
|
||||
`TAB` on a frame opens it and shows what its locals hold — name, type and
|
||||
`TAB` on a frame opens it (or `f`, which folds from anywhere on the frame) and shows what its locals hold — name, type and
|
||||
value, rendered the same way the inspector renders anything else. They are
|
||||
fetched the first time a frame is opened and then kept, because a stopped
|
||||
program's locals cannot change underneath you and a round trip behind a key
|
||||
|
||||
@ -383,11 +383,23 @@ list already says it."
|
||||
(get-text-property pos 'flan-cnr-frame)
|
||||
(get-text-property pos 'flan-cnr-inspect)))
|
||||
|
||||
(defun flan-cnr-tab ()
|
||||
"Fold this frame, or move to the next actionable line.
|
||||
|
||||
TAB does two things because the buffer has two kinds of line and the section
|
||||
header already promised the first one: on a frame, it opens or closes that
|
||||
frame's locals; anywhere else, it moves. `f' still folds unconditionally, for
|
||||
anyone who would rather TAB always moved."
|
||||
(interactive)
|
||||
(if (get-text-property (point) 'flan-cnr-frame)
|
||||
(flan-cnr-toggle-frame)
|
||||
(flan-cnr-next)))
|
||||
|
||||
(defvar flan-cnr-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (kbd "RET") #'flan-cnr-take)
|
||||
(define-key map [mouse-1] #'flan-cnr-take)
|
||||
(define-key map (kbd "TAB") #'flan-cnr-next)
|
||||
(define-key map (kbd "TAB") #'flan-cnr-tab)
|
||||
(define-key map [backtab] #'flan-cnr-previous)
|
||||
(define-key map "n" #'flan-cnr-next)
|
||||
(define-key map "p" #'flan-cnr-previous)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user