emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 5135395: Use 'remember-buffer' in remember.el doc strings.


From: Lars Ingebrigtsen
Subject: master 5135395: Use 'remember-buffer' in remember.el doc strings.
Date: Mon, 19 Jul 2021 12:04:33 -0400 (EDT)

branch: master
commit 513539524e947a231ee0b2fc307d4afe3969c1ef
Author: Gabriel do Nascimento Ribeiro <gabriel376@hotmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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).
---
 etc/NEWS          |  5 +++++
 lisp/icomplete.el | 18 ++++++++++++------
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index e241b51..42869f4 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 576fced..adea150 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]