summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2008-04-11 06:43:56 +0000
committerJan Djärv <jan.h.d@swipnet.se>2008-04-11 06:43:56 +0000
commit5ca2bc08c57203ca06db045b3e3ef44dc506190d (patch)
tree58d8cc94f7dd661eccc39f32c2c3ac8366c9a7c9 /lisp
parentd463476b15396150771c4fc7d77d9c7110a8232c (diff)
downloademacs-5ca2bc08c57203ca06db045b3e3ef44dc506190d.tar.gz
(tooltip-show-help-non-mode): Set message-truncate-lines
to t and don't truncate msg.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/tooltip.el17
2 files changed, 9 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index af797ba4f5e..557e43f6df4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-11 Jan Djärv <jan.h.d@swipnet.se>
+
+ * tooltip.el (tooltip-show-help-non-mode): Set message-truncate-lines
+ to t and don't truncate msg.
+
2008-04-11 Glenn Morris <rgm@gnu.org>
* calendar/calendar.el (diary, holidays):
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index bfbedcf0c13..469a1584221 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -316,21 +316,12 @@ the buffer of PROCESS."
(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'.