Subject: bug#30186: 27.0.50; Password is not hidden in read-passwd

From: Juri Linkov <[email-masked]>
Date: Thu, 25 Jan 2018 23:15:41 +0200

>> Do you agree we could remove the effect of
>> with-silent-modifications around set-text-properties,
>> and leave it only on remove-list-of-text-properties?
>> This will help to fix the reported regression.
>
> I'm not sure about this.  Doesn't `set-text-properties' need to be
> "protected", too?

I'm not sure either.  Do you think that `set-text-properties' without
`with-silent-modifications' will cause the same problem that you
described in http://lists.gnu.org/r/emacs-devel/2015-04/msg00506.html

> I'm not sure why you want to do this.  Why do you want to do this?

Doing yank `C-y' in the minibuffer of `read-passwd' puts dots `.'
over the yanked characters using `display' properties, then later
`set-text-properties' removes all properties (exposing the yanked
characters), but without `with-silent-modifications' it used to put
`display' properties back.

After the change that added `with-silent-modifications',
the hook that puts `display' properties back doesn't run.

> One thing which is puzzling me is that `with-silent-modifications' is a
> macro which is defined in subr.el, but later in the file.  Won't this
> invocation of w-s-m get compiled as a function call because of this?

`with-silent-modifications' is a macro that let-binds
`inhibit-modification-hooks' to `t', thus preventing the
hook in `read-passwd' from running.