From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!not-for-mail
From: Stefan Monnier <monnier@iro.umontreal.ca>
Newsgroups: gmane.emacs.bugs
Subject: bug#19551: 25.0.50;
	No lighter shown for `text-scale-mode' when it should be `+0'
Date: Fri, 09 Jan 2015 18:48:46 -0500
Message-ID: <jwvr3v35xdk.fsf-monnier+emacsbugs@gnu.org>
References: <73f694e6-cb65-478a-96a2-05749ac658e0@default>
	<87sifj8tlt.fsf@gmx.net>
	<5a7e10ff-e3b4-4770-80e3-bf8c6e914443@default>
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: ger.gmane.org 1420847362 5970 80.91.229.3 (9 Jan 2015 23:49:22 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 9 Jan 2015 23:49:22 +0000 (UTC)
Cc: 19551-done@debbugs.gnu.org, Stephen Berman <stephen.berman@gmx.net>
To: Drew Adams <drew.adams@oracle.com>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 10 00:49:15 2015
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane.org
Original-Received: from lists.gnu.org ([208.118.235.17])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1Y9jIn-0003RZ-K5
	for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Jan 2015 00:49:13 +0100
Original-Received: from localhost ([::1]:52650 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1Y9jIm-0004lR-Vs
	for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Jan 2015 18:49:12 -0500
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35242)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Y9jIj-0004lL-Gq
	for bug-gnu-emacs@gnu.org; Fri, 09 Jan 2015 18:49:10 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Y9jId-0003ro-6v
	for bug-gnu-emacs@gnu.org; Fri, 09 Jan 2015 18:49:09 -0500
Original-Received: from debbugs.gnu.org ([140.186.70.43]:60135)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Y9jId-0003rj-3j
	for bug-gnu-emacs@gnu.org; Fri, 09 Jan 2015 18:49:03 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1Y9jIc-0008In-TE
	for bug-gnu-emacs@gnu.org; Fri, 09 Jan 2015 18:49:02 -0500
Resent-From: Stefan Monnier <monnier@iro.umontreal.ca>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-To: bug-gnu-emacs@gnu.org
Resent-Date: Fri, 09 Jan 2015 23:49:02 +0000
Resent-Message-ID: <handler.19551.D19551.142084732931871.done@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: cc-closed 19551
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: notabug
Mail-Followup-To: 19551@debbugs.gnu.org, monnier@iro.umontreal.ca,
	drew.adams@oracle.com
Original-Received: via spool by 19551-done@debbugs.gnu.org id=D19551.142084732931871
	(code D ref 19551); Fri, 09 Jan 2015 23:49:02 +0000
Original-Received: (at 19551-done) by debbugs.gnu.org; 9 Jan 2015 23:48:49 +0000
Original-Received: from localhost ([127.0.0.1]:41262 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1Y9jIP-0008Hy-CN
	for submit@debbugs.gnu.org; Fri, 09 Jan 2015 18:48:49 -0500
Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:21363)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <monnier@iro.umontreal.ca>)
	id 1Y9jIN-0008Hm-Au; Fri, 09 Jan 2015 18:48:47 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Am4PAOwQflS4rwoL/2dsb2JhbABbgweBK4I1hVrFHQQCAoEkFwEBAQEBAXyEAwEBAwFWIwULCzQSFBgNJBOINwnWWQEBAQEBBQEBAQEBHZBvB4RIBYsBjkaDe5FtgXiCN4FiITCCRwEBAQ
X-IPAS-Result: Am4PAOwQflS4rwoL/2dsb2JhbABbgweBK4I1hVrFHQQCAoEkFwEBAQEBAXyEAwEBAwFWIwULCzQSFBgNJBOINwnWWQEBAQEBBQEBAQEBHZBvB4RIBYsBjkaDe5FtgXiCN4FiITCCRwEBAQ
X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="107250404"
Original-Received: from 184-175-10-11.dsl.teksavvy.com (HELO ceviche.home)
	([184.175.10.11])
	by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA;
	09 Jan 2015 18:48:46 -0500
Original-Received: by ceviche.home (Postfix, from userid 20848)
	id 7597466100; Fri,  9 Jan 2015 18:48:46 -0500 (EST)
In-Reply-To: <5a7e10ff-e3b4-4770-80e3-bf8c6e914443@default> (Drew Adams's
	message of "Fri, 9 Jan 2015 14:53:42 -0800 (PST)")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 140.186.70.43
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
	the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org
Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org
Xref: news.gmane.org gmane.emacs.bugs:98155
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/98155>

tags 19551 notabug
thanks

It's a feature.


        Stefan


>>>>> "Drew" == Drew Adams <drew.adams@oracle.com> writes:

>> > I don't know how or why this happens, but when buffer text is zoomed out
>> > and back in, so that the resulting text scale is neutral (100%, zero
>> > increase/decrease), the mode-line lighter should say `+0', as specified
>> > in the code (`face-remap.el').  For some reason, the lighter just
>> > disappears, as if the value of `text-scale-mode-lighter' were nil.
>> 
>> I don't think this is a bug.  If I understand the code correctly, the
>> lighter disappears because the minor mode is turned off when the text
>> scale is 0; see this line in `text-scale-increase':
>> 
>> (text-scale-mode (if (zerop text-scale-mode-amount) -1 1))

> Ah, right you are.  I didn't notice that.  I should have guessed this.

>> I also don't see anywhere in face-remap.el that specifies the lighter is
>> "+0" when the text scale is 0 (the default value of
>> `text-scale-mode-lighter' is "+0", but changes as soon as
>> text-scale-mode is enabled).

> It's done in `text-scale-mode':
> (setq text-scale-mode-lighter
> 	(format (if (>= text-scale-mode-amount 0) "+%d" "%d")
> 		text-scale-mode-amount))

> That sets `text-scale-mode-lighter' to "+0" when `text-scale-mode-amount' is 0.

> I'm OK with the bug being closed.