unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Michael Albinus <michael.albinus@gmx.de>,  emacs-devel@gnu.org
Subject: Re: master 39e3fce0d5e0: 'read-passwd' can toggle the visibility of passwords
Date: Fri, 15 Mar 2024 09:29:18 -0400	[thread overview]
Message-ID: <jwvplvvk4rk.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86wmq39av4.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 15 Mar 2024 10:07:27 +0200")

> The changes in the above commit cause the following warning when
> compiling simple.el:
>
>   In read-passwd-toggle-visibility:
>   simple.el:10880:18: Warning: reference to free variable `icon-preference'

Does the patch below fix the problem?
[ I remember seeing the warning a few days ago, but can't reproduce it
  right now.  ]

Maybe we should do something so `icons.el` is easier to use
from preloaded files.


        Stefan


diff --git a/lisp/simple.el b/lisp/simple.el
index f127290231b..e0988f9dbd1 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -10870,6 +10932,8 @@ read-passwd-toggle-visibility
   "Toggle minibuffer contents visibility.
 Adapt also mode line."
   (interactive)
+  (require 'icons) ;; Will presumably already be loaded.
+  (defvar icon-preference)
   (setq read-passwd--hide-password (not read-passwd--hide-password))
   (with-current-buffer read-passwd--mode-line-buffer
     (setq read-passwd--mode-line-icon




  parent reply	other threads:[~2024-03-15 13:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15  8:07 master 39e3fce0d5e0: 'read-passwd' can toggle the visibility of passwords Eli Zaretskii
2024-03-15  8:23 ` Michael Albinus
2024-03-15  8:55   ` Eli Zaretskii
2024-03-15 11:55   ` Andreas Schwab
2024-03-15 12:19     ` Michael Albinus
2024-03-15 12:47       ` Andreas Schwab
2024-03-15 12:52         ` Eli Zaretskii
2024-03-15 18:20           ` Michael Albinus
2024-03-15 18:25             ` Stefan Monnier
2024-03-15 13:29 ` Stefan Monnier [this message]
2024-03-15 15:11   ` Eli Zaretskii
2024-03-15 17:55     ` Stefan Monnier
2024-03-15 18:23       ` Michael Albinus
2024-03-22 17:43         ` Michael Albinus
2024-04-04 15:24           ` Michael Albinus
2024-03-15 18:37       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvplvvk4rk.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).