emacs-devel
[Top][All Lists]
Advanced

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

`xterm-mouse-mode' has a bogus Custom group


From: Luc Teirlinck
Subject: `xterm-mouse-mode' has a bogus Custom group
Date: Fri, 1 Apr 2005 21:51:51 -0600 (CST)

`xterm-mouse-mode' relies on a bogus default :group, chosen by
define-minor-mode, xterm-mouse, that does not have one of the major
groups as an ancestor (in fact, that does not even have a parent
group).  As a result, users can never find it while browsing Custom
using `customize-browse' or similar.  This is bad, since it is an
option many people who have to often run Emacs in an xterm might want
to set.

I believe that we have to choose a valid group for `xterm-mouse-mode'.
Maybe the most logical is 'mouse, as the patch below implements.

Another frustration I had with `xterm-mouse-mode' was finding
appropriate documentation starting from the Custom buffer.

In the Custom buffer, you get the documentation for the variable,
which simply says to read the docstring of the function instead:

See the command `xterm-mouse-mode' for a description of this minor-mode.

If you click on that link, you do not get the doc for the function
yet, but a buffer telling you once more that `xterm-mouse-mode' is
both a variable and a command and also has a plist.  You have to click
on `Command:".  Then we finally get the function docstring, which
barely says anything of substance either.

Everything but the last fact applies to just about any minor mode
defined by define-minor-mode.  The only thing the patch below does
something about is the last fact: it expands the command docstring.
(Most of the new text is based on the Emacs manual documentation.)

I can install the patch below if desired.

===File ~/xt-mouse-diff=====================================
*** xt-mouse.el 17 Jan 2005 10:30:26 -0600      1.24
--- xt-mouse.el 01 Apr 2005 20:55:39 -0600      
***************
*** 155,162 ****
    "Toggle XTerm mouse mode.
  With prefix arg, turn XTerm mouse mode on iff arg is positive.
  
! Turn it on to use emacs mouse commands, and off to use xterm mouse commands."
!   nil " Mouse" nil :global t
    (if xterm-mouse-mode
        ;; Turn it on
        (unless window-system
--- 155,167 ----
    "Toggle XTerm mouse mode.
  With prefix arg, turn XTerm mouse mode on iff arg is positive.
  
! Turn it on to use emacs mouse commands, and off to use xterm mouse commands.
! This works in terminal emulators compatible with xterm.  Only single clicks
! are supported.  When turned on, the normal xterm mouse functionality is still
! available by holding down the SHIFT key while pressing the mouse button.
! The Linux console supports this mode if it has support for the mouse enabled,
! for instance using the gpm daemon."
!   nil " Mouse" nil :global t :group 'mouse
    (if xterm-mouse-mode
        ;; Turn it on
        (unless window-system
============================================================




reply via email to

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