|
From: | Stefan Monnier |
Subject: | Re: scratch/tzz/auth-source-reveal-mode 4a7c98d 3/3: Create and document auth-source-reveal-mode |
Date: | Mon, 22 Jun 2020 16:03:31 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> +(define-minor-mode auth-source-reveal-mode [...] > + (when auth-source-reveal-mode > + ;; Install the prettification magic. > + (prettify-symbols-add-prettification-rx > + 'auth-source-reveal-mode-prettify-regexp ; The identifier symbol. > + ;; regexp to hide/reveal > + (if (apply #'derived-mode-p auth-source-reveal-json-modes) > + (format "\"?password\"?[:[:blank:]]+\"\\([^\t\r\n\"]+\\)\"" > auth-source-reveal-regex) > + (format "\\b%s\\b\\s-+\\([^ \t\r\n]+\\)" auth-source-reveal-regex)) > + auth-source-reveal-hider) > + > + (setq-local > + prettify-symbols-compose-predicate #'auth-source-reveal-compose-p) This erases any prior configuration of that variable, so it won't "play ball" with other users. > + (prettify-symbols-mode (if auth-source-reveal-mode 1 -1))) And here we forcefully enable/disable `prettify-symbols-mode` even if all the user wanted if to hide the passwords. I think we need to decouple the two user-level features. Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |