changeset 50876:3311a93359a2

(uniquify-item, uniquify-get-proposed-name) (uniquify-rationalize-conflicting-sublist): Rename filename -> dirname.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 07 May 2003 15:53:08 +0000
parents aa7fb55b784f
children c701779986a1
files lisp/uniquify.el
diffstat 1 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/uniquify.el	Tue May 06 18:47:39 2003 +0000
+++ b/lisp/uniquify.el	Wed May 07 15:53:08 2003 +0000
@@ -160,8 +160,8 @@
 ;; uniquify-fix-list data structure
 (defstruct (uniquify-item
 	    (:constructor nil) (:copier nil)
-	    (:constructor uniquify-make-item (base filename buffer proposed)))
-  base filename buffer proposed)
+	    (:constructor uniquify-make-item (base dirname buffer proposed)))
+  base dirname buffer proposed)
 
 ;; Internal variables used free
 (defvar uniquify-possibly-resolvable nil)
@@ -251,13 +251,13 @@
     (uniquify-rationalize-conflicting-sublist conflicting-sublist
 					      old-proposed depth)))
 
-(defun uniquify-get-proposed-name (base filename &optional depth)
+(defun uniquify-get-proposed-name (base dirname &optional depth)
   (unless depth (setq depth uniquify-min-dir-content))
-  (assert (equal (directory-file-name filename) filename))  ;No trailing slash.
+  (assert (equal (directory-file-name dirname) dirname)) ;No trailing slash.
 
   ;; Distinguish directories by adding extra separator.
   (if (and uniquify-trailing-separator-p
-	   (file-directory-p (expand-file-name base filename))
+	   (file-directory-p (expand-file-name base dirname))
 	   (not (string-equal base "")))
       (cond ((eq uniquify-buffer-name-style 'forward)
 	     (setq base (file-name-as-directory base)))
@@ -267,18 +267,18 @@
 
   (let ((extra-string nil)
 	(n depth))
-    (while (and (> n 0) filename)
-      (let ((file (file-name-nondirectory filename)))
-	(when (setq filename (file-name-directory filename))
-	  (setq filename (directory-file-name filename)))
+    (while (and (> n 0) dirname)
+      (let ((file (file-name-nondirectory dirname)))
+	(when (setq dirname (file-name-directory dirname))
+	  (setq dirname (directory-file-name dirname)))
 	(setq n (1- n))
 	(push (if (zerop (length file)) ;nil or "".
-		  (prog1 "" (setq filename nil)) ;Could be `filename' iso "".
+		  (prog1 "" (setq dirname nil))	;Could be `dirname' iso "".
 		file)
 	      extra-string)))
     (when (zerop n)
-      (if (and filename extra-string
-	       (equal filename (file-name-directory filename)))
+      (if (and dirname extra-string
+	       (equal dirname (file-name-directory dirname)))
 	  ;; We're just before the root.  Let's add the leading / already.
 	  ;; With "/a/b"+"/c/d/b" this leads to "/a/b" and "d/b" but with
 	  ;; "/a/b"+"/c/a/b" this leads to "/a/b" and "a/b".
@@ -322,7 +322,7 @@
 	    (setf (uniquify-item-proposed item)
 		  (uniquify-get-proposed-name
 		   (uniquify-item-base item)
-		   (uniquify-item-filename item)
+		   (uniquify-item-dirname item)
 		   depth)))
 	  (uniquify-rationalize-a-list conf-list depth))
       (unless (string= old-name "")