From: npostavs@users.sourceforge.net
To: Eli Zaretskii <eliz@gnu.org>
Cc: fh@fhaun.de, 26939@debbugs.gnu.org
Subject: bug#26939: 25.2; emacs --daemon, incorrect icomplete-prospects-height
Date: Tue, 06 Jun 2017 08:33:10 -0400 [thread overview]
Message-ID: <87lgp5xpmh.fsf@users.sourceforge.net> (raw)
In-Reply-To: <838tl5aliy.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 06 Jun 2017 05:37:57 +0300")
[-- Attachment #1: Type: text/plain, Size: 273 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
> I suggest a comment there explaining the value.
Good point. I also noticed that this default value was the last use of
icomplete-prospects-length which is marked obsolete since 23.1, so I've
completely removed its definition too.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 2542 bytes --]
From 382fb609e1d72f802b0dbff07ed461cfc34261ff Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Mon, 5 Jun 2017 19:18:14 -0400
Subject: [PATCH v2] Give a fixed default value for icomplete-prospects-height
(Bug#26939)
* lisp/icomplete.el (icomplete-prospects-height): Default to 2.
(icomplete-prospects-length): Remove.
* etc/NEWS: Announce removal.
---
etc/NEWS | 1 +
lisp/icomplete.el | 15 ++++++---------
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index cbd388b216..7cc773d5e0 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -926,6 +926,7 @@ of not providing replacement pairs via the history.
*** make-variable-frame-local. Variables cannot be frame-local any more.
*** From subr.el: window-dot, set-window-dot, read-input, show-buffer,
eval-current-buffer, string-to-int
+*** icomplete-prospects-length.
*** All the default-FOO variables that hold the default value of the
FOO variable. Use 'default-value' and 'setq-default' to access and
change FOO, respectively. The exhaustive list of removed variables is:
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index cd352de65b..a4153e806d 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -56,10 +56,6 @@ (defgroup icomplete nil
:link '(info-link "(emacs)Icomplete")
:group 'minibuffer)
-(defvar icomplete-prospects-length 80)
-(make-obsolete-variable
- 'icomplete-prospects-length 'icomplete-prospects-height "23.1")
-
(defcustom icomplete-separator " | "
"String used by Icomplete to separate alternatives in the minibuffer."
:type 'string
@@ -91,13 +87,14 @@ (defface icomplete-first-match '((t :weight bold))
:version "24.4")
;;;_* User Customization variables
-(defcustom icomplete-prospects-height
- ;; 20 is an estimated common size for the prompt + minibuffer content, to
- ;; try to guess the number of lines used up by icomplete-prospects-length.
- (+ 1 (/ (+ icomplete-prospects-length 20) (window-width)))
+(defcustom icomplete-prospects-height 2
+ ;; We used to compute how many lines 100 characters would take in
+ ;; the current window width, but the return value of `window-width'
+ ;; is unreliable on startup (e.g., if we're in daemon mode), so now
+ ;; we simply base the default value on an 80 column window.
"Maximum number of lines to use in the minibuffer."
:type 'integer
- :version "23.1")
+ :version "26.1")
(defcustom icomplete-compute-delay .3
"Completions-computation stall, used only with large-number completions.
--
2.11.1
next prev parent reply other threads:[~2017-06-06 12:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-15 13:10 bug#26939: 25.2; emacs --daemon, incorrect icomplete-prospects-height Frank Haun
2017-06-05 23:19 ` npostavs
2017-06-06 2:37 ` Eli Zaretskii
2017-06-06 12:33 ` npostavs [this message]
2017-06-14 11:04 ` npostavs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lgp5xpmh.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=26939@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=fh@fhaun.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).