From 7fe2dbbfd6e2a73ea082e739a7729cd9c24aad91 Mon Sep 17 00:00:00 2001 From: Torsten Hilbrich Date: Sat, 27 Aug 2011 21:08:49 +0200 Subject: Use read-string with default value The use of initial value is deprecated and less user-friendly. Fix taken from Debian package. --- dictionary.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dictionary.el b/dictionary.el index 72e633d..fb0c2e1 100755 --- a/dictionary.el +++ b/dictionary.el @@ -1045,9 +1045,16 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." "Search the `word' in `dictionary' if given or in all if nil. It presents the word at point as default input and allows editing it." (interactive - (list (read-string "Search word: " (current-word)) + (list (let ((default (current-word t))) + (read-string (if default + (format "Search word (%s): " default) + "Search word: ") + nil nil default)) (if current-prefix-arg - (read-string "Dictionary: " dictionary-default-dictionary) + (read-string (if dictionary-default-dictionary + (format "Dictionary (%s): " dictionary-default-dictionary) + "Dictionary: ") + nil nil dictionary-default-dictionary) dictionary-default-dictionary))) ;; if called by pressing the button -- cgit v1.2.3