emacs-devel
[Top][All Lists]
Advanced

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

Re: locate-with-filter


From: Luc Teirlinck
Subject: Re: locate-with-filter
Date: Wed, 29 Mar 2006 18:29:59 -0600 (CST)

Richard Stallman wrote:

         After the changes you made to
       help-follow, binding `help-follow' to anything else but RET does not
       work anymore.

   Why is that?

Because after your changes, `help-follow' is a function that just
unconditionally gives an error message, even when invoked on a button.
Of course, you can bind `help-follow' to any key you want, but when you
type that key in a help buffer, all you get is the error message:
"No cross-reference here", even when you type it with point on a button.

                  (if (display-mouse-p) "\\[help-follow-mouse] or ")
       !           "RET on a face name to customize it\n"
                  "or on its sample text for a description of the face.\n\n")))

   I don't want to document a bug.

If you mean the bug that binding `help-follow' to anything else but RET
does not work, then my third patch fixes that bug.

But RET might still have to be hard coded in the introductory text for
other reasons, explained below, and that is what my first two patches do.

I do not know how to fix the problem with "\\[help-follow]" and
(presumably) `minor-mode-overriding-map-alist', even after applying my
third patch.  But RET actually should be hard coded in that doc.
"\\[help-follow]" gives the binding of `help-follow' in the local map,
that is the binding in effect when _not_ on a button.  But the doc in
question talks about the behavior of RET _on buttons_, which is
determined by the buttons' text properties and has nothing to do with
the local map.  So "\\help-follow" is an incorrect construct here.

After my third patch `M-x help-follow' would indeed work on buttons,
so the introductory text would no longer be incorrect.  But why
encourage the user to type `M-x help-follow', whereas the much more
convenient RET binding is available?  Note that RET will work on
buttons _even_ if the user bound help-follow to another key _and_
bound RET to another command in help buffers.  It is implemented by
text properties.  The help echo on the buttons also hard codes RET, so
hard coding RET in the introductory text too would only be consistent.

   This looks like it is putting back the old code that I replaced.  If
   so, that would bring back the bug I fixed.  I do not want to do that.
   It would be the wrong fix.

   If this is different from the old code, would you please tell me the
   difference?

`help-follow' in the old code did whatever `push-button' does when
invoked with point over a button and did what the current
`help-follow-symbol' does when not over a button.  Your changes made
`help-follow' print an error message everywhere.  My patches restore
the old behavior when `help-follow' is invoked over a button, but
print an error message when invoked anywhere else.  The behavior after
my patches is _exactly_ the same as the behavior after your changes,
as long as help-follow is only bound to RET.  But if you bind
`help-follow' to some other key, then the present code prints an error
message _everywhere_ in an help-buffer, whereas after my patches, the
rebound key would behave exactly the same way as RET currently does:
follow the button if on a button, otherwise print an error message,

Sincerely,

Luc.





reply via email to

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