diff --git a/README.org b/README.org index a89e2b9..3d9d3d2 100644 --- a/README.org +++ b/README.org @@ -538,6 +538,14 @@ previous input in the minibuffer. (add-hook 'minibuffer-setup-hook 'minibuffer-setup-history-completions) + ;; Stolen from Emacs-28.1 for Emacs-27.2: + (unless (fboundp 'minibuffer--completion-prompt-end) + (defun minibuffer--completion-prompt-end () + (let ((end (minibuffer-prompt-end))) + (if (< (point) end) + (user-error "Can't complete in prompt") + end)))) + ;; Adapted from ‘minibuffer-complete’: (defun my-minibuffer-complete-history () (interactive)