diff options
| author | Jan Djärv | 2008-04-11 06:43:56 +0000 |
|---|---|---|
| committer | Jan Djärv | 2008-04-11 06:43:56 +0000 |
| commit | 5ca2bc08c57203ca06db045b3e3ef44dc506190d (patch) | |
| tree | 58d8cc94f7dd661eccc39f32c2c3ac8366c9a7c9 /lisp/tooltip.el | |
| parent | d463476b15396150771c4fc7d77d9c7110a8232c (diff) | |
| download | emacs-5ca2bc08c57203ca06db045b3e3ef44dc506190d.tar.gz emacs-5ca2bc08c57203ca06db045b3e3ef44dc506190d.zip | |
(tooltip-show-help-non-mode): Set message-truncate-lines
to t and don't truncate msg.
Diffstat (limited to 'lisp/tooltip.el')
| -rw-r--r-- | lisp/tooltip.el | 17 |
1 files changed, 4 insertions, 13 deletions
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." | |||
| 316 | (defvar tooltip-help-message nil | 316 | (defvar tooltip-help-message nil |
| 317 | "The last help message received via `tooltip-show-help'.") | 317 | "The last help message received via `tooltip-show-help'.") |
| 318 | 318 | ||
| 319 | (defun tooltip-trunc-str (str maxlen pieces) | ||
| 320 | (let ((s (car pieces))) | ||
| 321 | (if (and pieces (< (+ (length str) (length s) 2) maxlen)) | ||
| 322 | (tooltip-trunc-str (concat str | ||
| 323 | (if (> (length str) 0) ", " "") | ||
| 324 | s) | ||
| 325 | maxlen (cdr pieces)) | ||
| 326 | (if (> (length str) 0) str s)))) | ||
| 327 | |||
| 328 | (defun tooltip-show-help-non-mode (msg) | 319 | (defun tooltip-show-help-non-mode (msg) |
| 329 | "Function installed as `show-help-function' when tooltip is off." | 320 | "Function installed as `show-help-function' when tooltip is off." |
| 330 | (message "%s" (if msg | 321 | (let ((message-truncate-lines t)) |
| 331 | (tooltip-trunc-str "" (frame-parameter nil 'width) | 322 | (message "%s" (if msg |
| 332 | (split-string msg "\n" t)) | 323 | (replace-regexp-in-string "\n" ", " msg) |
| 333 | ""))) | 324 | "")))) |
| 334 | 325 | ||
| 335 | (defun tooltip-show-help (msg) | 326 | (defun tooltip-show-help (msg) |
| 336 | "Function installed as `show-help-function'. | 327 | "Function installed as `show-help-function'. |