changeset 109215:a357e3f2e91f

Merge from mainline.
author Katsumi Yamaoka <katsumi@flagship2>
date Sat, 05 Jun 2010 11:10:33 +0000
parents e38bba2d1deb (current diff) 3e41dbf56aa2 (diff)
children 42fed2a860b2
files
diffstat 18 files changed, 205 insertions(+), 163 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS	Fri Jun 04 11:31:07 2010 +0000
+++ b/etc/NEWS	Sat Jun 05 11:10:33 2010 +0000
@@ -167,6 +167,8 @@
 **** vc-log-incoming for Git runs "git fetch" so that the necessary
 data is available locally.
 
+**** vc-log-incoming and vc-log-outgoing for Git require version 1.7 (or newer).
+
 *** New key bindings: C-x v I and C-x v O bound to vc-log-incoming and
 vc-log-outgoing, respectively.
 
--- a/lisp/ChangeLog	Fri Jun 04 11:31:07 2010 +0000
+++ b/lisp/ChangeLog	Sat Jun 05 11:10:33 2010 +0000
@@ -1,3 +1,36 @@
+2010-06-05  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	vc-log-incoming/vc-log-outgoing fixes for Git.
+	* vc-git.el (vc-git-log-view-mode): Fix font lock for
+	incoming/outgoing logs.
+	(vc-git-log-outgoing, vc-git-log-incoming): Use @{upstream}
+	instead of vc-git-compute-remote.
+	(vc-git-compute-remote): Remove.
+
+2010-06-04  Juri Linkov  <juri@jurta.org>
+
+	* simple.el (kill-new): Fix logic of kill-do-not-save-duplicates.
+	Instead of setting `replace' to t and replacing the same string
+	with itself, don't do certain actions when
+	kill-do-not-save-duplicates is non-nil and string is equal to car
+	of kill-ring: don't call menu-bar-update-yank-menu, don't push
+	interprogram-paste strings to kill-ring, and don't push the input
+	argument `string' to kill-ring.
+	http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00072.html
+
+2010-06-04  Juanma Barranquero  <lekktu@gmail.com>
+
+	* subr.el (directory-sep-char): Move from fileio.c and make a defconst.
+
+2010-06-04  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): Expand "~/".
+	(tramp-gvfs-handler-mounted-unmounted)
+	(tramp-gvfs-connection-mounted-p): Handle default-location.
+
+	* net/tramp-smb.el (tramp-smb-handle-delete-directory): Don't try to
+	move files to trash.
+
 2010-06-04  Juanma Barranquero  <lekktu@gmail.com>
 
 	* international/mule-cmds.el (nonascii-insert-offset)
--- a/lisp/net/tramp-gvfs.el	Fri Jun 04 11:31:07 2010 +0000
+++ b/lisp/net/tramp-gvfs.el	Sat Jun 05 11:10:33 2010 +0000
@@ -157,7 +157,7 @@
 ;; <interface name='org.gtk.vfs.MountTracker'>
 ;;   <method name='listMounts'>
 ;;     <arg name='mount_info_list'
-;;          type='a{sosssssbay{aya{say}}}'
+;;          type='a{sosssssbay{aya{say}}ay}'
 ;;          direction='out'/>
 ;;   </method>
 ;;   <method name='mountLocation'>
@@ -167,11 +167,11 @@
 ;;   </method>
 ;;   <signal name='mounted'>
 ;;     <arg name='mount_info'
-;;          type='{sosssssbay{aya{say}}}'/>
+;;          type='{sosssssbay{aya{say}}ay}'/>
 ;;   </signal>
 ;;   <signal name='unmounted'>
 ;;     <arg name='mount_info'
-;;          type='{sosssssbay{aya{say}}}'/>
+;;          type='{sosssssbay{aya{say}}ay}'/>
 ;;   </signal>
 ;; </interface>
 ;;
@@ -191,7 +191,7 @@
 ;;       STRUCT		    mount_spec_item
 ;;         STRING	      key (server, share, type, user, host, port)
 ;;         ARRAY BYTE	      value
-;;   STRING               default_location	Since GVFS 1.5 only !!!
+;;   ARRAY BYTE           default_location	Since GVFS 1.5 only !!!
 
 (defconst tramp-gvfs-interface-mountoperation "org.gtk.vfs.MountOperation"
   "Used by the dbus-proxying implementation of GMountOperation.")
@@ -608,6 +608,14 @@
       (tramp-run-real-handler 'expand-file-name (list name nil))
     ;; Dissect NAME.
     (with-parsed-tramp-file-name name nil
+      ;; If there is a default location, expand tilde.
+      (when (string-match "\\`\\(~\\)\\(/\\|\\'\\)" localname)
+	(save-match-data
+	  (tramp-gvfs-maybe-open-connection (vector method user host "/")))
+	(setq localname
+	      (replace-match
+	       (tramp-get-file-property  v "/" "default-location" "~")
+	       nil t localname 1)))
       ;; Tilde expansion is not possible.
       (when (string-match "\\`\\(~[^/]*\\)\\(.*\\)\\'" localname)
 	(tramp-error
@@ -967,47 +975,55 @@
   "Signal handler for the \"org.gtk.vfs.MountTracker.mounted\" and
 \"org.gtk.vfs.MountTracker.unmounted\" signals."
   (ignore-errors
-    ;; The last element could be the default location in newer gvfs
-    ;; versions.  We must check this.
-    (unless (consp (car (last mount-info)))
-      (setq mount-info (butlast mount-info)))
-    (let* ((signal-name (dbus-event-member-name last-input-event))
-	   (mount-spec (cadar (last mount-info)))
-	   (method (dbus-byte-array-to-string (cadr (assoc "type" mount-spec))))
-	   (user (dbus-byte-array-to-string (cadr (assoc "user" mount-spec))))
-	   (domain (dbus-byte-array-to-string
-		    (cadr (assoc "domain" mount-spec))))
-	   (host (dbus-byte-array-to-string
-		  (cadr (or (assoc "host" mount-spec)
-			    (assoc "server" mount-spec)))))
-	   (port (dbus-byte-array-to-string (cadr (assoc "port" mount-spec))))
-	   (ssl (dbus-byte-array-to-string (cadr (assoc "ssl" mount-spec))))
-	   (prefix (concat (dbus-byte-array-to-string (caar (last mount-info)))
-			   (dbus-byte-array-to-string
-			    (cadr (assoc "share" mount-spec))))))
-      (when (string-match "^smb" method)
-	(setq method "smb"))
-      (when (string-equal "obex" method)
-	(setq host (tramp-bluez-device host)))
-      (when (and (string-equal "dav" method) (string-equal "true" ssl))
-	(setq method "davs"))
-      (unless (zerop (length domain))
-	(setq user (concat user tramp-prefix-domain-format domain)))
-      (unless (zerop (length port))
-	(setq host (concat host tramp-prefix-port-format port)))
-      (with-parsed-tramp-file-name
-	  (tramp-make-tramp-file-name method user host "") nil
-	(tramp-message
-	 v 6 "%s %s" signal-name (tramp-gvfs-stringify-dbus-message mount-info))
-	(tramp-set-file-property v "/" "list-mounts" 'undef)
-	(if (string-equal signal-name "unmounted")
-	    (tramp-set-file-property v "/" "fuse-mountpoint" nil)
-	  ;; Set prefix and mountpoint.
-	  (unless (string-equal prefix "/")
-	    (tramp-set-file-property v "/" "prefix" prefix))
-	  (tramp-set-file-property
-	   v "/" "fuse-mountpoint"
-	   (dbus-byte-array-to-string (car (last mount-info 2)))))))))
+    (let ((signal-name (dbus-event-member-name last-input-event))
+	  (elt mount-info))
+      ;; Jump over the first elements of the mount info. Since there
+      ;; were changes in the antries, we cannot access dedicated
+      ;; elements.
+      (while (stringp (car elt)) (setq elt (cdr elt)))
+      (let* ((fuse-mountpoint (dbus-byte-array-to-string (cadr elt)))
+	     (mount-spec (caddr elt))
+	     (default-location (dbus-byte-array-to-string (cadddr elt)))
+	     (method (dbus-byte-array-to-string
+		      (cadr (assoc "type" (cadr mount-spec)))))
+	     (user (dbus-byte-array-to-string
+		    (cadr (assoc "user" (cadr mount-spec)))))
+	     (domain (dbus-byte-array-to-string
+		      (cadr (assoc "domain" (cadr mount-spec)))))
+	     (host (dbus-byte-array-to-string
+		    (cadr (or (assoc "host" (cadr mount-spec))
+			      (assoc "server" (cadr mount-spec))))))
+	     (port (dbus-byte-array-to-string
+		    (cadr (assoc "port" (cadr mount-spec)))))
+	     (ssl (dbus-byte-array-to-string
+		   (cadr (assoc "ssl" (cadr mount-spec)))))
+	     (prefix (concat (dbus-byte-array-to-string (car mount-spec))
+			     (dbus-byte-array-to-string
+			      (cadr (assoc "share" (cadr mount-spec)))))))
+	(when (string-match "^smb" method)
+	  (setq method "smb"))
+	(when (string-equal "obex" method)
+	  (setq host (tramp-bluez-device host)))
+	(when (and (string-equal "dav" method) (string-equal "true" ssl))
+	  (setq method "davs"))
+	(unless (zerop (length domain))
+	  (setq user (concat user tramp-prefix-domain-format domain)))
+	(unless (zerop (length port))
+	  (setq host (concat host tramp-prefix-port-format port)))
+	(with-parsed-tramp-file-name
+	    (tramp-make-tramp-file-name method user host "") nil
+	  (tramp-message
+	   v 6 "%s %s"
+	   signal-name (tramp-gvfs-stringify-dbus-message mount-info))
+	  (tramp-set-file-property v "/" "list-mounts" 'undef)
+	  (if (string-equal signal-name "unmounted")
+	      (tramp-set-file-property v "/" "fuse-mountpoint" nil)
+	    ;; Set prefix, mountpoint and location.
+	    (unless (string-equal prefix "/")
+	      (tramp-set-file-property v "/" "prefix" prefix))
+	    (tramp-set-file-property v "/" "fuse-mountpoint" fuse-mountpoint)
+	    (tramp-set-file-property
+	     v "/" "default-location" default-location)))))))
 
 (dbus-register-signal
  :session nil tramp-gvfs-path-mounttracker
@@ -1031,25 +1047,29 @@
 	      :session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker
 	      tramp-gvfs-interface-mounttracker "listMounts"))
 	  nil)
-       ;; The last element could be the default location in newer gvfs
-       ;; versions.  We must check this.
-       (unless (consp (car (last elt))) (setq elt (butlast elt)))
-       (let* ((mount-spec (cadar (last elt)))
+       ;; Jump over the first elements of the mount info. Since there
+       ;; were changes in the antries, we cannot access dedicated
+       ;; elements.
+       (while (stringp (car elt)) (setq elt (cdr elt)))
+       (let* ((fuse-mountpoint (dbus-byte-array-to-string (cadr elt)))
+	      (mount-spec (caddr elt))
+	      (default-location (dbus-byte-array-to-string (cadddr elt)))
 	      (method (dbus-byte-array-to-string
-		       (cadr (assoc "type" mount-spec))))
+		       (cadr (assoc "type" (cadr mount-spec)))))
 	      (user (dbus-byte-array-to-string
-		     (cadr (assoc "user" mount-spec))))
+		     (cadr (assoc "user" (cadr mount-spec)))))
 	      (domain (dbus-byte-array-to-string
-		       (cadr (assoc "domain" mount-spec))))
+		       (cadr (assoc "domain" (cadr mount-spec)))))
 	      (host (dbus-byte-array-to-string
-		     (cadr (or (assoc "host" mount-spec)
-			       (assoc "server" mount-spec)))))
+		     (cadr (or (assoc "host" (cadr mount-spec))
+			       (assoc "server" (cadr mount-spec))))))
 	      (port (dbus-byte-array-to-string
-		     (cadr (assoc "port" mount-spec))))
-	      (ssl (dbus-byte-array-to-string (cadr (assoc "ssl" mount-spec))))
-	      (prefix (concat (dbus-byte-array-to-string (caar (last elt)))
+		     (cadr (assoc "port" (cadr mount-spec)))))
+	      (ssl (dbus-byte-array-to-string
+		    (cadr (assoc "ssl" (cadr mount-spec)))))
+	      (prefix (concat (dbus-byte-array-to-string (car mount-spec))
 			      (dbus-byte-array-to-string
-			       (cadr (assoc "share" mount-spec))))))
+			       (cadr (assoc "share" (cadr mount-spec)))))))
 	 (when (string-match "^smb" method)
 	   (setq method "smb"))
 	 (when (string-equal "obex" method)
@@ -1068,12 +1088,11 @@
 		(string-equal host (tramp-file-name-host vec))
 		(string-match (concat "^" (regexp-quote prefix))
 			      (tramp-file-name-localname vec)))
-	   ;; Set prefix and mountpoint.
+	   ;; Set prefix, mountpoint and location.
 	   (unless (string-equal prefix "/")
 	     (tramp-set-file-property vec "/" "prefix" prefix))
-	   (tramp-set-file-property
-	    vec "/" "fuse-mountpoint"
-	    (dbus-byte-array-to-string (car (last elt 2))))
+	   (tramp-set-file-property vec "/" "fuse-mountpoint" fuse-mountpoint)
+	   (tramp-set-file-property vec "/" "default-location" default-location)
 	   (throw 'mounted t)))))))
 
 (defun tramp-gvfs-mount-spec (vec)
--- a/lisp/net/tramp-smb.el	Fri Jun 04 11:31:07 2010 +0000
+++ b/lisp/net/tramp-smb.el	Sat Jun 05 11:10:33 2010 +0000
@@ -382,7 +382,7 @@
 	 (lambda (file)
 	   (if (file-directory-p file)
 	       (tramp-compat-delete-directory file recursive)
-	     (tramp-compat-delete-file file 'trash)))
+	     (delete-file file)))
 	 ;; We do not want to delete "." and "..".
 	 (directory-files
 	  directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")))
--- a/lisp/simple.el	Fri Jun 04 11:31:07 2010 +0000
+++ b/lisp/simple.el	Sat Jun 05 11:10:33 2010 +0000
@@ -2905,24 +2905,27 @@
     (if yank-handler
 	(signal 'args-out-of-range
 		(list string "yank-handler specified for empty string"))))
-  (when (and kill-do-not-save-duplicates
-             (equal string (car kill-ring)))
-    (setq replace t))
-  (if (fboundp 'menu-bar-update-yank-menu)
-      (menu-bar-update-yank-menu string (and replace (car kill-ring))))
+  (unless (and kill-do-not-save-duplicates
+	       (equal string (car kill-ring)))
+    (if (fboundp 'menu-bar-update-yank-menu)
+	(menu-bar-update-yank-menu string (and replace (car kill-ring)))))
   (when save-interprogram-paste-before-kill
     (let ((interprogram-paste (and interprogram-paste-function
                                    (funcall interprogram-paste-function))))
       (when interprogram-paste
-        (if (listp interprogram-paste)
-            (dolist (s (nreverse interprogram-paste))
-              (push s kill-ring))
-            (push interprogram-paste kill-ring)))))
-  (if (and replace kill-ring)
-      (setcar kill-ring string)
-    (push string kill-ring)
-    (if (> (length kill-ring) kill-ring-max)
-	(setcdr (nthcdr (1- kill-ring-max) kill-ring) nil)))
+        (dolist (s (if (listp interprogram-paste)
+		       (nreverse interprogram-paste)
+		     (list interprogram-paste)))
+	  (unless (and kill-do-not-save-duplicates
+		       (equal s (car kill-ring)))
+	    (push s kill-ring))))))
+  (unless (and kill-do-not-save-duplicates
+	       (equal string (car kill-ring)))
+    (if (and replace kill-ring)
+	(setcar kill-ring string)
+      (push string kill-ring)
+      (if (> (length kill-ring) kill-ring-max)
+	  (setcdr (nthcdr (1- kill-ring-max) kill-ring) nil))))
   (setq kill-ring-yank-pointer kill-ring)
   (if interprogram-cut-function
       (funcall interprogram-cut-function string (not replace))))
--- a/lisp/subr.el	Fri Jun 04 11:31:07 2010 +0000
+++ b/lisp/subr.el	Sat Jun 05 11:10:33 2010 +0000
@@ -1089,7 +1089,11 @@
 (make-obsolete 'process-filter-multibyte-p nil "23.1")
 (make-obsolete 'set-process-filter-multibyte nil "23.1")
 
-(make-obsolete-variable 'directory-sep-char "do not use it." "21.1")
+(defconst directory-sep-char ?/
+  "Directory separator character for built-in functions that return file names.
+The value is always ?/.")
+(make-obsolete-variable 'directory-sep-char "do not use it, just use `/'." "21.1")
+
 (make-obsolete-variable
  'mode-line-inverse-video
  "use the appropriate faces instead."
--- a/lisp/vc-git.el	Fri Jun 04 11:31:07 2010 +0000
+++ b/lisp/vc-git.el	Sat Jun 05 11:10:33 2010 +0000
@@ -606,31 +606,15 @@
 		(when start-revision (list start-revision))
 		'("--")))))))
 
-(defun vc-git-compute-remote ()
-  (let ((str (with-output-to-string
-	       (with-current-buffer standard-output
-		 (vc-git--out-ok "symbolic-ref" "HEAD"))))
-	branch remote)
-    (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str)
-	(progn
-	  (setq branch (match-string 2 str))
-	  (setq remote
-		(with-output-to-string
-		  (with-current-buffer standard-output
-		    (vc-git--out-ok "config"
-				    (concat "branch." branch ".remote")))))
-	  (when (string-match "\\([^\n]+\\)" remote)
-	    (setq remote (match-string 1 remote)))))))
-
 (defun vc-git-log-outgoing (buffer remote-location)
   (interactive)
   (vc-git-command
    buffer 0 nil
    "log"
    "--no-color" "--graph" "--decorate" "--date=short"
-   "--pretty=tformat:%d%h  %ad  %s" "--abbrev-commit" 
+   "--pretty=tformat:%d%h  %ad  %s" "--abbrev-commit"
    (concat (if (string= remote-location "")
-	       (vc-git-compute-remote)
+	       "@{upstream}"
 	     remote-location)
 	   "..HEAD")))
 
@@ -641,9 +625,9 @@
    buffer 0 nil
    "log" 
    "--no-color" "--graph" "--decorate" "--date=short"
-   "--pretty=tformat:%d%h  %ad  %s" "--abbrev-commit" 
+   "--pretty=tformat:%d%h  %ad  %s" "--abbrev-commit"
    (concat "HEAD.." (if (string= remote-location "")
-			(vc-git-compute-remote)
+			"@{upstream}"
 		      remote-location))))
 
 (defvar log-view-message-re)
@@ -657,11 +641,11 @@
   (set (make-local-variable 'log-view-file-re) "\\`a\\`")
   (set (make-local-variable 'log-view-per-file-logs) nil)
   (set (make-local-variable 'log-view-message-re)
-       (if (eq vc-log-view-type 'short)
+       (if (not (eq vc-log-view-type 'long))
 	   "^\\(?:[*/\\| ]+ \\)?\\(?: ([^)]+)\\)?\\([0-9a-z]+\\)  \\([-a-z0-9]+\\)  \\(.*\\)"
 	 "^commit *\\([0-9a-z]+\\)"))
   (set (make-local-variable 'log-view-font-lock-keywords)
-       (if (eq vc-log-view-type 'short)
+       (if (not (eq vc-log-view-type 'long))
 	   '(
 	     ;; Same as log-view-message-re, except that we don't
 	     ;; want the shy group for the tag name.
--- a/src/ChangeLog	Fri Jun 04 11:31:07 2010 +0000
+++ b/src/ChangeLog	Sat Jun 05 11:10:33 2010 +0000
@@ -1,3 +1,34 @@
+2010-06-05  Juanma Barranquero  <lekktu@gmail.com>
+
+	Remove obsolete macro BASE_LEADING_CODE_P.
+	* character.h (BASE_LEADING_CODE_P): Remove.
+	* regex.c [!emacs] (BASE_LEADING_CODE_P): Remove.
+	* buffer.c (Fset_buffer_multibyte):
+	* indent.c (scan_for_column, compute_motion):
+	* insdel.c (count_combining_before, count_combining_after):
+	Use LEADING_CODE_P instead of BASE_LEADING_CODE_P.
+
+2010-06-04  Juanma Barranquero  <lekktu@gmail.com>
+
+	Turn `directory-sep-char' into a noop.
+
+	* lisp.h [WINDOWSNT] (Vdirectory_sep_char): Don't declare.
+	(DIRECTORY_SEP): Define unconditionally.
+
+	* s/ms-w32.h (DIRECTORY_SEP): Remove.
+
+	* emacs.c (decode_env_path): Don't check DIRECTORY_SEP,
+	call dostounix_filename directly.
+
+	* fileio.c (CORRECT_DIR_SEPS): Remove.
+	(Ffile_name_directory, directory_file_name, Fexpand_file_name)
+	(Fsubstitute_in_file_name): Use dostounix_filename instead.
+	(file_name_as_directory): Use dostounix_filename, DIRECTORY_SEP.
+	(syms_of_fileio) <directory-sep-char>: Move to subr.el.
+
+	* w32proc.c (CORRECT_DIR_SEPS): Remove.
+	(Fw32_short_file_name, Fw32_long_file_name): Use dostounix_filename.
+
 2010-06-03  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	Move UNEXEC definition to autoconf.
--- a/src/buffer.c	Fri Jun 04 11:31:07 2010 +0000
+++ b/src/buffer.c	Sat Jun 05 11:10:33 2010 +0000
@@ -2189,7 +2189,7 @@
   other_buffer = XBUFFER (buffer);
 
   if (NILP (other_buffer->name))
-    error ("Cannot swap a dead buffer's text");    
+    error ("Cannot swap a dead buffer's text");
 
   /* Actually, it probably works just fine.
    * if (other_buffer == current_buffer)
@@ -2436,7 +2436,7 @@
 	  unsigned char *p = GPT_ADDR - 1;
 
 	  while (! CHAR_HEAD_P (*p) && p > BEG_ADDR) p--;
-	  if (BASE_LEADING_CODE_P (*p))
+	  if (LEADING_CODE_P (*p))
 	    {
 	      int new_gpt = GPT_BYTE - (GPT_ADDR - p);
 
@@ -4339,7 +4339,7 @@
   int oldsize = XVECTOR (last_overlay_modification_hooks)->size;
 
   if (last_overlay_modification_hooks_used == oldsize)
-    last_overlay_modification_hooks = larger_vector 
+    last_overlay_modification_hooks = larger_vector
       (last_overlay_modification_hooks, oldsize * 2, Qnil);
   ASET (last_overlay_modification_hooks, last_overlay_modification_hooks_used,
 	functionlist); last_overlay_modification_hooks_used++;
--- a/src/character.h	Fri Jun 04 11:31:07 2010 +0000
+++ b/src/character.h	Sat Jun 05 11:10:33 2010 +0000
@@ -221,10 +221,6 @@
 	(ASCII_BYTE_P (byte) || LEADING_CODE_P (byte))  */
 #define CHAR_HEAD_P(byte) (((byte) & 0xC0) != 0x80)
 
-/* Kept for backward compatibility.  This macro will be removed in the
-   future.  */
-#define BASE_LEADING_CODE_P LEADING_CODE_P
-
 /* How many bytes a character that starts with BYTE occupies in a
    multibyte form.  */
 #define BYTES_BY_CHAR_HEAD(byte)	\
@@ -591,7 +587,7 @@
    : 0)
 
 /* If C is a high surrogate, return 1.  If C is a low surrogate,
-   return 0. Otherwise, return 0.  */
+   return 0.  Otherwise, return 0.  */
 
 #define CHAR_SURROGATE_PAIR_P(c)	\
   ((c) < 0xD800 ? 0			\
--- a/src/emacs.c	Fri Jun 04 11:31:07 2010 +0000
+++ b/src/emacs.c	Sat Jun 05 11:10:33 2010 +0000
@@ -1723,7 +1723,7 @@
 #endif
   init_window ();
   init_font ();
-  
+
   if (!initialized)
     {
       char *file;
@@ -2384,10 +2384,7 @@
       strcpy (p, path);
       path = p;
 
-      if ('/' == DIRECTORY_SEP)
-	dostounix_filename (path);
-      else
-	unixtodos_filename (path);
+      dostounix_filename (path);
     }
 #endif
   lpath = Qnil;
--- a/src/fileio.c	Fri Jun 04 11:31:07 2010 +0000
+++ b/src/fileio.c	Sat Jun 05 11:10:33 2010 +0000
@@ -83,10 +83,6 @@
 #endif
 
 #ifdef DOS_NT
-#define CORRECT_DIR_SEPS(s) \
-  do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \
-       else unixtodos_filename (s); \
-  } while (0)
 /* On Windows, drive letters must be alphabetic - on DOS, the Netware
    redirector allows the six letters between 'Z' and 'a' as well. */
 #ifdef MSDOS
@@ -474,7 +470,7 @@
 	  p = beg + strlen (beg);
 	}
     }
-  CORRECT_DIR_SEPS (beg);
+  dostounix_filename (beg);
 #endif /* DOS_NT */
 
   return make_specified_string (beg, -1, p - beg, STRING_MULTIBYTE (filename));
@@ -561,12 +557,11 @@
   /* For Unix syntax, Append a slash if necessary */
   if (!IS_DIRECTORY_SEP (out[size]))
     {
-      /* Cannot use DIRECTORY_SEP, which could have any value */
-      out[size + 1] = '/';
+      out[size + 1] = DIRECTORY_SEP;
       out[size + 2] = '\0';
     }
 #ifdef DOS_NT
-  CORRECT_DIR_SEPS (out);
+  dostounix_filename (out);
 #endif
   return out;
 }
@@ -627,7 +622,7 @@
       )
     dst[slen - 1] = 0;
 #ifdef DOS_NT
-  CORRECT_DIR_SEPS (dst);
+  dostounix_filename (dst);
 #endif
   return 1;
 }
@@ -1032,10 +1027,9 @@
       if (!lose)
 	{
 #ifdef DOS_NT
-	  /* Make sure directories are all separated with / or \ as
-	     desired, but avoid allocation of a new string when not
-	     required. */
-	  CORRECT_DIR_SEPS (nm);
+	  /* Make sure directories are all separated with /, but
+	     avoid allocation of a new string when not required. */
+	  dostounix_filename (nm);
 #ifdef WINDOWSNT
 	  if (IS_DIRECTORY_SEP (nm[1]))
 	    {
@@ -1381,7 +1375,7 @@
 	target[0] = '/';
 	target[1] = ':';
       }
-    CORRECT_DIR_SEPS (target);
+    dostounix_filename (target);
 #endif /* DOS_NT */
 
     result = make_specified_string (target, -1, o - target, multibyte);
@@ -1659,7 +1653,7 @@
   bcopy (SDATA (filename), nm, SBYTES (filename) + 1);
 
 #ifdef DOS_NT
-  CORRECT_DIR_SEPS (nm);
+  dostounix_filename (nm);
   substituted = (strcmp (nm, SDATA (filename)) != 0);
 #endif
   endp = nm + SBYTES (filename);
@@ -5787,11 +5781,6 @@
   Fput (Qfile_date_error, Qerror_message,
 	make_pure_c_string ("Cannot set file date"));
 
-  DEFVAR_LISP ("directory-sep-char", &Vdirectory_sep_char,
-	       doc: /* Directory separator character for built-in functions that return file names.
-The value is always ?/.  Don't use this variable, just use `/'.  */);
-  XSETFASTINT (Vdirectory_sep_char, '/');
-
   DEFVAR_LISP ("file-name-handler-alist", &Vfile_name_handler_alist,
 	       doc: /* *Alist of elements (REGEXP . HANDLER) for file names handled specially.
 If a file name matches REGEXP, then all I/O on that file is done by calling
--- a/src/indent.c	Fri Jun 04 11:31:07 2010 +0000
+++ b/src/indent.c	Sat Jun 05 11:10:33 2010 +0000
@@ -506,7 +506,7 @@
 	width = XINT (prop) - col;
       else if (FLOATP (prop))
 	width = (int)(XFLOAT_DATA (prop) + 0.5) - col;
-	    
+
       if (width >= 0)
 	{
 	  EMACS_INT start;
@@ -628,7 +628,7 @@
 	 to this character.  */
 
       if (dp != 0
-	  && ! (multibyte && BASE_LEADING_CODE_P (c))
+	  && ! (multibyte && LEADING_CODE_P (c))
 	  && VECTORP (DISP_CHAR_VECTOR (dp, c)))
 	{
 	  Lisp_Object charvec;
@@ -679,7 +679,7 @@
 	      col += tab_width;
 	      col = col / tab_width * tab_width;
 	    }
-	  else if (multibyte && BASE_LEADING_CODE_P (c))
+	  else if (multibyte && LEADING_CODE_P (c))
 	    {
 	      /* Start of multi-byte form.  */
 	      unsigned char *ptr;
@@ -1577,7 +1577,7 @@
 	    }
 
 	  if (dp != 0
-	      && ! (multibyte && BASE_LEADING_CODE_P (c))
+	      && ! (multibyte && LEADING_CODE_P (c))
 	      && VECTORP (DISP_CHAR_VECTOR (dp, c)))
 	    {
 	      charvec = DISP_CHAR_VECTOR (dp, c);
@@ -1683,7 +1683,7 @@
 			hpos = width;
 		    }
 		}
-	      else if (multibyte && BASE_LEADING_CODE_P (c))
+	      else if (multibyte && LEADING_CODE_P (c))
 		{
 		  /* Start of multi-byte form.  */
 		  unsigned char *ptr;
--- a/src/insdel.c	Fri Jun 04 11:31:07 2010 +0000
+++ b/src/insdel.c	Sat Jun 05 11:10:33 2010 +0000
@@ -437,7 +437,7 @@
     }
 
   /* Adjusting only markers whose insertion-type is t may result in
-     - disordered start and end in overlays, and 
+     - disordered start and end in overlays, and
      - disordered overlays in the slot `overlays_before' of current_buffer.  */
   if (adjusted)
     {
@@ -843,7 +843,7 @@
   len = 1;
   p = BYTE_POS_ADDR (pos_byte - 1);
   while (! CHAR_HEAD_P (*p)) p--, len++;
-  if (! BASE_LEADING_CODE_P (*p)) /* case (3) */
+  if (! LEADING_CODE_P (*p)) /* case (3) */
     return 0;
 
   combining_bytes = BYTES_BY_CHAR_HEAD (*p) - len;
@@ -906,7 +906,7 @@
       i = pos_byte - 2;
       while (i >= 0 && ! CHAR_HEAD_P (p[i]))
 	i--;
-      if (i < 0 || !BASE_LEADING_CODE_P (p[i]))
+      if (i < 0 || !LEADING_CODE_P (p[i]))
 	return 0;
 
       bytes = BYTES_BY_CHAR_HEAD (p[i]);
@@ -914,7 +914,7 @@
 	      ? 0
 	      : bytes - (pos_byte - 1 - i + length));
     }
-  if (!BASE_LEADING_CODE_P (string[i]))
+  if (!LEADING_CODE_P (string[i]))
     return 0;
 
   bytes = BYTES_BY_CHAR_HEAD (string[i]) - (length - i);
--- a/src/lisp.h	Fri Jun 04 11:31:07 2010 +0000
+++ b/src/lisp.h	Sat Jun 05 11:10:33 2010 +0000
@@ -3509,16 +3509,10 @@
 extern void init_system_name P_ ((void));
 
 /* Some systems (e.g., NT) use a different path separator than Unix,
-   in addition to a device separator.  Default the path separator
+   in addition to a device separator.  Set the path separator
    to '/', and don't test for a device separator in IS_ANY_SEP.  */
 
-#ifdef WINDOWSNT
-extern Lisp_Object Vdirectory_sep_char;
-#endif
-
-#ifndef DIRECTORY_SEP
 #define DIRECTORY_SEP '/'
-#endif
 #ifndef IS_DIRECTORY_SEP
 #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)
 #endif
--- a/src/regex.c	Fri Jun 04 11:31:07 2010 +0000
+++ b/src/regex.c	Sat Jun 05 11:10:33 2010 +0000
@@ -290,7 +290,6 @@
 #  define SWITCH_ENUM_CAST(x) (x)
 
 /* Dummy macros for non-Emacs environments.  */
-# define BASE_LEADING_CODE_P(c) (0)
 # define CHAR_CHARSET(c) 0
 # define CHARSET_LEADING_CODE_BASE(c) 0
 # define MAX_MULTIBYTE_LENGTH 1
@@ -3805,7 +3804,7 @@
 
 		    if (c1 != c2 && (c1 = RE_CHAR_TO_UNIBYTE (c2)) >= 0)
 		      c = c1;
-		  }		      
+		  }
 		*b++ = c;
 		len = 1;
 	      }
@@ -4125,7 +4124,7 @@
 	  if (/* Any leading code can possibly start a character
 		 which doesn't match the specified set of characters.  */
 	      not
-	      || 
+	      ||
 	      /* If we can match a character class, we can match any
 		 multibyte characters.  */
 	      (CHARSET_RANGE_TABLE_EXISTS_P (&p[-2])
--- a/src/s/ms-w32.h	Fri Jun 04 11:31:07 2010 +0000
+++ b/src/s/ms-w32.h	Sat Jun 05 11:10:33 2010 +0000
@@ -95,9 +95,6 @@
    your system and must be used only through an encapsulation (which
    you should place, by convention, in sysdep.c).  */
 
-/* Define this to be the separator between path elements.  */
-#define DIRECTORY_SEP XINT (Vdirectory_sep_char)
-
 /* Define this to be the separator between devices and paths.  */
 #define DEVICE_SEP ':'
 
--- a/src/w32proc.c	Fri Jun 04 11:31:07 2010 +0000
+++ b/src/w32proc.c	Sat Jun 05 11:10:33 2010 +0000
@@ -1762,12 +1762,6 @@
 /* Some miscellaneous functions that are Windows specific, but not GUI
    specific (ie. are applicable in terminal or batch mode as well).  */
 
-/* lifted from fileio.c  */
-#define CORRECT_DIR_SEPS(s) \
-  do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \
-       else unixtodos_filename (s); \
-  } while (0)
-
 DEFUN ("w32-short-file-name", Fw32_short_file_name, Sw32_short_file_name, 1, 1, 0,
        doc: /* Return the short file name version (8.3) of the full path of FILENAME.
 If FILENAME does not exist, return nil.
@@ -1786,7 +1780,7 @@
   if (GetShortPathName (SDATA (ENCODE_FILE (filename)), shortname, MAX_PATH) == 0)
     return Qnil;
 
-  CORRECT_DIR_SEPS (shortname);
+  dostounix_filename (shortname);
 
   return build_string (shortname);
 }
@@ -1815,7 +1809,7 @@
   if (!w32_get_long_filename (SDATA (ENCODE_FILE (filename)), longname, MAX_PATH))
     return Qnil;
 
-  CORRECT_DIR_SEPS (longname);
+  dostounix_filename (longname);
 
   /* If we were passed only a drive, make sure that a slash is not appended
      for consistency with directories.  Allow for drive mapping via SUBST