The following patches would enable Xterm Mouse mode when it makes sense, without confusing Custom. *Note* however, that there are some additional problems I discovered (while testing the patches) with enabling it. Clicking mouse-1 can do all kinds of unexpected stuff, without the usual mouse face, without the usual tooltips or echo-area equivalent (because Emacs still does not respond to mouse-over) and often without any clear fontification either.
Do I install the patches below anyway? ===File ~/startup.el-diff=================================== diff -c /home/teirllm/emacscvsdir/emacs/lisp/startup.el /home/teirllm/startup-a11.el *** /home/teirllm/emacscvsdir/emacs/lisp/startup.el Mon Apr 11 20:22:36 2005 --- /home/teirllm/startup-a11.el Mon Apr 11 14:39:15 2005 *************** *** 954,959 **** --- 957,966 ---- ;; Load library for our terminal type. ;; User init file can set term-file-prefix to nil to prevent this. + + ;; If you change the code below, you need to also change the + ;; corresponding code in the tooltip-mode defcustom. The two need + ;; to be equivalent under all conditions, or Custom will get confused. (unless (or noninteractive window-system (null term-file-prefix)) *************** *** 965,971 **** (setq term (if (setq hyphend (string-match "[-_][^-_]+$" term)) (substring term 0 hyphend) ! nil))))) ;; Update the out-of-memory error message based on user's key bindings ;; for save-some-buffers. --- 972,981 ---- (setq term (if (setq hyphend (string-match "[-_][^-_]+$" term)) (substring term 0 hyphend) ! nil))) ! (and term ! (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" term) ! (xterm-mouse-mode 1)))) ;; Update the out-of-memory error message based on user's key bindings ;; for save-some-buffers. Diff finished. Mon Apr 11 20:25:03 2005 ============================================================ ===File ~/xt-mouse.el-diff================================== *** xt-mouse.el 03 Apr 2005 19:34:53 -0500 1.25 --- xt-mouse.el 11 Apr 2005 20:58:10 -0500 *************** *** 156,165 **** 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 --- 156,188 ---- 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 ! ;; Do not change the :init-value below without corresponding ! ;; changes in the related code in startup.el. ! :init-value (unless (or noninteractive ! window-system ! (null term-file-prefix)) ! (let ((term (getenv "TERM")) ! hyphend) ! (while ! (and term ! (not (load (concat term-file-prefix term) t t))) ! ;; Strip off last hyphen and what follows, then ! ;; try again ! (setq term ! (if (setq hyphend ! (string-match "[-_][^-_]+$" term)) ! (substring term 0 hyphend) ! nil))) ! (and term ! (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" ! term) ! t))) (if xterm-mouse-mode ;; Turn it on (unless window-system ============================================================ _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel