From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Newsgroups: gmane.emacs.bugs Subject: bug#5670: Bug in `momentary-string-display' Date: Tue, 2 Mar 2010 00:52:23 +0100 Message-ID: <20100301235223.GF16169@headley> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: dough.gmane.org 1267487701 28339 80.91.229.12 (1 Mar 2010 23:55:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 1 Mar 2010 23:55:01 +0000 (UTC) To: 5670@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 02 00:54:57 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NmFRw-0002pm-Bo for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Mar 2010 00:54:56 +0100 Original-Received: from localhost ([127.0.0.1]:45347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NmFRv-00028f-Pe for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Mar 2010 18:54:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NmFRB-0001SV-Nx for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2010 18:54:09 -0500 Original-Received: from [140.186.70.92] (port=55728 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NmFRA-0001R4-Ez for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2010 18:54:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NmFR8-0001iB-TC for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2010 18:54:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46878) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NmFR8-0001i7-RN for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2010 18:54:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NmFQ6-0002eN-Gi; Mon, 01 Mar 2010 18:53:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Mar 2010 23:53:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5670 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.126748757310177 (code B ref -1); Mon, 01 Mar 2010 23:53:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Mar 2010 23:52:53 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NmFPw-0002e6-OD for submit@debbugs.gnu.org; Mon, 01 Mar 2010 18:52:52 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NmFPL-0002dL-0N for submit@debbugs.gnu.org; Mon, 01 Mar 2010 18:52:17 -0500 Original-Received: from mail.gnu.org ([199.232.76.166]:33612 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NmFPH-0000Ti-7J for submit@debbugs.gnu.org; Mon, 01 Mar 2010 18:52:11 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NmFPF-0000L4-TC for submit@debbugs.gnu.org; Mon, 01 Mar 2010 18:52:11 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:51126) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NmFPF-0000Ks-NR for submit@debbugs.gnu.org; Mon, 01 Mar 2010 18:52:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NmFPE-0006hx-TV for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2010 18:52:09 -0500 Original-Received: from [140.186.70.92] (port=53990 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NmFP7-0006XN-IR for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2010 18:52:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NmFP6-0001Y1-LQ for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2010 18:52:01 -0500 Original-Received: from mail-fx0-f222.google.com ([209.85.220.222]:60882) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NmFP6-0001Xx-H5 for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2010 18:52:00 -0500 Original-Received: by fxm22 with SMTP id 22so3134103fxm.26 for ; Mon, 01 Mar 2010 15:51:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mail-followup-to:mime-version:content-type :content-disposition:user-agent; bh=yMYtjjbJvd1MvNb9XGWJOlXSISGjyyhQrNTw1xYhsRE=; b=G22Mvk+LaZ4N9O4qlK1JQupkI60el4FC15EyGDTII1BysMYBk2+YL2verJVQFEu31e fyGqGCCiOpkEyS4msbq1mxGs1zNu2u7p32fn2pAUAvnVM30qt6cUyQB3RlSHErw2NUYt 9W5+dhfvIrUS9zrzbDPgsNoSCOUcMr84wf8U4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; b=jQapiH4aNSPmTUjQDJTMgmmMLzqbDt7lHnwfQ/D+qbRMavmkw2ece4qN/FXV9f4aWB TFB0lEfNYLdvNPYmkZtDI6z5A6DG9qhjqvx8twx41N80i742gt1pN1CqrUsOqWJBuRUh 5gSXsWOY0hP8SfBn/TKZTWQj6jQJBW02ftYcw= Original-Received: by 10.223.100.129 with SMTP id y1mr730478fan.15.1267487519459; Mon, 01 Mar 2010 15:51:59 -0800 (PST) Original-Received: from localhost ([88.103.132.186]) by mx.google.com with ESMTPS id 26sm6229290fks.52.2010.03.01.15.51.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Mar 2010 15:51:59 -0800 (PST) Mail-Followup-To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= , bug-gnu-emacs@gnu.org Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-08-27) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Mon, 01 Mar 2010 18:52:51 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 01 Mar 2010 18:53:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35379 Archived-At: Let binding of `message' inside the function shadows one of the arguments, leading to the momentarily inserted string (instead of the message) being displayed in the echo area. The patch below fixes that. --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2196,15 +2196,15 @@ Display MESSAGE (optional fourth arg) in the echo area. If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there." (or exit-char (setq exit-char ?\s)) (let ((ol (make-overlay pos pos)) - (message (copy-sequence string))) + (str (copy-sequence string))) (unwind-protect (progn (save-excursion - (overlay-put ol 'after-string message) + (overlay-put ol 'after-string str) (goto-char pos) ;; To avoid trouble with out-of-bounds position (setq pos (point)) - ;; If the message end is off screen, recenter now. + ;; If the string end is off screen, recenter now. (if (<= (window-end nil t) pos) (recenter (/ (window-height) 2)))) (message (or message "Type %s to continue editing.")