summaryrefslogtreecommitdiff
path: root/src/minibuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/minibuf.c')
-rw-r--r--src/minibuf.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index 9c1c86680d4..1dfee0a59c9 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -563,7 +563,8 @@ If the current buffer is not a minibuffer, return its entire contents. */)
DEFALT specifies the default value for the sake of history commands.
- If ALLOW_PROPS, do not throw away text properties.
+ If ALLOW_PROPS or `minibuffer-allow-text-properties' (possibly
+ buffer-local) is non-nil, do not throw away text properties.
if INHERIT_INPUT_METHOD, the minibuffer inherits the
current input method. */
@@ -928,7 +929,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
/* Make minibuffer contents into a string. */
Fset_buffer (minibuffer);
- if (allow_props)
+ if (allow_props || minibuffer_allow_text_properties)
val = Fminibuffer_contents ();
else
val = Fminibuffer_contents_no_properties ();
@@ -1321,7 +1322,8 @@ Sixth arg DEFAULT-VALUE, if non-nil, should be a string, which is used
Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits
the current input method and the setting of `enable-multibyte-characters'.
-If the variable `minibuffer-allow-text-properties' is non-nil,
+If the variable `minibuffer-allow-text-properties' is non-nil
+ (either let-bound or buffer-local in the minibuffer),
then the string which is returned includes whatever text properties
were present in the minibuffer. Otherwise the value has no text properties.
@@ -2464,9 +2466,10 @@ basic completion functions like `try-completion' and `all-completions'. */);
DEFVAR_BOOL ("minibuffer-allow-text-properties",
minibuffer_allow_text_properties,
doc: /* Non-nil means `read-from-minibuffer' should not discard text properties.
-This also affects `read-string', but it does not affect `read-minibuffer',
-`read-no-blanks-input', or any of the functions that do minibuffer input
-with completion; they always discard text properties. */);
+The value could be let-bound or buffer-local in the minibuffer.
+This also affects `read-string', or any of the functions that do
+minibuffer input with completion, but it does not affect `read-minibuffer'
+that always discards text properties. */);
minibuffer_allow_text_properties = 0;
DEFVAR_LISP ("minibuffer-prompt-properties", Vminibuffer_prompt_properties,