unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19551: 25.0.50; No lighter shown for `text-scale-mode' when it should be `+0'
@ 2015-01-09 22:18 Drew Adams
  2015-01-09 22:41 ` Stephen Berman
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2015-01-09 22:18 UTC (permalink / raw)
  To: 19551

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.

In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
 of 2014-10-20 on LEG570
Bzr revision: 118168 rgm@gnu.org-20141020195941-icp42t8ttcnud09g
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking=yes,glyphs CPPFLAGS=-DGLYPH_DEBUG=1'





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#19551: 25.0.50; No lighter shown for `text-scale-mode' when it should be `+0'
  2015-01-09 22:18 bug#19551: 25.0.50; No lighter shown for `text-scale-mode' when it should be `+0' Drew Adams
@ 2015-01-09 22:41 ` Stephen Berman
  2015-01-09 22:53   ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Berman @ 2015-01-09 22:41 UTC (permalink / raw)
  To: Drew Adams; +Cc: 19551

On Fri, 9 Jan 2015 14:18:53 -0800 (PST) Drew Adams <drew.adams@oracle.com> wrote:

> 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))

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).

Steve Berman





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#19551: 25.0.50; No lighter shown for `text-scale-mode' when it should be `+0'
  2015-01-09 22:41 ` Stephen Berman
@ 2015-01-09 22:53   ` Drew Adams
  2015-01-09 23:48     ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2015-01-09 22:53 UTC (permalink / raw)
  To: Stephen Berman; +Cc: 19551

> > 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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#19551: 25.0.50; No lighter shown for `text-scale-mode' when it should be `+0'
  2015-01-09 22:53   ` Drew Adams
@ 2015-01-09 23:48     ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2015-01-09 23:48 UTC (permalink / raw)
  To: Drew Adams; +Cc: 19551-done, Stephen Berman

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.







^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-09 23:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-09 22:18 bug#19551: 25.0.50; No lighter shown for `text-scale-mode' when it should be `+0' Drew Adams
2015-01-09 22:41 ` Stephen Berman
2015-01-09 22:53   ` Drew Adams
2015-01-09 23:48     ` Stefan Monnier

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).