diff options
author | jao <jao@gnu.org> | 2024-12-09 11:12:21 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2024-12-09 11:12:43 +0000 |
commit | 0b30ee14f0b67702896732d609c402e6c35c17b1 (patch) | |
tree | c47dd178316148a612ca59ac66adb3a0ca63d186 | |
parent | 506e4641cb7258b395bff409bf501e000bdd1960 (diff) | |
download | elibs-0b30ee14f0b67702896732d609c402e6c35c17b1.tar.gz elibs-0b30ee14f0b67702896732d609c402e6c35c17b1.tar.bz2 |
randomsig: not asking for sig file if there's only onemain
-rw-r--r-- | lib/net/randomsig.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/net/randomsig.el b/lib/net/randomsig.el index cb37694..05b95ab 100644 --- a/lib/net/randomsig.el +++ b/lib/net/randomsig.el @@ -1,6 +1,6 @@ ;;; randomsig.el --- insert a randomly selected signature -;; Copyright (C) 2001, 2002, 2013, 2020, 2021 Hans-Jürgen Ficker +;; Copyright (C) 2001, 2002, 2013, 2020, 2021, 2024 Hans-Jürgen Ficker ;; Emacs Lisp Archive Entry ;; Author: Hans-Juergen Ficker <hj@backmes.de> @@ -277,8 +277,11 @@ You probably want to have a newline at the end of it." (defun randomsig-prompt (&optional prompt) ;; Prompt for a signature file. (let ((files (randomsig-files-to-list randomsig-files))) - (completing-read (if prompt prompt "signature: ") - (mapcar 'list files) nil t nil randomsig-history (car files)))) + (if (cdr files) + (completing-read (if prompt prompt "signature: ") + (mapcar 'list files) nil t nil + randomsig-history (car files)) + (car files)))) (defun randomsig-read-signatures-to-buffer (buffer-name &optional files) ;; read the signatures into the signature buffer |