emacs-devel
[Top][All Lists]
Advanced

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

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


From: Luc Teirlinck
Subject: Re: `xterm-mouse-mode' has a bogus Custom group
Date: Fri, 8 Apr 2005 23:06:17 -0500 (CDT)

The following patches enable xterm-mouse-mode by default in xterm type
terminals, document this in the Emacs manual (I would also document it
in the NEWS) and fix the Custom related bug for tooltip-mode.

I can install if desired.

===File ~/man-frames.texi-diff==============================
*** frames.texi 04 Apr 2005 16:06:35 -0500      1.77
--- frames.texi 08 Apr 2005 21:11:43 -0500      
***************
*** 1055,1064 ****
  
  Some terminal emulators under X support mouse clicks in the terminal
  window.  In a terminal emulator which is compatible with @code{xterm},
! you can use @kbd{M-x xterm-mouse-mode} to enable simple use of the
! mouse---only single clicks are supported.  The normal @code{xterm} mouse
! functionality is still available by holding down the @kbd{SHIFT} key
! when you press the mouse button.
  
  @ignore
     arch-tag: 7dcf3a31-a43b-45d4-a900-445b10d77e49
--- 1055,1069 ----
  
  Some terminal emulators under X support mouse clicks in the terminal
  window.  In a terminal emulator which is compatible with @code{xterm},
! simple use of the mouse is, by default, controlled by Emacs---basically,
! only non-modified single clicks are supported.  The normal
! @code{xterm} mouse functionality for such clicks is still available by
! holding down the @kbd{SHIFT} key when you press the mouse button.
! 
! Put @code{(xterm-mouse-mode 0)} in your @file{.emacs}, or disable the
! option @code{xterm-mouse-mode} through the @samp{Customize} interface
! (@pxref{Easy Customization}), if you prefer all mouse clicks to be
! handled by the terminal emulator.
  
  @ignore
     arch-tag: 7dcf3a31-a43b-45d4-a900-445b10d77e49
============================================================

===File ~/xt-mouse.el-diff==================================
*** xt-mouse.el 03 Apr 2005 19:34:53 -0500      1.25
--- xt-mouse.el 08 Apr 2005 22:16:07 -0500      
***************
*** 150,165 ****
        (list mouse
            (append (list nil 'menu-bar) (nthcdr 2 (posn-at-x-y x y w t)))))))
  
- ;;;###autoload
  (define-minor-mode xterm-mouse-mode
    "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."
!   nil " Mouse" nil :global t :group 'mouse
    (if xterm-mouse-mode
        ;; Turn it on
        (unless window-system
--- 150,169 ----
        (list mouse
            (append (list nil 'menu-bar) (nthcdr 2 (posn-at-x-y x y w t)))))))
  
  (define-minor-mode xterm-mouse-mode
    "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.  It only
! works for simple uses of the mouse.  Basically, only non-modified
! single clicks are supported.  When turned on, the normal xterm
! mouse functionality for such clicks is still available by holding
! down the SHIFT key while pressing the mouse button."
!   :global t :group 'mouse
!   :init-value (and (getenv "TERM")
!                  (string-match "xterm" (getenv "TERM"))
!                  (not window-system))
    (if xterm-mouse-mode
        ;; Turn it on
        (unless window-system
============================================================

===File ~/tooltip.el-diff===================================
*** tooltip.el  31 Mar 2005 08:49:03 -0600      1.46
--- tooltip.el  08 Apr 2005 21:44:48 -0500      
***************
*** 182,193 ****
  ;; set-buffer prevents redisplay optimizations, so every mouse motion
  ;; would be accompanied by a full redisplay.
  
- ;;;###autoload
  (define-minor-mode tooltip-mode
    "Toggle Tooltip display.
  With ARG, turn tooltip mode on if and only if ARG is positive."
    :global t
    :group 'tooltip
    (unless (or (null tooltip-mode) (fboundp 'x-show-tip))
      (error "Sorry, tooltips are not yet available on this system"))
    (let ((hook-fn (if tooltip-mode 'add-hook 'remove-hook)))
--- 182,198 ----
  ;; set-buffer prevents redisplay optimizations, so every mouse motion
  ;; would be accompanied by a full redisplay.
  
  (define-minor-mode tooltip-mode
    "Toggle Tooltip display.
  With ARG, turn tooltip mode on if and only if ARG is positive."
    :global t
    :group 'tooltip
+   :init-value (not (or noninteractive
+                      (if (boundp 'emacs-quick-startup)
+                          emacs-quick-startup)
+                      (if (fboundp 'display-graphic-p)
+                          (not (display-graphic-p)))
+                      (not (fboundp 'x-show-tip))))
    (unless (or (null tooltip-mode) (fboundp 'x-show-tip))
      (error "Sorry, tooltips are not yet available on this system"))
    (let ((hook-fn (if tooltip-mode 'add-hook 'remove-hook)))
============================================================

===File ~/startup.el-diff===================================
*** startup.el  08 Apr 2005 19:21:40 -0500      1.344
--- startup.el  08 Apr 2005 20:59:29 -0500      
***************
*** 728,743 ****
                (<= (frame-parameter nil 'tool-bar-lines) 0))
      (tool-bar-mode 1))
  
!   ;; Can't do this init in defcustom because the relevant variables
!   ;; are not set.
    (custom-reevaluate-setting 'blink-cursor-mode)
    (custom-reevaluate-setting 'normal-erase-is-backspace)
! 
!   (unless (or noninteractive
!             emacs-quick-startup
!               (not (display-graphic-p))
!               (not (fboundp 'x-show-tip)))
!     (tooltip-mode 1))
  
    ;; Register default TTY colors for the case the terminal hasn't a
    ;; terminal init file.
--- 728,741 ----
                (<= (frame-parameter nil 'tool-bar-lines) 0))
      (tool-bar-mode 1))
  
!   ;; Necessary for defcustoms that have to be defined before the
!   ;; relevant variables are set.  Also necessary for minor modes
!   ;; defined with `define-minor-mode' that are enabled by default,
!   ;; because they use `custom-initialize-default'
    (custom-reevaluate-setting 'blink-cursor-mode)
    (custom-reevaluate-setting 'normal-erase-is-backspace)
!   (custom-reevaluate-setting 'tooltip-mode)
!   (custom-reevaluate-setting 'xterm-mouse-mode)
  
    ;; Register default TTY colors for the case the terminal hasn't a
    ;; terminal init file.
============================================================

===File ~/loadup.el-diff====================================
*** loadup.el   19 Mar 2005 13:28:44 -0600      1.135
--- loadup.el   08 Apr 2005 19:54:48 -0500      
***************
*** 143,148 ****
--- 143,150 ----
        (load "select")))
  (load "emacs-lisp/timer")
  (load "isearch")
+ (load "tooltip")
+ (load "xt-mouse")
  
  (message "%s" (garbage-collect))
  (load "menu-bar")
============================================================

===File ~/src-Makefile.in-diff==============================
*** Makefile.in 19 Mar 2005 13:29:50 -0600      1.307
--- Makefile.in 08 Apr 2005 20:08:01 -0500      
***************
*** 720,725 ****
--- 720,727 ----
        ${lispsource}help.elc \
        ${lispsource}indent.elc \
        ${lispsource}isearch.elc \
+       ${lispsource}tooltip.elc \
+       $(lispsource)xt-mouse.elc \
        ${lispsource}loadup.el \
        ${lispsource}loaddefs.el \
        ${lispsource}bindings.elc \
***************
*** 810,815 ****
--- 812,819 ----
        ../lisp/help.elc \
        ../lisp/indent.elc \
        ../lisp/isearch.elc \
+       ../lisp/tooltip.elc \
+       ../lisp/xt-mouse.elc \
        ../lisp/loadup.el \
        ../lisp/loaddefs.el \
        ../lisp/bindings.elc \
============================================================




reply via email to

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