Commit ae302641 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(read-language-name): Use a default, not an initial input.

parent c63f7d2a
......@@ -313,15 +313,15 @@ ALIST is an alist of KEY and INFO. See the documentation of
(set-language-info language-name (car (car alist)) (cdr (car alist)))
(setq alist (cdr alist))))
(defun read-language-name (key prompt &optional initial-input)
(defun read-language-name (key prompt &optional default)
"Read language name which has information for KEY, prompting with PROMPT.
DEFAULT is the default choice of language.
It returns a string as language name."
(let* ((completion-ignore-case t)
(name (completing-read prompt
(function (lambda (elm) (assq key elm)))
t nil nil default)))
(if (and (> (length name) 0)
(get-language-info name key))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment