]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert aa89c84e00d8dc85100e6fedab7631c415e6364d (bug#38457)
authorJuri Linkov <juri@linkov.net>
Sun, 15 Dec 2019 23:58:14 +0000 (01:58 +0200)
committerJuri Linkov <juri@linkov.net>
Sun, 15 Dec 2019 23:58:14 +0000 (01:58 +0200)
* src/editfns.c (Fmessage): Don't use minibuffer-message.
(Fmessage_in_echo_area): Remove function message-in-echo-area.
(syms_of_editfns): Remove variable message-in-echo-area.

* lisp/isearch.el (isearch--momentary-message): Remove message-in-echo-area.
* lisp/minibuffer.el (minibuffer-message): Don't record message
in the *Messages* buffer.
(minibuffer-completion-help): Remove message-in-echo-area.

* lisp/subr.el (do-after-load-evaluation): Remove discard-input (bug#38560)

doc/lispref/display.texi
etc/NEWS
lisp/isearch.el
lisp/minibuffer.el
lisp/subr.el
src/editfns.c

index 06032729a5088b031c527810c42342c71b036d17..42b049eafde706a7cd22c459a51de842c0f800d4 100644 (file)
@@ -276,13 +276,11 @@ followed by a newline.
 When @code{inhibit-message} is non-@code{nil}, no message will be displayed
 in the echo area, it will only be logged to @samp{*Messages*}.
 
-If the minibuffer is active, it uses the @code{minibuffer-message}
-function to display the message temporarily at the end of the
-minibuffer (@pxref{Minibuffer Misc}).
-
 If @var{format-string} is @code{nil} or the empty string,
 @code{message} clears the echo area; if the echo area has been
-expanded automatically, this brings it back to its normal size.
+expanded automatically, this brings it back to its normal size.  If
+the minibuffer is active, this brings the minibuffer contents back
+onto the screen immediately.
 
 @example
 @group
index 18ed8de736e509b8563976ab5aa01992ac2c7e04..cf4e705a52f36f52c625c788d23adb49a03fcf37 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -780,10 +780,6 @@ the minibuffer.  If non-nil, point will move to the end of the prompt
 *** Minibuffer now uses 'minibuffer-message' to display error messages
 at the end of the active minibuffer.
 
-+++
-*** The function 'message' now displays the message at the end of the minibuffer
-when the minibuffer is active.
-
 +++
 *** 'y-or-n-p' now uses the minibuffer to read 'y' or 'n' answer.
 
index 7c22e6ad971c1b37ff9206c343fd10b8e37cba44..4f3342782d38e6b5aa2f5089cef844df28116211 100644 (file)
@@ -2011,7 +2011,7 @@ Turning on character-folding turns off regexp mode.")
 (defun isearch--momentary-message (string)
   "Print STRING at the end of the isearch prompt for 1 second."
   (let ((message-log-max nil))
-    (message-in-echo-area "%s%s%s"
+    (message "%s%s%s"
              (isearch-message-prefix nil isearch-nonincremental)
              isearch-message
              (apply #'propertize (format " [%s]" string)
@@ -3168,7 +3168,7 @@ If there is no completion possible, say so and continue searching."
             (isearch-message-prefix ellipsis isearch-nonincremental)
             m
             (isearch-message-suffix c-q-hack)))
-    (if c-q-hack m (let ((message-log-max nil)) (message-in-echo-area "%s" m)))))
+    (if c-q-hack m (let ((message-log-max nil)) (message "%s" m)))))
 
 (defun isearch--describe-regexp-mode (regexp-function &optional space-before)
   "Make a string for describing REGEXP-FUNCTION.
index f8888111cafbeb28c4de356f2505c87edc0dcc42..76d8ca447574e83023f36f458fcb1b1710d8b357 100644 (file)
@@ -712,16 +712,11 @@ If ARGS are provided, then pass MESSAGE through `format-message'."
       (progn
         (if args
             (apply #'message message args)
-          (message-in-echo-area "%s" message))
+          (message "%s" message))
         (prog1 (sit-for (or minibuffer-message-timeout 1000000))
-          (message-in-echo-area nil)))
-    ;; Record message in the *Messages* buffer
-    (let ((inhibit-message t))
-      (if args
-          (apply #'message message args)
-        (message-in-echo-area "%s" message)))
+          (message nil)))
     ;; Clear out any old echo-area message to make way for our new thing.
-    (message-in-echo-area nil)
+    (message nil)
     (setq message (if (and (null args)
                            (string-match-p "\\` *\\[.+\\]\\'" message))
                       ;; Make sure we can put-text-property.
@@ -1840,7 +1835,7 @@ variables.")
 (defun minibuffer-completion-help (&optional start end)
   "Display a list of possible completions of the current minibuffer contents."
   (interactive)
-  (message-in-echo-area "Making completion list...")
+  (message "Making completion list...")
   (let* ((start (or start (minibuffer-prompt-end)))
          (end (or end (point-max)))
          (string (buffer-substring start end))
@@ -1851,7 +1846,7 @@ variables.")
                        minibuffer-completion-predicate
                        (- (point) start)
                        md)))
-    (message-in-echo-area nil)
+    (message nil)
     (if (or (null completions)
             (and (not (consp (cdr completions)))
                  (equal (car completions) string)))
index 1b2a1d643fb99d5dca662ba2e1e96af72a70b8b5..ed55853bb27bb5f5ded2227d6bdfc1f3124cf8db 100644 (file)
@@ -4616,7 +4616,7 @@ This function is called directly from the C code."
                                       (string-match "\\.elc?\\>" file))
                             obarray))
           (msg (format "Package %s is deprecated" package))
-          (fun (lambda (msg) (discard-input) (message "%s" msg))))
+          (fun (lambda (msg) (message "%s" msg))))
       ;; Cribbed from cl--compiling-file.
       (when (or (not (fboundp 'byte-compile-warning-enabled-p))
                 (byte-compile-warning-enabled-p 'obsolete package))
index 72a9cdba7af5618e7e6a0ad8a988982ff15cb4cb..8fc866d391ffb2a3290b7dd70a586b0977ed957c 100644 (file)
@@ -2875,58 +2875,8 @@ If the first argument is nil or the empty string, the function clears
 any existing message; this lets the minibuffer contents show.  See
 also `current-message'.
 
-When the variable `message-in-echo-area' is non-nil, use the function
-`message-in-echo-area' to display the message in the echo area.
-Otherwise, when the minibuffer is active, use `minibuffer-message'
-to temporarily display the message at the end of the minibuffer.
-
 usage: (message FORMAT-STRING &rest ARGS)  */)
   (ptrdiff_t nargs, Lisp_Object *args)
-{
-  if (NILP (Vmessage_in_echo_area)
-      && !inhibit_message
-      && !(NILP (args[0]) || (STRINGP (args[0]) && SBYTES (args[0]) == 0))
-      && WINDOW_LIVE_P (Factive_minibuffer_window ())
-      && WINDOW_LIVE_P (Fold_selected_window ())
-      && BUFFERP (Fwindow_buffer (Fold_selected_window ()))
-      && !NILP (Fminibufferp (Fwindow_buffer (Fold_selected_window ()))))
-    {
-      ptrdiff_t count = SPECPDL_INDEX ();
-
-      /* Avoid possible recursion.  */
-      specbind (Qmessage_in_echo_area, Qt);
-
-      record_unwind_current_buffer ();
-      Fset_buffer (Fwindow_buffer (Fold_selected_window ()));
-
-      return unbind_to (count, CALLN (Fapply, intern ("minibuffer-message"),
-                                      Flist (nargs, args)));
-    }
-  else
-    return Fmessage_in_echo_area (nargs, args);
-}
-
-DEFUN ("message-in-echo-area", Fmessage_in_echo_area, Smessage_in_echo_area, 1, MANY, 0,
-       doc: /* Display a message at the bottom of the screen.
-The message also goes into the `*Messages*' buffer, if `message-log-max'
-is non-nil.  (In keyboard macros, that's all it does.)
-Return the message.
-
-In batch mode, the message is printed to the standard error stream,
-followed by a newline.
-
-The first argument is a format control string, and the rest are data
-to be formatted under control of the string.  Percent sign (%), grave
-accent (\\=`) and apostrophe (\\=') are special in the format; see
-`format-message' for details.  To display STRING without special
-treatment, use (message-in-echo-area "%s" STRING).
-
-If the first argument is nil or the empty string, the function clears
-any existing message; this lets the minibuffer contents show.  See
-also `current-message'.
-
-usage: (message-in-echo-area FORMAT-STRING &rest ARGS)  */)
-  (ptrdiff_t nargs, Lisp_Object *args)
 {
   if (NILP (args[0])
       || (STRINGP (args[0])
@@ -4570,11 +4520,6 @@ This variable is experimental; email 32252@debbugs.gnu.org if you need
 it to be non-nil.  */);
   binary_as_unsigned = false;
 
-  DEFVAR_LISP ("message-in-echo-area", Vmessage_in_echo_area,
-              doc: /* Non-nil means overwrite the minibuffer with a message in the echo area.  */);
-  Vmessage_in_echo_area = Qnil;
-  DEFSYM (Qmessage_in_echo_area, "message-in-echo-area");
-
   defsubr (&Spropertize);
   defsubr (&Schar_equal);
   defsubr (&Sgoto_char);
@@ -4649,7 +4594,6 @@ it to be non-nil.  */);
   defsubr (&Semacs_pid);
   defsubr (&Ssystem_name);
   defsubr (&Smessage);
-  defsubr (&Smessage_in_echo_area);
   defsubr (&Smessage_box);
   defsubr (&Smessage_or_box);
   defsubr (&Scurrent_message);