Function: execute-extended-command--shorter

execute-extended-command--shorter is a byte-compiled function defined in simple.el.gz.

Signature

(execute-extended-command--shorter NAME TYPED)

Source Code

;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun execute-extended-command--shorter (name typed)
  (let ((candidates '())
        (max (length typed))
        (len 1)
        binding)
    (while (and (not binding)
                (progn
                  (unless candidates
                    (setq len (1+ len))
                    (setq candidates (execute-extended-command--shorter-1
                                      name len)))
                  ;; Don't show the help message if the binding isn't
                  ;; significantly shorter than the M-x command the user typed.
                  (< len (- max 5))))
      (input-pending-p)    ;Dummy call to trigger input-processing, bug#23002.
      (let ((candidate (pop candidates)))
        (when (equal name
                       (car-safe (completion-try-completion
                                  candidate obarray 'commandp len)))
          (setq binding candidate))))
    binding))