(minibuffer-allow-text-properties): Obsolete.
(read_minibuf): Drop 'allow_props' argument.
(choose-completion): Retain text properties.
a starting position in the history list as well. @xref{Minibuffer
History}.
-If the variable @code{minibuffer-allow-text-properties} is
-non-@code{nil}, then the string that is returned includes whatever text
-properties were present in the minibuffer. Otherwise all the text
-properties are stripped when the value is returned. (By default this
-variable is @code{nil}.)
-
@vindex minibuffer-prompt-properties
The text properties in @code{minibuffer-prompt-properties} are applied
to the prompt. By default, this property list defines a face to use
See @code{read-regexp} above for details of how these values are used.
@end defopt
-@defvar minibuffer-allow-text-properties
-If this variable is @code{nil}, the default, then
-@code{read-from-minibuffer} strips all text properties from the
-minibuffer input before returning it. Otherwise, the minibuffer input
-is returned as is, along with its text properties. Moreover, if this
-variable is non-@code{nil}, most text properties on strings from the
-completion table are preserved as well.
-
-@lisp
-(let ((minibuffer-allow-text-properties t))
- (completing-read "String: " (list (propertize "foobar" 'data 'zot))))
-=> #("foobar" 3 6 (data zot))
-@end lisp
-
-In this example, the user typed @samp{foo} and then hit the @kbd{TAB}
-key, so the text properties are only preserved on the last three
-characters.
-@end defvar
-
@vindex minibuffer-mode-map
@defvar minibuffer-local-map
This
without evaluating it. The arguments @var{prompt} and @var{initial} are
used as in @code{read-from-minibuffer}.
-This is a simplified interface to the
-@code{read-from-minibuffer} function:
-
-@smallexample
-@group
-(read-minibuffer @var{prompt} @var{initial})
-@equiv{}
-(let (minibuffer-allow-text-properties)
- (read-from-minibuffer @var{prompt} @var{initial} nil t))
-@end group
-@end smallexample
-
-Here is an example in which we supply the string @code{"(testing)"} as
-initial input:
+This is a simplified interface to the @code{read-from-minibuffer}
+function. Here is an example in which we supply the string
+@code{"(testing)"} as initial input:
@smallexample
@group
(defun erc-input-message ()
"Read input from the minibuffer."
(interactive)
- (let ((minibuffer-allow-text-properties t)
- (read-map minibuffer-local-map))
+ (let ((read-map minibuffer-local-map))
(insert (read-from-minibuffer "Message: "
(string last-command-event)
read-map))
(unless imenu-eager-completion-buffer
(minibuffer-completion-help)))
(setq name (completing-read prompt
- prepared-index-alist
- nil t nil 'imenu--history-list name)))
+ prepared-index-alist
+ nil t nil 'imenu--history-list name)))
(when (stringp name)
(setq choice (assoc name prepared-index-alist))
(let* ((message-log-max nil)
;; Binding minibuffer-history-symbol to nil is a work-around
;; for some incompatibility with gmhist.
- (minibuffer-history-symbol)
- ;; Search string might have meta information on text properties.
- (minibuffer-allow-text-properties t))
+ (minibuffer-history-symbol))
(setq isearch-new-string
(minibuffer-with-setup-hook
(let ((setup (minibuffer-lazy-highlight-setup)))
;; The properties on `newtext' include things like the
;; `completions-first-difference' face, which we don't want to
;; include upon insertion.
- (setq newtext (copy-sequence newtext)) ;Don't modify the arg by side-effect.
- (if minibuffer-allow-text-properties
- ;; If we're preserving properties, then just remove the faces
- ;; and other properties added by the completion machinery.
- (remove-text-properties 0 (length newtext) '(face completion-score)
- newtext)
- ;; Remove all text properties.
- (set-text-properties 0 (length newtext) nil newtext))
+ (setq newtext (copy-sequence newtext))
+ (remove-text-properties 0 (length newtext) '(face) newtext)
;; Maybe this should be in subr.el.
;; You'd think this is trivial to do, but details matter if you want
;; to keep markers "at the right place" and be robust in the face of
(defvar minibuffer-help-form nil "Unused obsolete variable.")
(make-obsolete-variable 'minibuffer-help-form 'help-form "30.1")
+(defvar minibuffer-allow-text-properties nil "Unused obsolete variable.")
+(make-obsolete-variable 'minibuffer-allow-text-properties nil "30.1")
+
(defvar-local minibuffer-hint-timer nil)
(defcustom minibuffer-hint-idle-time 0.4
(working-suffix (if (plist-get project-plist :base-extension)
(concat "." (plist-get project-plist :base-extension))
".org"))
- (insert-default-directory t)
- (minibuffer-allow-text-properties nil))
+ (insert-default-directory t))
(setq base-url (read-string "Base URL of published content: " base-url nil base-url t))
(or (string-suffix-p "/" base-url)
(query-replace-descr (cdr from-to))))
query-replace-defaults))
(symbol-value query-replace-from-history-variable)))
- (minibuffer-allow-text-properties t) ; separator uses text-properties
(default (when (and query-replace-read-from-default (not regexp-flag))
(funcall query-replace-read-from-default)))
(prompt
(setq beg (or (previous-single-property-change
beg 'completion--string)
beg))
- (substring-no-properties
- (get-text-property beg 'completion--string))))))
+ (get-text-property beg 'completion--string)))))
(unless (buffer-live-p buffer)
(error "Destination buffer is dead"))
DEFALT specifies the default value for the sake of history commands.
- If ALLOW_PROPS, do not throw away text properties.
-
if INHERIT_INPUT_METHOD, the minibuffer inherits the
current input method. */
static Lisp_Object
-read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
- bool expflag,
- Lisp_Object histvar, Lisp_Object histpos, Lisp_Object defalt,
- bool allow_props, bool inherit_input_method)
+read_minibuf (Lisp_Object map, Lisp_Object initial,
+ Lisp_Object prompt, bool expflag, Lisp_Object histvar,
+ Lisp_Object histpos, Lisp_Object defalt,
+ bool inherit_input_method)
{
Lisp_Object val;
specpdl_ref count = SPECPDL_INDEX ();
/* Make minibuffer contents into a string. */
Fset_buffer (minibuffer);
- if (allow_props)
- val = Fminibuffer_contents ();
- else
- val = Fminibuffer_contents_no_properties ();
+ val = Fminibuffer_contents ();
/* VAL is the string of minibuffer text. */
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,
- then the string which is returned includes whatever text properties
- were present in the minibuffer. Otherwise the value has no text properties.
-
If `inhibit-interaction' is non-nil, this function will signal an
`inhibited-interaction' error.
val = read_minibuf (keymap, initial_contents, prompt,
!NILP (read),
histvar, histpos, default_value,
- minibuffer_allow_text_properties,
!NILP (inherit_input_method));
return val;
}
Some uses of the echo area also raise that frame (since they use it too). */);
minibuffer_auto_raise = 0;
- DEFVAR_BOOL ("minibuffer-allow-text-properties",
- minibuffer_allow_text_properties,
- doc: /* Whether `read-from-minibuffer' preserves text properties. */);
- minibuffer_allow_text_properties = 0;
-
DEFVAR_LISP ("minibuffer-prompt-properties", Vminibuffer_prompt_properties,
doc: /* Text properties that are added to minibuffer prompts.
These are in addition to the basic `field' property, and stickiness