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

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

bug#19259: 25.0.50; Be able to use `compare-windows' in either direction


From: Drew Adams
Subject: bug#19259: 25.0.50; Be able to use `compare-windows' in either direction
Date: Tue, 2 Dec 2014 14:53:18 -0800 (PST)

Especially when `compare-windows' is used repeatedly (e.g. bound to a
repeatable key etc.), it can be helpful to be able to sometimes
compare backward, toward bob, instead of always forward, toward eob.
Please add this enhancement.

It can be introduced at the user level by modifying how a prefix arg is
handled.  If the numeric value is 0 or greater, the behavior would be as
it is now (so no change for `C-u', for instance).  If the numeric value
is 0 or less, then comparison would be toward bob.

For example, (the parameter would be renamed ARG and) the doc string
would be updated with something like this, concerning the prefix arg:

  ...
  Variable `compare-windows-whitespace' controls how whitespace is
  skipped.  But a non-negative prefix arg means reverse the value of
  this variable.

  A non-positive prefix arg means compare backward not forward.

  If `compare-ignore-case' is non-nil then ignore changes in case.
  ...

Repeatability would need to be handled using something like
having `set-transient-map' recognize the repeated command and
reuse the same direction, unless a prefix arg is used again to
signal a direction change.

E.g., if `C-= w' were bound to `compare-windows' then

  C-- C-= w w w w C-u w w C-- w w w

would compare backward 4 times, then forward twice, then
backward 3 times.


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'





reply via email to

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