comparison lisp/w32-fns.el @ 90732:bc10a33dd40b

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 563-582) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 177-185) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-158
author Miles Bader <miles@gnu.org>
date Mon, 01 Jan 2007 03:21:06 +0000
parents 6588c6259dfb d53f5b616853
children 95d0cdf160ea
comparison
equal deleted inserted replaced
90731:a6c97c25a666 90732:bc10a33dd40b
238 238
239 On Windows and DOS, replace invalid characters. On DOS, make 239 On Windows and DOS, replace invalid characters. On DOS, make
240 sure to obey the 8.3 limitations. On Windows, turn Cygwin names 240 sure to obey the 8.3 limitations. On Windows, turn Cygwin names
241 into native names, and also turn slashes into backslashes if the 241 into native names, and also turn slashes into backslashes if the
242 shell requires it (see `w32-shell-dos-semantics')." 242 shell requires it (see `w32-shell-dos-semantics')."
243 (let ((name 243 (save-match-data
244 (save-match-data 244 (let ((name
245 (if (string-match "\\`/cygdrive/\\([a-zA-Z]\\)/" filename) 245 (if (string-match "\\`/cygdrive/\\([a-zA-Z]\\)/" filename)
246 (replace-match "\\1:/" t nil filename) 246 (replace-match "\\1:/" t nil filename)
247 (copy-sequence filename)))) 247 (copy-sequence filename)))
248 (start 0)) 248 (start 0))
249 ;; leave ':' if part of drive specifier 249 ;; leave ':' if part of drive specifier
250 (if (and (> (length name) 1) 250 (if (and (> (length name) 1)
251 (eq (aref name 1) ?:)) 251 (eq (aref name 1) ?:))
252 (setq start 2)) 252 (setq start 2))
253 ;; destructively replace invalid filename characters with ! 253 ;; destructively replace invalid filename characters with !
254 (while (string-match "[?*:<>|\"\000-\037]" name start) 254 (while (string-match "[?*:<>|\"\000-\037]" name start)
255 (aset name (match-beginning 0) ?!) 255 (aset name (match-beginning 0) ?!)
256 (setq start (match-end 0))) 256 (setq start (match-end 0)))
257 ;; convert directory separators to Windows format 257 ;; convert directory separators to Windows format
258 ;; (but only if the shell in use requires it) 258 ;; (but only if the shell in use requires it)
259 (when (w32-shell-dos-semantics) 259 (when (w32-shell-dos-semantics)
260 (setq start 0) 260 (setq start 0)
261 (while (string-match "/" name start) 261 (while (string-match "/" name start)
262 (aset name (match-beginning 0) ?\\) 262 (aset name (match-beginning 0) ?\\)
263 (setq start (match-end 0)))) 263 (setq start (match-end 0))))
264 name)) 264 name)))
265 265
266 ;;; Fix interface to (X-specific) mouse.el 266 ;;; Fix interface to (X-specific) mouse.el
267 (defun x-set-selection (type data) 267 (defun x-set-selection (type data)
268 (or type (setq type 'PRIMARY)) 268 (or type (setq type 'PRIMARY))
269 (put 'x-selections type data)) 269 (put 'x-selections type data))