Subject: bug#73768: 'read-passwd-mode' can clobber user defined mode lines

From: Michael Albinus <[email-masked]>
Date: Sat, 19 Oct 2024 12:44:13 +0200

Version: 30.1

Michael Albinus <[email-masked]> writes:

Hi Martin,

>> entering 'read-passwd' does
>>
>>             (add-hook 'post-command-hook #'read-passwd--hide-password nil t))
>>
>> while exiting still does
>>
>>               ;; Not sure why but it seems that there might be cases where the
>>               ;; minibuffer is not always properly reset later on, so undo
>>               ;; whatever we've done here (bug#11392).
>>               (remove-hook 'after-change-functions
>>                            #'read-passwd--hide-password 'local)
>>
>> If that fix of Bug#11392 (or Bug#11397) were really needed, then we
>> should remove read-password--hide-password from 'post-command-hook' now.
>> But there were no bug reports in the last four years so probably that
>> bug was fixed by other means.  In either case the current 'remove-hook'
>> is a noop now.
>
> Hmm, yes. While adding read-passwd-mode, I didn't check all settings in
> read-passwd. Likely these settings are superfluous now. I will check in
> master once the other patch has arrived it.

Finally, I've done as you proposed: Remove `read-password--hide-password'
from `post-command-hook'. While playing with the recipe of bug#11397,
sometimes (not always) the minibuffer was corrupted as hiding the
text. So I believe this is the safest change.

Pushed to emacs-30. And closing this bug, now. Thanks again for your
patient discussion the issue!

>> martin

Best regards, Michael.