emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 03a27fa 1/4: * lisp/play/fortune.el (fortune-messag


From: Glenn Morris
Subject: [Emacs-diffs] master 03a27fa 1/4: * lisp/play/fortune.el (fortune-message):
Date: Wed, 21 Mar 2018 14:14:08 -0400 (EDT)

branch: master
commit 03a27fab69e48f350679de8ef76c4b803d882e91
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    * lisp/play/fortune.el (fortune-message):
    Avoid trailing newline.  (Bug#30887)
---
 lisp/play/fortune.el | 2 ++
 1 file changed, 2 insertions(+)

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 @@ Optional FILE is a fortune file from which a cookie will be 
selected."
   (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



reply via email to

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