From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: `xterm-mouse-mode' has a bogus Custom group Date: Mon, 11 Apr 2005 21:12:23 -0500 (CDT) Message-ID: <200504120212.j3C2CNc11392@raven.dms.auburn.edu> References: <200504020351.j323ppS16391@raven.dms.auburn.edu> <16974.11752.332998.125628@farnswood.snap.net.nz> <200504021346.j32Dk3e19471@raven.dms.auburn.edu> <16978.12100.857894.861739@farnswood.snap.net.nz> <200504060000.j3600bm15264@raven.dms.auburn.edu> <16979.20638.871209.55398@farnswood.snap.net.nz> <200504070045.j370j0J27252@raven.dms.auburn.edu> <16981.58243.428189.615765@farnswood.snap.net.nz> <200504081605.j38G5ia15320@raven.dms.auburn.edu> <16982.64939.154130.463783@farnswood.snap.net.nz> <200504090406.j3946HQ22712@raven.dms.auburn.edu> <01c53d89$Blat.v2.4$96f0bb20@zahav.net.il> <200504101318.j3ADID528159@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1113273303 24824 80.91.229.2 (12 Apr 2005 02:35:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Apr 2005 02:35:03 +0000 (UTC) Cc: eliz@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 12 04:35:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DLBEe-0008CQ-GU for ged-emacs-devel@m.gmane.org; Tue, 12 Apr 2005 04:34:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DLAos-00074y-QH for ged-emacs-devel@m.gmane.org; Mon, 11 Apr 2005 22:08:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DLAgr-0005ui-T4 for emacs-devel@gnu.org; Mon, 11 Apr 2005 21:59:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DLAge-0005oR-Gn for emacs-devel@gnu.org; Mon, 11 Apr 2005 21:59:37 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DLAgb-0005kV-2J for emacs-devel@gnu.org; Mon, 11 Apr 2005 21:59:29 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DLAue-0000tM-D5; Mon, 11 Apr 2005 22:14:00 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j3C2Du9N014974; Mon, 11 Apr 2005 21:13:56 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j3C2CNc11392; Mon, 11 Apr 2005 21:12:23 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rms@gnu.org In-reply-to: (message from Richard Stallman on Sun, 10 Apr 2005 21:56:28 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:35878 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35878 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 ============================================================