help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toggling the reverse frame parameter


From: Eli Zaretskii
Subject: Re: Toggling the reverse frame parameter
Date: Sat, 26 Mar 2011 10:51:58 +0200

> Date: Sat, 26 Mar 2011 10:33:14 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > From: Ben Key <bkey76@gmail.com>
> > Date: Sat, 19 Mar 2011 15:09:55 -0400
> > 
> > I like the reverse video mode of Emacs sometimes, but not always.  I would
> > like to have a way of toggling this property without having to restart Emacs
> > (right now the only way of setting this property is to start Emacs with or
> > without the -rv command line argument).  I have tried M-:
> > (set-frame-parameter (selected-frame) 'reverse t) to turn it on and
> > (set-frame-parameter
> > (selected-frame) 'reverse nil) and M-: (set-frame-parameter (selected-frame)
> > 'reverse nil) to turn it off, but this does not work.
> > 
> > Does anyone have any suggestions or is the reverse video effect something
> > that can only be specified at start up?
> 
> It can only be specified at startup.  I don't think it was ever
> possible to do this from inside a running Emacs session.  That's why
> you won't find the 'reverse frame parameter documented, neither in the
> Emacs User Manual nor in the ELisp Manual.
> 
> (Note that currently, i.e. in Emacs 23, even the -rv command-line
> argument is broken.  I guess not many people actually use it.)

While the above is mostly true, there _is_ a way of toggling the
reverse video mode from a running Emacs session:

  M-: (x-handle-reverse-video (selected-frame) '((reverse . t))) RET

in GUI sessions and

  M-: (tty-handle-reverse-video (selected-frame) '((reverse . t))) RET

on a TTY.

Please note that (a) these are internal functions that can change
their interfaces or even disappear from Emacs without prior notice,
and (b) they might not always work (in particular, the tty variety is
currently broken on many builds, the only exception known to me being
the MS-DOS build).

The official way of setting the reverse video is only when a frame is
created, e.g.

  M-: (make-frame '((reverse . t))) RET



reply via email to

[Prev in Thread] Current Thread [Next in Thread]