]> git.eshelyaron.com Git - emacs.git/commitdiff
Only call set-text-conversion-style if it exists
authorMattias EngdegÄrd <mattiase@acm.org>
Fri, 5 Apr 2024 13:54:30 +0000 (15:54 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 6 Apr 2024 06:41:45 +0000 (08:41 +0200)
* lisp/auth-source.el (read-passwd): Guard call, as it was before the
code was moved here.
`set-text-conversion-style` is not present in all configurations.

(cherry picked from commit 4fc84cb23b6d671b44f18b8462e94c3bcfc3ee09)

lisp/auth-source.el

index a8bd9855720c35124d23254c762f7dff75f8359b..e6dbead7476d3bc09839e054eaf59099d60da670 100644 (file)
@@ -2547,7 +2547,6 @@ Adapt also mode line."
     (read-passwd-toggle-visibility)))
 
 (defvar overriding-text-conversion-style)
-(declare-function set-text-conversion-style "textconv.c")
 
 ;;;###autoload
 (defun read-passwd (prompt &optional confirm default)
@@ -2605,7 +2604,8 @@ by doing (clear-string STRING)."
               ;; And of course, don't keep the sensitive data around.
               (erase-buffer)
               ;; Then restore the previous text conversion style.
-              (set-text-conversion-style text-conversion-style))))))))
+              (when (fboundp 'set-text-conversion-style)
+                (set-text-conversion-style text-conversion-style)))))))))
 
 (provide 'auth-source)