From: Richard M. Stallman Date: Wed, 3 Sep 1997 22:29:06 +0000 (+0000) Subject: (read-language-name): Use a default, not an initial input. X-Git-Tag: emacs-20.1~214 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ae302641c2aab9e0ffb1ce425f9b6d1368faaf59;p=emacs.git (read-language-name): Use a default, not an initial input. --- diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index dee700d5268..96a02749123 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -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 language-info-alist (function (lambda (elm) (assq key elm))) - t - initial-input))) + t nil nil default))) (if (and (> (length name) 0) (get-language-info name key)) name)))