Subject: 26.0.50; [PATCH] Fix completing-read call in reb-change-syntax

From: Chunyang Xu <[email-masked]>
Date: Sat, 11 Feb 2017 14:40:41 +0800

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.

>From c0b4621083a6947f75ea58b4c535452a4caad4a5 Mon Sep 17 00:00:00 2001
From: Chunyang Xu <[email-masked]>
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