unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30887: 27.0.50; fortune-message occupys two lines of height for one line message
@ 2018-03-20 19:14 Xu Chunyang
  2018-03-21 18:16 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Xu Chunyang @ 2018-03-20 19:14 UTC (permalink / raw)
  To: 30887


For a very simple message such as "You now have Asian Flu.", M-x
fortune-message shows it in two lines of height

> You now have Asian Flu.
>

It is annoying because it changes the height of minibuffer/echo area.
The final newline is really unnecessary at least for message.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#30887: 27.0.50; fortune-message occupys two lines of height for one line message
  2018-03-20 19:14 bug#30887: 27.0.50; fortune-message occupys two lines of height for one line message Xu Chunyang
@ 2018-03-21 18:16 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2018-03-21 18:16 UTC (permalink / raw)
  To: 30887-done

Version: 27.1

commit 03a27fa
Date:   Wed Mar 21 14:10:05 2018 -0400

    * lisp/play/fortune.el (fortune-message):
    Avoid trailing newline.  (Bug#30887)

diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el
index 74ace06..740f436 100644
--- a/lisp/play/fortune.el
+++ b/lisp/play/fortune.el
@@ -313,6 +313,8 @@ fortune-message
   (with-temp-buffer
     (let ((fortune-buffer-name (current-buffer)))
       (fortune-in-buffer t file)
+      ;; Avoid trailing newline.
+      (if (bolp) (delete-char -1))
       (message "%s" (buffer-string)))))
 
 ;;;###autoload





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-21 18:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-20 19:14 bug#30887: 27.0.50; fortune-message occupys two lines of height for one line message Xu Chunyang
2018-03-21 18:16 ` Glenn Morris

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).