changeset 61866:37400c7baa6c

Rename "full-path" -> "full-name". (cvs-fileinfo->full-path, cvs-display-full-path): New fun and var, to preserve compatibility. (cvs-fileinfo->backup-file): Don't pass the full file name to file-newer-than-file-p.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 26 Apr 2005 20:35:42 +0000
parents d2d61028720d
children 59330b4d0e5b
files lisp/pcvs-info.el
diffstat 1 files changed, 14 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/pcvs-info.el	Tue Apr 26 18:32:09 2005 +0000
+++ b/lisp/pcvs-info.el	Tue Apr 26 20:35:42 2005 +0000
@@ -41,11 +41,13 @@
 ;;;; config variables
 ;;;;
 
-(defcustom cvs-display-full-path t
-  "*Specifies how the filenames should look like in the listing.
-If t, their full path name will be displayed, else only the filename."
+(defcustom cvs-display-full-name t
+  "*Specifies how the filenames should be displayed in the listing.
+If non-nil, their full filename name will be displayed, else only the
+non-directory part."
   :group 'pcl-cvs
   :type '(boolean))
+(define-obsolete-variable-alias 'cvs-display-full-path 'cvs-display-full-name)
 
 (defcustom cvs-allow-dir-commit nil
   "*Allow `cvs-mode-commit' on directories.
@@ -165,7 +167,7 @@
   ;; In addition to the above, the following values can be extracted:
 
   ;; handled    ;; t if this file doesn't require further action.
-  ;; full-path  ;; The complete relative filename.
+  ;; full-name  ;; The complete relative filename.
   ;; pp-name    ;; The printed file name
   ;; backup-file;; For MERGED and CONFLICT files after a \"cvs update\",
                 ;; this is a full path to the backup file where the
@@ -201,7 +203,7 @@
 
 ;; Fake selectors:
 
-(defun cvs-fileinfo->full-path (fileinfo)
+(defun cvs-fileinfo->full-name (fileinfo)
   "Return the full path for the file that is described in FILEINFO."
   (let ((dir (cvs-fileinfo->dir fileinfo)))
     (if (eq (cvs-fileinfo->type fileinfo) 'DIRCHANGE)
@@ -209,11 +211,12 @@
       ;; Here, I use `concat' rather than `expand-file-name' because I want
       ;; the resulting path to stay relative if `dir' is relative.
       (concat dir (cvs-fileinfo->file fileinfo)))))
+(define-obsolete-function-alias 'cvs-fileinfo->full-path 'cvs-fileinfo->full-name)
 
 (defun cvs-fileinfo->pp-name (fi)
   "Return the filename of FI as it should be displayed."
-  (if cvs-display-full-path
-      (cvs-fileinfo->full-path fi)
+  (if cvs-display-full-name
+      (cvs-fileinfo->full-name fi)
     (cvs-fileinfo->file fi)))
 
 (defun cvs-fileinfo->backup-file (fileinfo)
@@ -225,10 +228,11 @@
 				 (concat "\\`" (regexp-quote cvs-bakprefix)
 					 (regexp-quote file) "\\(\\.[0-9]+\\.[0-9]+\\)+\\'")))
 	 bf)
-    (dolist (f files bf)
+    (dolist (f files)
       (when (and (file-readable-p f)
 		 (or (null bf) (file-newer-than-file-p f bf)))
-	(setq bf (concat dir f))))))
+	(setq bf f)))
+    (concat dir bf)))
 
 ;; (defun cvs-fileinfo->handled (fileinfo)
 ;;   "Tell if this requires further action"
@@ -327,7 +331,7 @@
     (insert
      (case type
        (DIRCHANGE (concat "In directory "
-			  (cvs-add-face (cvs-fileinfo->full-path fileinfo)
+			  (cvs-add-face (cvs-fileinfo->full-name fileinfo)
 					'cvs-header-face t
 					'cvs-goal-column t)
 			  ":"))