From: Chunyang Xu Date: Sat, 11 Feb 2017 06:17:26 +0000 (+0800) Subject: Fix completing-read call in reb-change-syntax X-Git-Tag: emacs-26.0.90~660 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=55c0c3e31bc3dff83753cdba6288228bd025ac84;p=emacs.git 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 --- diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index 5264dae52ae..f60d723a883 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -488,10 +488,10 @@ If the optional PAUSE is non-nil then pause at the end in any case." 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)))