X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/5bc6ddff00c50acf546530ef0e08a27140614d27..bd78fa1d5442e6e023a16d407741ec899d57d3cd:/lisp/emulation/edt-mapper.el diff --git a/lisp/emulation/edt-mapper.el b/lisp/emulation/edt-mapper.el index 79dabcc743..6bf50db544 100644 --- a/lisp/emulation/edt-mapper.el +++ b/lisp/emulation/edt-mapper.el @@ -1,18 +1,19 @@ ;;; edt-mapper.el --- create an EDT LK-201 map file for X-Windows Emacs -;; Copyright (C) 1994, 1995, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: Kevin Gallagher ;; Maintainer: Kevin Gallagher ;; Keywords: emulations +;; Package: edt ;; This file is part of GNU Emacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; 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) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -20,9 +21,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: ;; @@ -98,22 +97,6 @@ ;;; Code: -;;; -;;; Make sure we're running Emacs version 19, or higher. -;;; - -(cond - ((string-lessp emacs-version "19") - (insert " - - Whoa! This isn't going to work... - - You must run edt-mapper.el under Emacs version 19 or higher. - - Press any key to exit. ") - (sit-for 600) - (kill-emacs t))) - ;;; ;;; Decide Emacs Variant, GNU Emacs or XEmacs (aka Lucid Emacs). ;;; Determine Window System, and X Server Vendor (if appropriate). @@ -121,15 +104,17 @@ (defconst edt-window-system (if (featurep 'xemacs) (console-type) window-system) "Indicates window system \(in GNU Emacs\) or console type \(in XEmacs\).") -(defconst edt-xserver (if (eq edt-window-system 'x) - (if (featurep 'xemacs) - ;; The Cygwin window manager has a `/' in its - ;; name, which breaks the generated file name of - ;; the custom key map file. Replace `/' with a - ;; `-' to work around that. - (replace-in-string (x-server-vendor) "[ /]" "-") - (subst-char-in-string ?/ ?- (subst-char-in-string ? ?- (x-server-vendor)))) - nil) +(declare-function x-server-vendor "xfns.c" (&optional terminal)) + +(defconst edt-xserver (when (eq edt-window-system 'x) + ;; The Cygwin window manager has a `/' in its + ;; name, which breaks the generated file name of + ;; the custom key map file. Replace `/' with a + ;; `-' to work around that. + (if (featurep 'xemacs) + (replace-in-string (x-server-vendor) "[ /]" "-") + (replace-regexp-in-string "[ /]" "-" + (x-server-vendor)))) "Indicates X server vendor name, if applicable.") @@ -145,9 +130,8 @@ (defvar edt-term nil) ;; To silence the byte-compiler -(eval-when-compile - (defvar EDT-key-name) - (defvar edt-save-function-key-map)) +(defvar EDT-key-name) +(defvar edt-save-function-key-map) ;;; ;;; Determine Terminal Type (if appropriate). @@ -521,5 +505,5 @@ (sit-for 600) (kill-emacs t) -;;; arch-tag: 9eea59c8-b8b7-4d66-b858-c8920624c518 +;; arch-tag: 9eea59c8-b8b7-4d66-b858-c8920624c518 ;;; edt-mapper.el ends here