From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#13177: 24.3.50; doc of `read-char-by-name' Date: Sat, 15 Dec 2012 13:09:39 +0200 Organization: JURTA Message-ID: <8762431shy.fsf@mail.jurta.org> References: <4AF22BD1F38E4AF2A650D1F537B47069@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1355570108 8800 80.91.229.3 (15 Dec 2012 11:15:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Dec 2012 11:15:08 +0000 (UTC) Cc: 13177@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 15 12:15:22 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tjpi9-0001o7-VU for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Dec 2012 12:15:18 +0100 Original-Received: from localhost ([::1]:57668 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tjphw-00043o-OA for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Dec 2012 06:15:04 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tjphu-00042T-04 for bug-gnu-emacs@gnu.org; Sat, 15 Dec 2012 06:15:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tjphr-0004Rr-VH for bug-gnu-emacs@gnu.org; Sat, 15 Dec 2012 06:15:01 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tjphr-0004Rn-SG for bug-gnu-emacs@gnu.org; Sat, 15 Dec 2012 06:14:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tjpis-0000j6-BL for bug-gnu-emacs@gnu.org; Sat, 15 Dec 2012 06:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Dec 2012 11:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13177 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13177-submit@debbugs.gnu.org id=B13177.13555701262748 (code B ref 13177); Sat, 15 Dec 2012 11:16:02 +0000 Original-Received: (at 13177) by debbugs.gnu.org; 15 Dec 2012 11:15:26 +0000 Original-Received: from localhost ([127.0.0.1]:43376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TjpiH-0000iF-NL for submit@debbugs.gnu.org; Sat, 15 Dec 2012 06:15:26 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:52745 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TjpiG-0000i9-Bn for 13177@debbugs.gnu.org; Sat, 15 Dec 2012 06:15:24 -0500 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 52948451CBE4; Sat, 15 Dec 2012 03:14:20 -0800 (PST) In-Reply-To: <4AF22BD1F38E4AF2A650D1F537B47069@us.oracle.com> (Drew Adams's message of "Thu, 13 Dec 2012 20:01:47 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:68543 Archived-At: > Dunno just what the intention was for this function. If it really > was to return a recognized Unicode character then this is a product > bug and reading should not end until the user enters matching input > (or hits `C-g'). As its docstring says, it also accepts a hexadecimal number of Unicode code whose input can't use completion. > Anyway, for this bug report and for my part, it would be enough > to correct the doc to say that if the user enters a name that > is unknown then nil is returned. Then this patch would be enough: === modified file 'lisp/international/mule-cmds.el' --- lisp/international/mule-cmds.el 2012-10-11 20:05:47 +0000 +++ lisp/international/mule-cmds.el 2012-12-15 11:09:03 +0000 @@ -2944,7 +2944,10 @@ (defun read-char-by-name (prompt) This function also accepts a hexadecimal number of Unicode code point or a number in hash notation, e.g. #o21430 for octal, -#x2318 for hex, or #10r8984 for decimal." +#x2318 for hex, or #10r8984 for decimal. + +When input is neither a known Unicode name nor a hex number string, +return nil." (let ((input (completing-read prompt