Function: which-key--extract-key

which-key--extract-key is a byte-compiled function defined in which-key.el.gz.

Signature

(which-key--extract-key KEY-STR)

Documentation

Pull the last key (or key range) out of KEY-STR.

Source Code

;; Defined in /usr/src/emacs/lisp/which-key.el.gz
(defun which-key--extract-key (key-str)
  "Pull the last key (or key range) out of KEY-STR."
  (save-match-data
    (let ((key-range-regexp "\\`.*\\([^ \t]+ \\.\\. [^ \t]+\\)\\'"))
      (if (string-match key-range-regexp key-str)
          (match-string 1 key-str)
        (car (last (split-string key-str " ")))))))