diff options
Diffstat (limited to 'lisp/term')
-rw-r--r-- | lisp/term/AT386.el | 2 | ||||
-rw-r--r-- | lisp/term/README | 2 | ||||
-rw-r--r-- | lisp/term/internal.el | 2 | ||||
-rw-r--r-- | lisp/term/iris-ansi.el | 2 | ||||
-rw-r--r-- | lisp/term/linux.el | 3 | ||||
-rw-r--r-- | lisp/term/mac-win.el | 4 | ||||
-rw-r--r-- | lisp/term/news.el | 2 | ||||
-rw-r--r-- | lisp/term/pc-win.el | 2 | ||||
-rw-r--r-- | lisp/term/rxvt.el | 2 | ||||
-rw-r--r-- | lisp/term/sun-mouse.el | 2 | ||||
-rw-r--r-- | lisp/term/sun.el | 2 | ||||
-rw-r--r-- | lisp/term/sup-mouse.el | 2 | ||||
-rw-r--r-- | lisp/term/tty-colors.el | 2 | ||||
-rw-r--r-- | lisp/term/tvi970.el | 2 | ||||
-rw-r--r-- | lisp/term/vt100.el | 2 | ||||
-rw-r--r-- | lisp/term/w32-win.el | 2 | ||||
-rw-r--r-- | lisp/term/wyse50.el | 2 | ||||
-rw-r--r-- | lisp/term/x-win.el | 4 | ||||
-rw-r--r-- | lisp/term/xterm.el | 42 |
19 files changed, 62 insertions, 21 deletions
diff --git a/lisp/term/AT386.el b/lisp/term/AT386.el index 8adb94c07ca..a7897b207d5 100644 --- a/lisp/term/AT386.el +++ b/lisp/term/AT386.el @@ -10,7 +10,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, diff --git a/lisp/term/README b/lisp/term/README index e1cfbf15901..972bd49c796 100644 --- a/lisp/term/README +++ b/lisp/term/README @@ -228,7 +228,7 @@ This file is part of GNU Emacs. GNU Emacs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) +the Free Software Foundation; either version 2, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, diff --git a/lisp/term/internal.el b/lisp/term/internal.el index 2db2cd93d4d..11cd8918fc4 100644 --- a/lisp/term/internal.el +++ b/lisp/term/internal.el @@ -9,7 +9,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, diff --git a/lisp/term/iris-ansi.el b/lisp/term/iris-ansi.el index 2f193007051..aca39ad4dc7 100644 --- a/lisp/term/iris-ansi.el +++ b/lisp/term/iris-ansi.el @@ -9,7 +9,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, diff --git a/lisp/term/linux.el b/lisp/term/linux.el index 7fa9a96e9bd..84de5966a88 100644 --- a/lisp/term/linux.el +++ b/lisp/term/linux.el @@ -9,6 +9,9 @@ ;; It can't really display underlines. (tty-no-underline) + (condition-case nil (t-mouse-mode 1) + (error nil)) + ;; Make Latin-1 input characters work, too. ;; Meta will continue to work, because the kernel ;; turns that into Escape. diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 2e03b8517b5..0c9abe2f837 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -10,7 +10,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -2252,7 +2252,7 @@ See also `mac-dnd-known-types'." (handler (cdr type-info)) (w (posn-window (event-start event)))) (when handler - (if (and (windowp w) (window-live-p w) + (if (and (window-live-p w) (not (window-minibuffer-p w)) (not (window-dedicated-p w))) ;; If dropping in an ordinary window which we could use, diff --git a/lisp/term/news.el b/lisp/term/news.el index 57d8fd6cb14..61cb6d29ebf 100644 --- a/lisp/term/news.el +++ b/lisp/term/news.el @@ -10,7 +10,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index ca85e824caa..7a737715cd8 100644 --- a/lisp/term/pc-win.el +++ b/lisp/term/pc-win.el @@ -10,7 +10,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el index 64c09e0e1bd..91e91c662e7 100644 --- a/lisp/term/rxvt.el +++ b/lisp/term/rxvt.el @@ -9,7 +9,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, diff --git a/lisp/term/sun-mouse.el b/lisp/term/sun-mouse.el index 280bfb67081..dcc56d503e9 100644 --- a/lisp/term/sun-mouse.el +++ b/lisp/term/sun-mouse.el @@ -11,7 +11,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, diff --git a/lisp/term/sun.el b/lisp/term/sun.el index c3dc773e26b..9ca2197fca1 100644 --- a/lisp/term/sun.el +++ b/lisp/term/sun.el @@ -10,7 +10,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, diff --git a/lisp/term/sup-mouse.el b/lisp/term/sup-mouse.el index 3d8b6873bc1..52528cb8aa9 100644 --- a/lisp/term/sup-mouse.el +++ b/lisp/term/sup-mouse.el @@ -14,7 +14,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, diff --git a/lisp/term/tty-colors.el b/lisp/term/tty-colors.el index 18b07fafc3a..6dcd63eb945 100644 --- a/lisp/term/tty-colors.el +++ b/lisp/term/tty-colors.el @@ -11,7 +11,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el index 4af21f08522..0a0827596a0 100644 --- a/lisp/term/tvi970.el +++ b/lisp/term/tvi970.el @@ -10,7 +10,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, diff --git a/lisp/term/vt100.el b/lisp/term/vt100.el index b185a7bb02f..38ef5f8678f 100644 --- a/lisp/term/vt100.el +++ b/lisp/term/vt100.el @@ -10,7 +10,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index dfe94aaf133..fca3f9ce4d2 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -10,7 +10,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el index c0e4334f522..1540173fc83 100644 --- a/lisp/term/wyse50.el +++ b/lisp/term/wyse50.el @@ -11,7 +11,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index a3fad5894fa..efe6275c8f7 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -10,7 +10,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -266,7 +266,7 @@ See also `emacs-session-save'.") If the directory ~/.emacs.d exists, we make a filename in there, otherwise a file in the home directory." (let ((basename (concat "session." session-id)) - (emacs-dir "~/.emacs.d/")) + (emacs-dir user-emacs-directory)) (expand-file-name (if (file-directory-p emacs-dir) (concat emacs-dir basename) (concat "~/.emacs-" basename))))) diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index f7c3f925936..5d26b4abd34 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -10,7 +10,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -400,7 +400,37 @@ ;; Do it! (xterm-register-default-colors) ;; This recomputes all the default faces given the colors we've just set up. - (tty-set-up-initial-frame-faces))) + (tty-set-up-initial-frame-faces) + + ;; Try to turn on the modifyOtherKeys feature on modern xterms. + ;; When it is turned on much more key bindings work: things like + ;; C-. C-, etc. + ;; To do that we need to find out if the current terminal supports + ;; modifyOtherKeys. At this time only xterm does. + (let ((coding-system-for-read 'binary) + (chr nil) + (str nil)) + ;; Try to find out the type of terminal by sending a "Secondary + ;; Device Attributes (DA)" query. + (send-string-to-terminal "\e[>0c") + + ;; The reply should be of the form: \e [ > NUMBER1 ; NUMBER2 ; NUMBER3 c + (when (equal (read-event nil nil 0.1) ?\e) + (when (equal (read-event nil nil 0.1) ?\[) + (while (not (equal (setq chr (read-event nil nil 0.1)) ?c)) + (setq str (concat str (string chr)))) + (when (string-match ">0;\\([0-9]+\\);0" str) + ;; NUMBER2 is the xterm version number, look for something + ;; greater than 216, the version when modifyOtherKeys was + ;; introduced. + (when (>= (string-to-number + (substring str (match-beginning 1) (match-end 1))) 216) + ;; Make sure that the modifyOtherKeys state is restored when + ;; suspending, resuming and exiting. + (add-hook 'suspend-hook 'xterm-turn-off-modify-other-keys) + (add-hook 'suspend-resume-hook 'xterm-turn-on-modify-other-keys) + (add-hook 'kill-emacs-hook 'xterm-turn-off-modify-other-keys) + (xterm-turn-on-modify-other-keys)))))))) ;; Set up colors, for those versions of xterm that support it. (defvar xterm-standard-colors @@ -518,5 +548,13 @@ versions of xterm." ;; right colors, so clear them. (clear-face-cache))) +(defun xterm-turn-on-modify-other-keys () + "Turn on the modifyOtherKeys feature of xterm." + (send-string-to-terminal "\e[>4;1m")) + +(defun xterm-turn-off-modify-other-keys () + "Turn off the modifyOtherKeys feature of xterm." + (send-string-to-terminal "\e[>4m")) + ;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a ;;; xterm.el ends here |