diff options
author | Torsten Hilbrich <torsten.hilbrich@gmx.net> | 2011-08-27 21:08:49 +0200 |
---|---|---|
committer | Torsten Hilbrich <torsten.hilbrich@gmx.net> | 2011-08-27 21:08:49 +0200 |
commit | 7fe2dbbfd6e2a73ea082e739a7729cd9c24aad91 (patch) | |
tree | 3c55720992c4c2e4ed1cd60f6a4b4e7f11bbb162 | |
parent | 0e744319215aaf1c03f7d88819d5ebdd79b1a57f (diff) |
Use read-string with default value
The use of initial value is deprecated and less user-friendly.
Fix taken from Debian package.
-rwxr-xr-x | dictionary.el | 11 |
1 files 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 |