diff options
author | Glenn Morris <rgm@gnu.org> | 2008-06-12 03:51:20 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2008-06-12 03:51:20 +0000 |
commit | c83e2292599d690618ec113ca7f8cba84da79192 (patch) | |
tree | 15bf546eef955573a2f5a7432bd49ce0f61f0ac3 /lisp/emulation | |
parent | fc926716c103e60270cc80ff8be4823d12b2ab21 (diff) | |
download | emacs-c83e2292599d690618ec113ca7f8cba84da79192.tar.gz |
(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.el | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index 668454e90cc..bcfb7977191 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el @@ -315,15 +315,17 @@ This means that an edt-user.el file was found in the user's `load-path'.") (defconst edt-window-system (if (featurep 'emacs) window-system (console-type)) "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.") (defvar edt-keys-file nil |