Mercurial > hg > xemacs-beta
changeset 5862:5b799fa6d75e
Behave better with nil TERM for gnuclient, remove bitrotted TTY init code
lisp/ChangeLog addition:
2015-03-15 Aidan Kehoe <kehoea@parhasard.net>
* tty-init.el (make-frame-after-init-entry-point):
Behave better when TERM was not set; use
#'console-tty-terminal-type instead of (getenv "TERM") so we get
the value that reflects the current console. Thank you Uwe Brauer!
* mule/mule-tty-init.el (mule-tty-win-initted): Removed.
* mule/mule-tty-init.el (init-mule-tty-win): Removed.
* mule/mule-tty-init.el: Remove this file in its entirety.
* mule/mule-x-init.el (x-use-halfwidth-roman-font): Removed.
* mule/mule-x-init.el: Remove this file in its entirety.
* dumped-lisp.el (preloaded-file-list): Remove them from the
dumped file list. The functions within haven't been used since
they were imported from Mule in 1999, and the functionality of
init-mule-tty-win was already in tty-init.el. If someone wants to
automatically use a halfwidth roman font, they can go hunting for
the code, but there are no users on http://searchco.de/ as of
20150315. Leaving them around is confusing and distracting.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 15 Mar 2015 21:13:23 +0000 |
parents | c87b776ab0e1 |
children | 15041705c196 |
files | lisp/ChangeLog lisp/dumped-lisp.el lisp/mule/mule-tty-init.el lisp/mule/mule-x-init.el lisp/tty-init.el |
diffstat | 5 files changed, 24 insertions(+), 109 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sat Mar 14 01:40:49 2015 +0000 +++ b/lisp/ChangeLog Sun Mar 15 21:13:23 2015 +0000 @@ -1,3 +1,23 @@ +2015-03-15 Aidan Kehoe <kehoea@parhasard.net> + + * tty-init.el (make-frame-after-init-entry-point): + Behave better when TERM was not set; use + #'console-tty-terminal-type instead of (getenv "TERM") so we get + the value that reflects the current console. Thank you Uwe Brauer! + + * mule/mule-tty-init.el (mule-tty-win-initted): Removed. + * mule/mule-tty-init.el (init-mule-tty-win): Removed. + * mule/mule-tty-init.el: Remove this file in its entirety. + * mule/mule-x-init.el (x-use-halfwidth-roman-font): Removed. + * mule/mule-x-init.el: Remove this file in its entirety. + * dumped-lisp.el (preloaded-file-list): Remove them from the + dumped file list. The functions within haven't been used since + they were imported from Mule in 1999, and the functionality of + init-mule-tty-win was already in tty-init.el. If someone wants to + automatically use a halfwidth roman font, they can go hunting for + the code, but there are no users on http://searchco.de/ as of + 20150315. Leaving them around is confusing and distracting. + 2015-03-14 Aidan Kehoe <kehoea@parhasard.net> * cmdloop.el (no-character-typed):
--- a/lisp/dumped-lisp.el Sat Mar 14 01:40:49 2015 +0000 +++ b/lisp/dumped-lisp.el Sun Mar 15 21:13:23 2015 +0000 @@ -178,8 +178,6 @@ "mule/mule-composite" )) ;; may initialize coding systems - (when (featurep '(and mule x)) "mule/mule-x-init") - (when (featurep '(and mule tty)) "mule/mule-tty-init") (when (and (featurep 'mule) (memq system-type '(windows-nt cygwin32))) "mule/mule-win32-init") "code-init" ; set up defaults
--- a/lisp/mule/mule-tty-init.el Sat Mar 14 01:40:49 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -;;; mule-tty-init.el --- Initialization code for console tty under MULE -*- coding: iso-2022-7bit; -*- - -;; Copyright (C) 1998 Free Software Foundation, Inc. -;; Copyright (C) 1998 Kazuyuki IENAGA <kazz@imasy.or.jp> - -;; Author: Kazuyuki IENAGA <kazz@imasy.or.jp> -;; Keywords: mule, tty, console, dumped - -;; This file is part of XEmacs. - -;; XEmacs 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 of the License, or (at your -;; option) any later version. - -;; XEmacs is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -;; for more details. - -;; You should have received a copy of the GNU General Public License -;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>. - -;;; Commentary: - -;; This file is dumped with XEmacs when Mule and TTY support are enabled. - -;;; Code: - -(defvar mule-tty-win-initted nil) - -(defun init-mule-tty-win () - "Initialize TTY for MULE at startup. Don't call this." - (unless mule-tty-win-initted - (add-hook - 'before-init-hook - (lambda () - (when (eq (device-type) 'tty) - (when (string-match "^kterm" (getenv "TERM")) - (set-terminal-coding-system 'euc-jp) - (set-keyboard-coding-system 'euc-jp)) - (declare-fboundp (set-console-tty-coding-system))))) - (setq mule-tty-win-initted t))) - -;;; mule-tty-init.el ends here
--- a/lisp/mule/mule-x-init.el Sat Mar 14 01:40:49 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -;;; mule-x-init.el --- initialization code for X Windows under MULE -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1994 Free Software Foundation, Inc. -;; Copyright (C) 1996, 2002 Ben Wing <ben@xemacs.org> - -;; Author: various -;; Keywords: mule X11 - -;; This file is part of XEmacs. - -;; XEmacs 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 of the License, or (at your -;; option) any later version. - -;; XEmacs is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -;; for more details. - -;; You should have received a copy of the GNU General Public License -;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>. - -;;; Commentary: - -;;; Code: - -;;; Work around what is arguably a Sun CDE bug. - -;; #### This is unused, apparently. -(defun x-use-halfwidth-roman-font (fullwidth-charset roman-registry) - "Maybe set charset registry of the 'ascii charset to ROMAN-REGISTRY. - -Do this only if: - - the current display is an X device - - the displayed width of FULLWIDTH-CHARSET is twice the displayed - width of the 'ascii charset, but only when using ROMAN-REGISTRY. - -Traditionally, Asian characters have been displayed so that they -occupy exactly twice the screen space of ASCII (`halfwidth') -characters. On many systems, e.g. Sun CDE systems, this can only be -achieved by using a national variant roman font to display ASCII." - (labels ((charset-font-width (charset) - (font-instance-width - (face-font-instance 'default (selected-device) charset))) - - (twice-as-wide (cs1 cs2) - (let ((width1 (charset-font-width cs1)) - (width2 (charset-font-width cs2))) - (and width1 width2 (eq (+ width1 width1) width2))))) - (declare (inline charset-font-width)) - (when (eq 'x (device-type)) - (let ((original-registries (charset-registries 'ascii))) - (condition-case nil - (unless (twice-as-wide 'ascii fullwidth-charset) - (set-charset-registries 'ascii (vector roman-registry)) - (unless (twice-as-wide 'ascii fullwidth-charset) - ;; Restore if roman-registry didn't help - (set-charset-registries 'ascii original-registries))) - (error (set-charset-registries 'ascii original-registries))))))) - -;;;;
--- a/lisp/tty-init.el Sat Mar 14 01:40:49 2015 +0000 +++ b/lisp/tty-init.el Sun Mar 15 21:13:23 2015 +0000 @@ -66,7 +66,10 @@ ;; override term-file-prefix. (startup.el does it after ;; loading the init file.) (when (and (find-coding-system 'euc-jp) - (string-match "^kterm" (getenv "TERM"))) + (member* (mismatch "kterm" + (canoncase (or (console-tty-terminal-type + console) "")) + '(nil 5)))) (set-console-tty-coding-system console 'euc-jp)) (when init-file-loaded ;; temporarily select the console so that the changes