Commit 7817f1ee authored by Syohei YOSHIDA's avatar Syohei YOSHIDA

Add 'nostrip' parameter to 'popup-tip'(#42)

parent de70ea8d
......@@ -246,17 +246,19 @@ something about what cursor points to.
popup-tip string &key point around width height min-height
truncate margin margin-left margin-right scroll-bar parent
parent-offset nowait prompt
parent-offset nowait nostrip prompt
Show a tooltip with message `STRING` at `POINT`. This function is
synchronized unless `NOWAIT` specified. Almost all arguments are same as
`popup-create` except for `TRUNCATE`, `NOWAIT`, and `PROMPT`.
`popup-create` except for `TRUNCATE`, `NOWAIT`, `NOSTRIP` and `PROMPT`.
If `TRUNCATE` is non-nil, the tooltip can be truncated.
If `NOWAIT` is non-nil, this function immediately returns the tooltip
instance without entering event loop.
If `NOSTRIP` is non-nil, `STRING` properties are not stripped.
`PROMPT` is a prompt string used when reading events during the event
loop.
......
......@@ -1004,6 +1004,7 @@ HELP-DELAY is a delay of displaying helps."
parent
parent-offset
nowait
nostrip
prompt
&aux tip lines)
"Show a tooltip of STRING at POINT. This function is
......@@ -1018,8 +1019,10 @@ tooltip instance without entering event loop.
PROMPT is a prompt string when reading events during event loop."
(if (bufferp string)
(setq string (with-current-buffer string (buffer-string))))
;; TODO strip text (mainly face) properties
(setq string (substring-no-properties string))
(unless nostrip
;; TODO strip text (mainly face) properties
(setq string (substring-no-properties string)))
(and (eq margin t) (setq margin 1))
(or margin-left (setq margin-left margin))
......
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