From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Short patch for review Date: Wed, 18 Feb 2015 19:17:52 -0200 Message-ID: Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1424294280 12906 80.91.229.3 (18 Feb 2015 21:18:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Feb 2015 21:18:00 +0000 (UTC) Cc: Kelly Dean To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 18 22:18:00 2015 Return-path: Envelope-to: ged-emacs-devel@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 1YOC0N-0007NQ-N1 for ged-emacs-devel@m.gmane.org; Wed, 18 Feb 2015 22:17:59 +0100 Original-Received: from localhost ([::1]:53147 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOC0M-0002SY-Se for ged-emacs-devel@m.gmane.org; Wed, 18 Feb 2015 16:17:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOC0I-0002RY-Jx for emacs-devel@gnu.org; Wed, 18 Feb 2015 16:17:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOC0H-0001io-F2 for emacs-devel@gnu.org; Wed, 18 Feb 2015 16:17:54 -0500 Original-Received: from mail-ob0-x22d.google.com ([2607:f8b0:4003:c01::22d]:63617) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOC0H-0001ig-Ac for emacs-devel@gnu.org; Wed, 18 Feb 2015 16:17:53 -0500 Original-Received: by mail-ob0-f173.google.com with SMTP id uy5so7270363obc.4 for ; Wed, 18 Feb 2015 13:17:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:date:message-id:subject:from:to:cc :content-type; bh=8v838elHGzHMNdrfiNofFKzdF4aVbLqlRj9cSM3zc58=; b=T/a3g1c6L8ITT4L+aOgvPY1bAi95rnxAI8IfJYDsJgcFq04CYz82tWaKSxzVBxTTas D4YVU/lGi7kzY6j2wVsR+eibR6tDn22+EvhAUAhXixmDWWfWqyCg/MXzjaiw4wlmF2Cw 8byl7Z/alITzDHUm/FjCbNWpvYpDnAl+x5bBbA1tk6jFHIYRdwnYR/MkcfvB3b2RchBz fYWisJ2BXX0leDAc8GnksEfD9mWmmoBefd6V1A4zp5JcKySQJFtCif/hpiZQE13GC2TH fO6mqAaRKI2Y82P/HHJeA4SVBwJgNgN+Ej51/FJtRy4qSzdly7zKygr7ntLQ/zsk3H0w T93w== X-Received: by 10.182.231.230 with SMTP id tj6mr903946obc.58.1424294272894; Wed, 18 Feb 2015 13:17:52 -0800 (PST) Original-Received: by 10.76.125.1 with HTTP; Wed, 18 Feb 2015 13:17:52 -0800 (PST) X-Google-Sender-Auth: jSBvl05B2gy3GKz7FSRpgBKcz2M X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183271 Archived-At: Hi all, Kelly sent me a patch for changing a couple of `error' instances into `user-error'. It looks ok to me, but I'd appreciate if someone could confirm that it's alright. --- src/ChangeLog | 10 +++++++++- src/keyboard.c | 4 ++-- src/lisp.h | 1 + src/minibuf.c | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 76e1956..1c74a9a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,14 @@ +2015-02-18 Kelly Dean + + * lisp.h: + * keyboard.c: Move declaration of user_error to header file. + * keyboard.c (recursive_edit_1): Signal Quser_error, not Qerror. + * minibuf.c (read_minibuf): Use user_error, not error. + (Bug#14480) + 2015-02-16 Kelly Dean - * src/keyboard.c (timer_check_2): Fix incorrect comment. + * keyboard.c (timer_check_2): Fix incorrect comment. 2015-02-14 Martin Rudalics diff --git a/src/keyboard.c b/src/keyboard.c index ac70062..304d8a2 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -731,7 +731,7 @@ recursive_edit_1 (void) /* Handle throw from read_minibuf when using minibuffer while it's active but we're in another window. */ if (STRINGP (val)) - xsignal1 (Qerror, val); + xsignal1 (Quser_error, val); return unbind_to (count, Qnil); } @@ -1179,7 +1179,7 @@ This also exits all active minibuffers. */ Fthrow (Qtop_level, Qnil); } -static _Noreturn void +_Noreturn void user_error (const char *msg) { xsignal1 (Quser_error, build_string (msg)); diff --git a/src/lisp.h b/src/lisp.h index 7795c90..ca73d21 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -4005,6 +4005,7 @@ extern Lisp_Object unbind_to (ptrdiff_t, Lisp_Object); extern _Noreturn void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); extern _Noreturn void verror (const char *, va_list) ATTRIBUTE_FORMAT_PRINTF (1, 0); +extern _Noreturn void user_error (const char *); extern void un_autoload (Lisp_Object); extern Lisp_Object call_debugger (Lisp_Object arg); extern void init_eval_once (void); diff --git a/src/minibuf.c b/src/minibuf.c index 3408bb9..fca1a0d 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -449,7 +449,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, && minibuf_level > 0) { if (EQ (selected_window, minibuf_window)) - error ("Command attempted to use minibuffer while in minibuffer"); + user_error ("Command attempted to use minibuffer while in minibuffer"); else /* If we're in another window, cancel the minibuffer that's active. */ Fthrow (Qexit, -- 1.7.10.4