emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change stars as read-hide-char


From: Colin Baxter
Subject: Re: Change stars as read-hide-char
Date: Mon, 30 Jul 2018 12:14:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Dear Robert

>>>>> Robert Pluim <address@hidden> writes:

    > Colin Baxter <address@hidden> writes:
    >>>>>>> Robert Pluim <address@hidden> writes:
    >> 
    >> > Colin Baxter <address@hidden> writes: >> My apologies for
    >> posting here, I can't get posting rights at >>
    >> gmane.emacs.help. My `return-confirmation' emails get bounced at
    >> >> that news-group.
    >> >> 
    >> >> The development emacs-27 version recently changed the default
    >> >> character seen when entering a password from `.' to `*'. I
    >> want >> to get back to the old default, but
    >> >> 
    >> >> (let (read-hide-char) "?.")
    >> >> 
    >> 
    >> > 'let' specifies a list of variable bindings, and you want the >
    >> character '.', not a string containing '?' and '.', so itʼs:
    >> 
    >> > (let ((read-hide-char ?. )) (message "%c" read-hide-char))
    >> 
    >> Unfortunately
    >> 
    >> (let ((read-hide-char ?. )) (message "%c" read-hide-char))
    >> 
    >> also doesn't work. It gives the error
    >> 
    >> Wrong type argument: characterp, "?."
    >> 
    >> as soon as I enter a password. The same error occurs if I use
    >> `emacs -q'. Could this be a bug?

    > Hmm. Could you show a full transcript of what youʼre doing? Donʼt
    > forget that the let-binding is only valid within the let, not for
    > the entire session. If you want it to valid all the time you'll
    > need to do

    > (setq read-hide-char ?.)

Ok, that explains things I think. At the beginning, I wanted to set `.'
as the read-hide-char in my emacs-init file, but the doc string for
read-hide-char says it should never be set globally. I took that to mean
never to set via a `setq'. This seemed to be confirmed in comments of
the lisp/subr.el file, where using a let-bind is suggested. Hence my
efforts at writing a `let' to my emacs-init, which maybe were a little
naive.

The (setq read-hide-char ?.) does indeed work, and seems to do so
without creating errors elsewhere. So I'll leave it in my ~/.emacs for
now. However, I am now curious as to what the sentence, `This variable
should never be set globally.' means in the doc-string for
`read-hide-char'. Perhaps the doc-string could be amplified slightly?

Thank you very much for your help.

Best wishes,

Colin.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]