|
From: | Stefan Monnier |
Subject: | Re: read-from-minibuffer with default value string |
Date: | Sun, 05 Dec 2010 22:54:02 -0500 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> (defun double-query () > (interactive) > (let ((key (completing-read "Journal: " collection-list))) > (if (setq code (cadr (assoc key collection-list))) > (message "Pass <%s> to another function here" code) > (if (y-or-n-p "Add to list?") > (let* ((key (read-from-minibuffer (format "Journal Title <%s>: " key) > key)) > (code (read-from-minibuffer "Journal Bibtex Code: "))) > (push (list key code) collection-list) > (message "Pass <%s> to another function here" code)))))) Use read-string rather than the low-level `read-from-minibuffer'. Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |