GNU bug report logs - #25687
26.0.50; [PATCH] Fix completing-read call in reb-change-syntax

Previous Next

Package: emacs;

Reported by: Chunyang Xu <mail <at> xuchunyang.me>

Date: Sat, 11 Feb 2017 06:42:01 UTC

Severity: minor

Tags: fixed, patch

Found in version 26.0.50

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25687 in the body.
You can then email your comments to 25687 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25687; Package emacs. (Sat, 11 Feb 2017 06:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chunyang Xu <mail <at> xuchunyang.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 11 Feb 2017 06:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Chunyang Xu <mail <at> xuchunyang.me>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; [PATCH] Fix completing-read call in reb-change-syntax
Date: Sat, 11 Feb 2017 14:40:41 +0800
[Message part 1 (text/plain, inline)]
Hi,

I find it makes more sense to use 'default' arg of completing-read than
'initial-input' arg, because I don't have to delete it before I can
actually change to another.

[0001-Fix-completing-read-call-in-reb-change-syntax.patch (text/x-patch, inline)]
From c0b4621083a6947f75ea58b4c535452a4caad4a5 Mon Sep 17 00:00:00 2001
From: Chunyang Xu <mail <at> xuchunyang.me>
Date: Sat, 11 Feb 2017 14:17:26 +0800
Subject: [PATCH] Fix completing-read call in reb-change-syntax

* lisp/emacs-lisp/re-builder.el (reb-change-syntax): Use 'default' arg
of completing-read.

Copyright-paperwork-exempt: yes
---
 lisp/emacs-lisp/re-builder.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 5264dae52a..f60d723a88 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -488,10 +488,10 @@ reb-change-syntax
 Optional argument SYNTAX must be specified if called non-interactively."
   (interactive
    (list (intern
-	  (completing-read "Select syntax: "
-			   (mapcar (lambda (el) (cons (symbol-name el) 1))
-				   '(read string sregex rx))
-			   nil t (symbol-name reb-re-syntax)))))
+	  (completing-read
+	   (format "Select syntax (default %s): " reb-re-syntax)
+	   '(read string sregex rx)
+	   nil t nil nil (symbol-name reb-re-syntax)))))
 
   (if (memq syntax '(read string sregex rx))
       (let ((buffer (get-buffer reb-buffer)))
-- 
2.11.0


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25687; Package emacs. (Fri, 03 Mar 2017 00:13:02 GMT) Full text and rfc822 format available.

Message #8 received at 25687 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Chunyang Xu <mail <at> xuchunyang.me>
Cc: 25687 <at> debbugs.gnu.org
Subject: Re: bug#25687: 26.0.50;
 [PATCH] Fix completing-read call in reb-change-syntax
Date: Thu, 02 Mar 2017 19:13:37 -0500
tags 25687 fixed
close 25687 26.1
quit

Chunyang Xu <mail <at> xuchunyang.me> writes:

> From: Chunyang Xu <mail <at> xuchunyang.me>
> Date: Sat, 11 Feb 2017 14:17:26 +0800
> Subject: [PATCH] Fix completing-read call in reb-change-syntax

Pushed to master [1: 55c0c3e31b].

1: 2017-03-02 19:01:18 -0500 55c0c3e31bc3dff83753cdba6288228bd025ac84
  Fix completing-read call in reb-change-syntax





Added tag(s) fixed. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Fri, 03 Mar 2017 00:13:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 26.1, send any further explanations to 25687 <at> debbugs.gnu.org and Chunyang Xu <mail <at> xuchunyang.me> Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Fri, 03 Mar 2017 00:13:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 31 Mar 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 143 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.