From: Gabriel do Nascimento Ribeiro Date: Mon, 19 Jul 2021 16:04:25 +0000 (+0200) Subject: Use 'remember-buffer' in remember.el doc strings. X-Git-Tag: emacs-28.0.90~1804 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=513539524e947a231ee0b2fc307d4afe3969c1ef;p=emacs.git Use 'remember-buffer' in remember.el doc strings. * lisp/textmodes/remember.el (remember-initial-contents) (remember-before-remember-hook, remember-destroy): Refer to `remember-buffer'. * lisp/textmodes/remember.el (remember-buffer): Make into defcustom (bug#49373). --- diff --git a/etc/NEWS b/etc/NEWS index e241b512b6a..42869f44dcf 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -581,6 +581,11 @@ indentation is done using SMIE or with the old ad-hoc code. ** Icomplete +--- +*** New user option 'icomplete-matches-format'. +This allows controlling the current/total number of matches for the +prompt prefix. + +++ *** New minor mode 'icomplete-vertical-mode', alias 'fido-vertical-mode'. This mode is intended to be used with Icomplete ('M-x icomplete-mode') diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 576fced015a..adea1505fd2 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -97,6 +97,12 @@ Otherwise this should be a list of the completion tables (e.g., :type '(choice (const :tag "All" t) (repeat function))) +(defcustom icomplete-matches-format "%s/%s " + "Format of the current/total number of matches for the prompt prefix." + :version "28.1" + :type '(choice (const :tag "No prefix" nil) + (string :tag "Prefix format string"))) + (defface icomplete-first-match '((t :weight bold)) "Face used by Icomplete for highlighting first match." :version "24.4") @@ -696,12 +702,12 @@ See `icomplete-mode' and `minibuffer-setup-hook'." (overlay-put icomplete-overlay 'before-string (and icomplete-scroll - (let ((past (length icomplete--scrolled-past))) - (format - "%s/%s " - (1+ past) - (+ past - (safe-length completion-all-sorted-completions)))))) + icomplete-matches-format + (let* ((past (length icomplete--scrolled-past)) + (current (1+ past)) + (total (+ past (safe-length + completion-all-sorted-completions)))) + (format icomplete-matches-format current total)))) (overlay-put icomplete-overlay 'after-string text)))))))) (defun icomplete--affixate (md prospects)