335 |
(defun gnus-completing-read-with-default (default prompt &rest args) |
(defun gnus-completing-read-with-default (default prompt &rest args) |
336 |
;; Like `completing-read', except that DEFAULT is the default argument. |
;; Like `completing-read', except that DEFAULT is the default argument. |
337 |
(let* ((prompt (if default |
(let* ((prompt (if default |
338 |
(concat prompt " (default " default ") ") |
(concat prompt " (default " default "): ") |
339 |
(concat prompt " "))) |
(concat prompt ": "))) |
340 |
(answer (apply 'completing-read prompt args))) |
(answer (apply 'completing-read prompt args))) |
341 |
(if (or (null answer) (zerop (length answer))) |
(if (or (null answer) (zerop (length answer))) |
342 |
default |
default |