Commit 5ca2bc08 authored by Jan Djärv's avatar Jan Djärv
Browse files

(tooltip-show-help-non-mode): Set message-truncate-lines

to t and don't truncate msg.
parent d463476b
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):
......
......@@ -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'.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment