diff options
| author | Glenn Morris | 2008-06-12 03:52:16 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-06-12 03:52:16 +0000 |
| commit | a2697346fba4fd648aa79c7fa4a8753424ec1bec (patch) | |
| tree | d4212fc17d42df67de988fe2dbb459ecadc75d6c /lisp/emulation | |
| parent | c83e2292599d690618ec113ca7f8cba84da79192 (diff) | |
| download | emacs-a2697346fba4fd648aa79c7fa4a8753424ec1bec.tar.gz emacs-a2697346fba4fd648aa79c7fa4a8753424ec1bec.zip | |
Drop test for Emacs < 19.
(edt-xserver): Use replace-regexp-in-string.
(x-server-vendor): Define for compiler, for builds without X.
Diffstat (limited to 'lisp/emulation')
| -rw-r--r-- | lisp/emulation/edt-mapper.el | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/lisp/emulation/edt-mapper.el b/lisp/emulation/edt-mapper.el index e55cae16bf8..ea196740979 100644 --- a/lisp/emulation/edt-mapper.el +++ b/lisp/emulation/edt-mapper.el | |||
| @@ -97,37 +97,23 @@ | |||
| 97 | ;;; Code: | 97 | ;;; Code: |
| 98 | 98 | ||
| 99 | ;;; | 99 | ;;; |
| 100 | ;;; Make sure we're running Emacs version 19, or higher. | ||
| 101 | ;;; | ||
| 102 | |||
| 103 | (cond | ||
| 104 | ((string-lessp emacs-version "19") | ||
| 105 | (insert " | ||
| 106 | |||
| 107 | Whoa! This isn't going to work... | ||
| 108 | |||
| 109 | You must run edt-mapper.el under Emacs version 19 or higher. | ||
| 110 | |||
| 111 | Press any key to exit. ") | ||
| 112 | (sit-for 600) | ||
| 113 | (kill-emacs t))) | ||
| 114 | |||
| 115 | ;;; | ||
| 116 | ;;; Decide Emacs Variant, GNU Emacs or XEmacs (aka Lucid Emacs). | 100 | ;;; Decide Emacs Variant, GNU Emacs or XEmacs (aka Lucid Emacs). |
| 117 | ;;; Determine Window System, and X Server Vendor (if appropriate). | 101 | ;;; Determine Window System, and X Server Vendor (if appropriate). |
| 118 | ;;; | 102 | ;;; |
| 119 | (defconst edt-window-system (if (featurep 'xemacs) (console-type) window-system) | 103 | (defconst edt-window-system (if (featurep 'xemacs) (console-type) window-system) |
| 120 | "Indicates window system \(in GNU Emacs\) or console type \(in XEmacs\).") | 104 | "Indicates window system \(in GNU Emacs\) or console type \(in XEmacs\).") |
| 121 | 105 | ||
| 122 | (defconst edt-xserver (if (eq edt-window-system 'x) | 106 | (declare-function x-server-vendor "xfns.c" (&optional terminal)) |
| 123 | (if (featurep 'xemacs) | 107 | |
| 124 | ;; The Cygwin window manager has a `/' in its | 108 | (defconst edt-xserver (when (eq edt-window-system 'x) |
| 125 | ;; name, which breaks the generated file name of | 109 | ;; The Cygwin window manager has a `/' in its |
| 126 | ;; the custom key map file. Replace `/' with a | 110 | ;; name, which breaks the generated file name of |
| 127 | ;; `-' to work around that. | 111 | ;; the custom key map file. Replace `/' with a |
| 128 | (replace-in-string (x-server-vendor) "[ /]" "-") | 112 | ;; `-' to work around that. |
| 129 | (subst-char-in-string ?/ ?- (subst-char-in-string ? ?- (x-server-vendor)))) | 113 | (if (featurep 'xemacs) |
| 130 | nil) | 114 | (replace-in-string (x-server-vendor) "[ /]" "-") |
| 115 | (replace-regexp-in-string "[ /]" "-" | ||
| 116 | (x-server-vendor)))) | ||
| 131 | "Indicates X server vendor name, if applicable.") | 117 | "Indicates X server vendor name, if applicable.") |
| 132 | 118 | ||
| 133 | 119 | ||