aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-06-12 03:51:20 +0000
committerGlenn Morris2008-06-12 03:51:20 +0000
commitc83e2292599d690618ec113ca7f8cba84da79192 (patch)
tree15bf546eef955573a2f5a7432bd49ce0f61f0ac3
parentfc926716c103e60270cc80ff8be4823d12b2ab21 (diff)
downloademacs-c83e2292599d690618ec113ca7f8cba84da79192.tar.gz
emacs-c83e2292599d690618ec113ca7f8cba84da79192.zip
(edt-xserver): Use replace-regexp-in-string.
(x-server-vendor): Define for compiler, for builds without X.
-rw-r--r--lisp/emulation/edt.el20
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'.")
315(defconst edt-window-system (if (featurep 'emacs) window-system (console-type)) 315(defconst edt-window-system (if (featurep 'emacs) window-system (console-type))
316 "Indicates window system \(in GNU Emacs\) or console type \(in XEmacs\).") 316 "Indicates window system \(in GNU Emacs\) or console type \(in XEmacs\).")
317 317
318(defconst edt-xserver (if (eq edt-window-system 'x) 318(declare-function x-server-vendor "xfns.c" (&optional terminal))
319 (if (featurep 'xemacs) 319
320 ;; The Cygwin window manager has a `/' in its 320(defconst edt-xserver (when (eq edt-window-system 'x)
321 ;; name, which breaks the generated file name of 321 ;; The Cygwin window manager has a `/' in its
322 ;; the custom key map file. Replace `/' with a 322 ;; name, which breaks the generated file name of
323 ;; `-' to work around that. 323 ;; the custom key map file. Replace `/' with a
324 (replace-in-string (x-server-vendor) "[ /]" "-") 324 ;; `-' to work around that.
325 (subst-char-in-string ?/ ?- (subst-char-in-string ? ?- (x-server-vendor)))) 325 (if (featurep 'xemacs)
326 nil) 326 (replace-in-string (x-server-vendor) "[ /]" "-")
327 (replace-regexp-in-string "[ /]" "-"
328 (x-server-vendor))))
327 "Indicates X server vendor name, if applicable.") 329 "Indicates X server vendor name, if applicable.")
328 330
329(defvar edt-keys-file nil 331(defvar edt-keys-file nil