changeset 93998:7ae01d17160f

(tooltip-show-help-non-mode): Set message-truncate-lines to t and don't truncate msg.
author Jan Djärv <jan.h.d@swipnet.se>
date Fri, 11 Apr 2008 06:43:44 +0000
parents 81fe93cd566e
children ba69c9ea9b58
files lisp/tooltip.el
diffstat 1 files changed, 4 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/tooltip.el	Fri Apr 11 03:49:39 2008 +0000
+++ b/lisp/tooltip.el	Fri Apr 11 06:43:44 2008 +0000
@@ -316,21 +316,12 @@
 (defvar tooltip-help-message nil
   "The last help message received via `tooltip-show-help'.")
 
-(defun tooltip-trunc-str (str maxlen pieces)
-  (let ((s (car pieces)))
-    (if (and pieces (< (+ (length str) (length s) 2) maxlen))
-      (tooltip-trunc-str (concat str 
-				 (if (> (length str) 0) ", "  "") 
-				 s)
-			 maxlen (cdr pieces))
-      (if (> (length str) 0) str s))))
-
 (defun tooltip-show-help-non-mode (msg)
   "Function installed as `show-help-function' when tooltip is off."
-  (message "%s" (if msg
-		    (tooltip-trunc-str "" (frame-parameter nil 'width)
-				       (split-string msg "\n" t))
-		  "")))
+  (let ((message-truncate-lines t))
+    (message "%s" (if msg
+		      (replace-regexp-in-string "\n" ", " msg)
+		    ""))))
 
 (defun tooltip-show-help (msg)
   "Function installed as `show-help-function'.