Skip to content

Commit

Permalink
Merge pull request #13 from rudi/list-table-keybindings
Browse files Browse the repository at this point in the history
List all keybindings in table
  • Loading branch information
kiwanami committed Oct 6, 2017
2 parents cd673a0 + a87234e commit b8830d1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ctable.el
Expand Up @@ -912,6 +912,8 @@ bug), this function may return nil."

("g" . ctbl:action-update-buffer)

("?" . ctbl:describe-bindings)

([mouse-1] . ctbl:navi-on-click)
("C-m" . ctbl:navi-on-click)
("RET" . ctbl:navi-on-click)
Expand Down Expand Up @@ -1602,6 +1604,21 @@ cell is truncated."
(ctbl:show-cell-in-tooltip t)
(setq ctbl:tooltip-timer nil))))))


;; help output

(defun ctbl:describe-bindings ()
"Display a buffer showing a list of keys defined in the table."
(interactive)
(let ((keymap (get-text-property (point) 'keymap)))
(when keymap
(with-help-window (help-buffer)
(with-current-buffer (help-buffer)
(map-keymap (lambda (key value)
(when (characterp key)
(insert (format "%s %s\n" (key-description (vector key)) value))))
keymap))))))


;; Rendering utilities

Expand Down

0 comments on commit b8830d1

Please sign in to comment.