* bug#25687: 26.0.50; [PATCH] Fix completing-read call in reb-change-syntax
@ 2017-02-11 6:40 Chunyang Xu
2017-03-03 0:13 ` npostavs
0 siblings, 1 reply; 2+ messages in thread
From: Chunyang Xu @ 2017-02-11 6:40 UTC (permalink / raw)
To: 25687
[-- Attachment #1: Type: text/plain, Size: 174 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-completing-read-call-in-reb-change-syntax.patch --]
[-- Type: text/x-patch, Size: 1206 bytes --]
From c0b4621083a6947f75ea58b4c535452a4caad4a5 Mon Sep 17 00:00:00 2001
From: Chunyang Xu <mail@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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#25687: 26.0.50; [PATCH] Fix completing-read call in reb-change-syntax
2017-02-11 6:40 bug#25687: 26.0.50; [PATCH] Fix completing-read call in reb-change-syntax Chunyang Xu
@ 2017-03-03 0:13 ` npostavs
0 siblings, 0 replies; 2+ messages in thread
From: npostavs @ 2017-03-03 0:13 UTC (permalink / raw)
To: Chunyang Xu; +Cc: 25687
tags 25687 fixed
close 25687 26.1
quit
Chunyang Xu <mail@xuchunyang.me> writes:
> From: Chunyang Xu <mail@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-03 0:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-11 6:40 bug#25687: 26.0.50; [PATCH] Fix completing-read call in reb-change-syntax Chunyang Xu
2017-03-03 0:13 ` npostavs
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.