Function: PC-complete

PC-complete is an interactive and byte-compiled function defined in complete.el.gz.

Signature

(PC-complete)

Documentation

Like minibuffer-complete, but allows "b--di"-style abbreviations.

For example, "M-x b--di" would match byte-recompile-directory, or any name which consists of three or more words, the first beginning with "b" and the third beginning with "di".

The pattern "b--d" is ambiguous for byte-recompile-directory and beginning-of-defun, so this would produce a list of completions just like when normal Emacs completions are ambiguous.

Word-delimiters for the purposes of Partial Completion are "-", "_",
".", and SPC.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/complete.el.gz
(defun PC-complete ()
  "Like minibuffer-complete, but allows \"b--di\"-style abbreviations.
For example, \"M-x b--di\" would match `byte-recompile-directory', or any
name which consists of three or more words, the first beginning with \"b\"
and the third beginning with \"di\".

The pattern \"b--d\" is ambiguous for `byte-recompile-directory' and
`beginning-of-defun', so this would produce a list of completions
just like when normal Emacs completions are ambiguous.

Word-delimiters for the purposes of Partial Completion are \"-\", \"_\",
\".\", and SPC."
  (interactive)
  (if (PC-was-meta-key)
      (minibuffer-complete)
    ;; If the previous command was not this one,
    ;; never scroll, always retry completion.
    (or (eq last-command this-command)
	(setq minibuffer-scroll-window nil))
    (let ((window minibuffer-scroll-window))
      ;; If there's a fresh completion window with a live buffer,
      ;; and this command is repeated, scroll that window.
      (if (and window (window-buffer window)
	       (buffer-name (window-buffer window)))
	  (with-current-buffer (window-buffer window)
	    (if (pos-visible-in-window-p (point-max) window)
		(set-window-start window (point-min) nil)
	      (scroll-other-window)))
	(PC-do-completion nil)))))