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

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

Re: set-goal-column Help improvement


From: Kevin Rodgers
Subject: Re: set-goal-column Help improvement
Date: Fri, 22 Mar 2002 12:09:02 -0700

Dan Jacobson wrote:
> 
> Help> set-goal-column:
> Help>
> Help> Set the current horizontal position as a goal for C-n and C-p.
> Help> Those commands will move to this position in the line moved to
> Help> rather than trying to keep the same horizontal position.
> Help> With a non-nil argument, clears out the goal column
> Help> so that C-n and C-p resume vertical motion.
> 
> don't you also want to say "and arrow keys, etc.", in addition to just
> C-n and C-p?

Neither C-n nor C-p are explicitly mentioned in the doc string for
set-goal-column.  Instead, it references the next-line and previous-line
commands using the syntax described in the substitute-command-keys doc
string.  This is the right way to do it.

> Indeed, perhaps scan the rest of the emacs doc strings for similar
> problems...
> 
> And hmmm, maybe also have a setting so one can either use the arrows
> or C-p,n to do the non goal-column behavior at the same time C-p,n or
> the arrows do the goal-column behavior.

That would require a change to substitute-command-keys, to either replace
the command name with all possible bindings (instead of just one) or perhaps
to replace it with a "preferred" binding.  substitute-command-keys relies
on where-is-internal for that, but it only allows one to distinguish ASCII
characters from other keys.

That distinction isn't very useful, though.  For example, are meta-modified
characters considered to be ASCII characters by where-is-internal?  I think
where-is-internal should be more flexible, to allow the caller to prefer
bindings by event type: keyboard, function key, and mouse.  That would allow
us to define a new customization variable that could be passed directly by
substitute-command-keys to where-is-internal, so that users like Dan could
see <down> and others (like me) would still see C-n.

-- 
Kevin Rodgers <address@hidden>



reply via email to

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