unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Ilya Khaprov <ilya.khaprov@publitechs.com>
Cc: 28774@debbugs.gnu.org
Subject: bug#28774: Master, emacs-26: Can't add text property to built-in function name.
Date: Tue, 10 Oct 2017 06:21:41 -0400	[thread overview]
Message-ID: <877ew3cngq.fsf@users.sourceforge.net> (raw)
In-Reply-To: <AM5P189MB0258C4E2AC88F76400D77EFCF4750@AM5P189MB0258.EURP189.PROD.OUTLOOK.COM> (Ilya Khaprov's message of "Tue, 10 Oct 2017 07:57:04 +0000")

Ilya Khaprov <ilya.khaprov@publitechs.com> writes:
>
> After commit :3db388b0bf the following stopped working:
>
> (global-set-key
>  "\M-x"
>  (lambda ()
>    (interactive)
>    (call-interactively
>     (intern
>      (ido-completing-read
>       "M-x "
>       (all-completions "" obarray 'commandp))))))

It seems ido-completions relies on (format "%s" str) to return a copy of
str.  This fixes it:

--- i/lisp/ido.el
+++ w/lisp/ido.el
@@ -4701,7 +4701,7 @@ ido-completions
     (if (and ido-use-faces comps)
 	(let* ((fn (ido-name (car comps)))
 	       (ln (length fn)))
-	  (setq first (format "%s" fn))
+	  (setq first (copy-sequence fn))
 	  (put-text-property 0 ln 'face
 			     (if (= (length comps) 1)
                                  (if ido-incomplete-regexp







  reply	other threads:[~2017-10-10 10:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10  7:57 bug#28774: Master, emacs-26: Can't add text property to built-in function name Ilya Khaprov
2017-10-10 10:21 ` Noam Postavsky [this message]
2017-10-10 14:01   ` Drew Adams
2017-10-10 14:12     ` Noam Postavsky
2017-10-12  0:56   ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877ew3cngq.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=28774@debbugs.gnu.org \
    --cc=ilya.khaprov@publitechs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).