# HG changeset patch # User Glenn Morris # Date 1213242680 0 # Node ID 5d941efe34d7729b46730f9f5ca790f45184262f # Parent c11958c9ca00116985c2c8952e6de260e92a4073 (edt-xserver): Use replace-regexp-in-string. (x-server-vendor): Define for compiler, for builds without X. diff -r c11958c9ca00 -r 5d941efe34d7 lisp/emulation/edt.el --- a/lisp/emulation/edt.el Thu Jun 12 03:50:31 2008 +0000 +++ b/lisp/emulation/edt.el Thu Jun 12 03:51:20 2008 +0000 @@ -315,15 +315,17 @@ (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