]> git.eshelyaron.com Git - emacs.git/commitdiff
Use 'remember-buffer' in remember.el doc strings.
authorGabriel do Nascimento Ribeiro <gabriel376@hotmail.com>
Mon, 19 Jul 2021 16:04:25 +0000 (18:04 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 19 Jul 2021 16:04:25 +0000 (18:04 +0200)
* 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).

etc/NEWS
lisp/icomplete.el

index e241b512b6a5f9952344698aa277c2252b4d6b03..42869f44dcfed0276d1dda19628e5eef9319c8b3 100644 (file)
--- 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')
index 576fced015a7f9d4c41efbf7f60d8576260137f2..adea1505fd217d3e9d3b6349f93b8aee60775e7a 100644 (file)
@@ -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)