]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove 'minibuffer-prompt-width'
authorEshel Yaron <me@eshelyaron.com>
Fri, 7 Jun 2024 19:05:19 +0000 (21:05 +0200)
committerEshel Yaron <me@eshelyaron.com>
Fri, 7 Jun 2024 19:05:19 +0000 (21:05 +0200)
doc/lispref/minibuf.texi
doc/lispref/positions.texi
lisp/simple.el
src/minibuf.c

index 4a5064e8d28630e4987e256f1b50140dc8f82219..b031d1c27c47ce9971d5abdf65af5548c66adbd4 100644 (file)
@@ -2771,11 +2771,6 @@ position of the end of the minibuffer prompt, if a minibuffer is
 current.  Otherwise, it returns the minimum valid buffer position.
 @end defun
 
-@defun minibuffer-prompt-width
-This function returns the current display-width of the minibuffer
-prompt, if a minibuffer is current.  Otherwise, it returns zero.
-@end defun
-
 @defun minibuffer-contents
 This function returns the editable
 contents of the minibuffer (that is, everything except the prompt) as
index 9193c1063d17264b8420a79b6eb5c93068da5276..5919ba20b2390357a630610ba63820954736ef4a 100644 (file)
@@ -712,10 +712,6 @@ the end of the accessible portion of the buffer, and pass @var{line} and
                        (cons (window-hscroll) 0)
                        (selected-window))))
 @end example
-
-When you use @code{compute-motion} for the minibuffer, you need to use
-@code{minibuffer-prompt-width} to get the horizontal position of the
-beginning of the first screen line.  @xref{Minibuffer Contents}.
 @end defun
 
 @node List Motion
index 5a47243d70c8788129fcfc8e1ab21610ec8bbe66..9c2e02ccf5616ce7f9d4c6315e85cc94223a0031 100644 (file)
@@ -3254,13 +3254,6 @@ by the new completion."
   (interactive "p")
   (next-complete-history-element (- n)))
 
-;; For compatibility with the old subr of the same name.
-(defun minibuffer-prompt-width ()
-  "Return the display width of the minibuffer prompt.
-Return 0 if current buffer is not a minibuffer."
-  ;; Return the width of everything before the field at the end of
-  ;; the buffer; this should be 0 for normal buffers.
-  (1- (minibuffer-prompt-end)))
 \f
 ;; isearch minibuffer history
 (add-hook 'minibuffer-setup-hook 'minibuffer-history-isearch-setup)
index 569316c13568d191d1dfafdf21453e105f789dd1..e731e50b67d7f9b76cc76c4db6b79aa58797d28a 100644 (file)
@@ -69,11 +69,6 @@ static Lisp_Object minibuf_prompt;
 
 static Lisp_Object MB_frame;
 
-/* Width of current mini-buffer prompt.  Only set after display_line
-   of the line that contains the prompt.  */
-
-static ptrdiff_t minibuf_prompt_width;
-
 static Lisp_Object nth_minibuffer (EMACS_INT depth);
 static EMACS_INT minibuf_c_loop_level (EMACS_INT depth);
 static void set_minibuffer_mode (Lisp_Object buf, EMACS_INT depth);
@@ -716,11 +711,10 @@ read_minibuf (Lisp_Object map, Lisp_Object initial,
                                  minibuf_save_list))));
   minibuf_save_list
     = Fcons (minibuf_prompt,
-            Fcons (make_fixnum (minibuf_prompt_width),
-                   Fcons (Vcurrent_prefix_arg,
+            Fcons (Vcurrent_prefix_arg,
                                  Fcons (Vminibuffer_history_position,
                                         Fcons (Vminibuffer_history_variable,
-                                               minibuf_save_list)))));
+                                               minibuf_save_list))));
   minibuf_save_list
     = Fcons (Fthis_command_keys_vector (), minibuf_save_list);
 
@@ -734,7 +728,6 @@ read_minibuf (Lisp_Object map, Lisp_Object initial,
 
   /* Now that we can restore all those variables, start changing them.  */
 
-  minibuf_prompt_width = 0;
   minibuf_prompt = Fcopy_sequence (prompt);
   Vminibuffer_history_position = histpos;
   Vminibuffer_history_variable = histvar;
@@ -860,8 +853,6 @@ read_minibuf (Lisp_Object map, Lisp_Object initial,
     unbind_to (count1, Qnil);
   }
 
-  minibuf_prompt_width = current_column ();
-
   /* Put in the initial input.  */
   if (!NILP (initial))
     {
@@ -1118,8 +1109,6 @@ read_minibuf_unwind (void)
   minibuf_save_list = Fcdr (minibuf_save_list);
   minibuf_prompt = Fcar (minibuf_save_list);
   minibuf_save_list = Fcdr (minibuf_save_list);
-  minibuf_prompt_width = XFIXNAT (Fcar (minibuf_save_list));
-  minibuf_save_list = Fcdr (minibuf_save_list);
   Vcurrent_prefix_arg = Fcar (minibuf_save_list);
   minibuf_save_list = Fcdr (minibuf_save_list);
   Vminibuffer_history_position = Fcar (minibuf_save_list);
@@ -2137,7 +2126,6 @@ static void
 init_minibuf_once_for_pdumper (void)
 {
   PDUMPER_IGNORE (minibuf_level);
-  PDUMPER_IGNORE (minibuf_prompt_width);
 
   /* We run this function on first initialization and whenever we
      restore from a dump file.  pdumper doesn't try to preserve