Function: table--make-cell-map
table--make-cell-map is a byte-compiled function defined in
table.el.gz.
Signature
(table--make-cell-map)
Documentation
Make the table cell keymap if it does not exist yet.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/table.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Worker functions (executed implicitly)
;;
(defun table--make-cell-map ()
"Make the table cell keymap if it does not exist yet."
;; This is irrelevant to keymap but good place to make sure to be executed.
(table--update-cell-face)
(unless table-cell-map
(let ((map (make-sparse-keymap)))
;; `table-command-prefix' mode specific bindings.
(if (vectorp table-command-prefix)
(dolist (binding table-cell-bindings)
(let ((seq (copy-sequence (car binding))))
(and (vectorp seq)
(listp (aref seq 0))
(eq (car (aref seq 0)) 'control)
(progn
(aset seq 0 (cadr (aref seq 0)))
(define-key map (vconcat table-command-prefix seq)
(cdr binding)))))))
;; Shorthand control bindings.
(dolist (binding table-cell-bindings)
(define-key map (car binding) (cdr binding)))
;; Remap normal commands to table specific version.
(dolist (remap table-command-remap-alist)
(define-key map (vector 'remap (car remap)) (cdr remap)))
;;
(setq table-cell-map map)
(fset 'table-cell-map map)))
;; Add menu for table cells.
(easy-menu-define table-cell-menu-map table-cell-map
"Table cell menu" table-cell-menu)
(run-hooks 'table-cell-map-hook))