]> git.eshelyaron.com Git - emacs.git/commitdiff
Rename `file-attribute-file-number' to `file-attribute-file-identifier'
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 14 Oct 2022 19:32:15 +0000 (21:32 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 14 Oct 2022 19:32:15 +0000 (21:32 +0200)
* doc/lispref/files.texi (File Attributes):
* etc/NEWS:
* lisp/files.el (find-buffer-visiting, find-file-noselect)
(set-visited-file-name, basic-save-buffer)
(file-attribute-file-identifier):
* lisp/startup.el (normal-top-level-add-subdirs-to-load-path):
* lisp/eshell/em-unix.el (eshell-shuffle-files):
* src/dired.c (Ffile_attributes):
Rename `file-attribute-file-number' to `file-attribute-file-identifier'.

doc/lispref/files.texi
etc/NEWS
lisp/eshell/em-unix.el
lisp/files.el
lisp/startup.el
src/dired.c

index 2467364dc6ea04edf05b1ed708fd78bcb0dd3839..b26d4f105858b7c0c74adf1d9e7cc07f65ff9a56 100644 (file)
@@ -1413,7 +1413,7 @@ to distinguish remote filesystems from local ones.
 The file's inode and device together give enough information
 to distinguish any two files on the system---no two files can have the
 same values for both of these attributes.  This tuple that uniquely
-identifies the file is returned by @code{file-attribute-file-number}.
+identifies the file is returned by @code{file-attribute-file-identifier}.
 
 For example, here are the file attributes for @file{files.texi}:
 
index b73c2c47d5d405e834e16ae314dcb06f3cfcc983..9641587052328caa6ef14a2d43134f7168b5565d 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -3159,7 +3159,7 @@ The following generalized variables have been made obsolete:
 * Lisp Changes in Emacs 29.1
 
 +++
-** New accessor function 'file-attribute-file-number'.
+** New accessor function 'file-attribute-file-identifier'.
 It returns the list of the inode number and device identifier
 retrieved by 'file-attributes'.  This value can be used to identify a
 file uniquely.  The device identifier can be a single number or (for
index 378b0ceeeae69f8c4ffe46556098b349a94c3293..4b5e4dd53ed0bdfbec065c2842e9a275c32cd594 100644 (file)
@@ -374,8 +374,8 @@ Remove the DIRECTORY(ies), if they are empty.")
             (file-attribute-inode-number attr)
             (file-attribute-device-number attr-target)
             (file-attribute-device-number attr)
-            (equal (file-attribute-file-number attr-target)
-                   (file-attribute-file-number attr)))
+            (equal (file-attribute-file-identifier attr-target)
+                   (file-attribute-file-identifier attr)))
        (eshell-error (format-message "%s: `%s' and `%s' are the same file\n"
                                      command (car files) target)))
        (t
index dd10f7399ccdbcefbe6d16293eeeb038ce107f64..3fa0f2f3b8117adcc74f204bb556283fbc18ae95 100644 (file)
@@ -2164,7 +2164,7 @@ If there is no such live buffer, return nil."
             (setq list (cdr list)))
           found)
         (let* ((attributes (file-attributes truename))
-               (number (file-attribute-file-number attributes))
+               (number (file-attribute-file-identifier attributes))
                (list (buffer-list)) found)
           (and buffer-file-numbers-unique
                (car-safe number)       ;Make sure the inode is not just nil.
@@ -2367,7 +2367,7 @@ the various files."
       (let* ((buf (get-file-buffer filename))
             (truename (abbreviate-file-name (file-truename filename)))
             (attributes (file-attributes truename))
-            (number (file-attribute-file-number attributes))
+            (number (file-attribute-file-identifier attributes))
             ;; Find any buffer for a file that has same truename.
             (other (and (not buf)
                          (find-buffer-visiting
@@ -4745,7 +4745,7 @@ the old visited file has been renamed to the new name FILENAME."
              (setq buffer-file-name truename))))
     (setq buffer-file-number
          (if filename
-             (file-attribute-file-number (file-attributes buffer-file-name))
+             (file-attribute-file-identifier (file-attributes buffer-file-name))
            nil))
     ;; write-file-functions is normally used for things like ftp-find-file
     ;; that visit things that are not local files as if they were files.
@@ -5734,7 +5734,8 @@ Before and after saving the buffer, this function runs
                  (setq save-buffer-coding-system last-coding-system-used)
                (setq buffer-file-coding-system last-coding-system-used))
              (setq buffer-file-number
-                   (file-attribute-file-number (file-attributes buffer-file-name)))
+                   (file-attribute-file-identifier
+                     (file-attributes buffer-file-name)))
              (if setmodes
                  (condition-case ()
                      (progn
@@ -8662,7 +8663,7 @@ It is a nonnegative integer."
 It is an integer or a cons cell of integers."
   (nth 11 attributes))
 
-(defsubst file-attribute-file-number (attributes)
+(defsubst file-attribute-file-identifier (attributes)
   "The inode and device numbers in ATTRIBUTES returned by `file-attributes'.
 The value is a list of the form (INODENUM DEVICE), where DEVICE could be
 either a single number or a cons cell of two numbers.
index c7faf4abc6f8d91453708a033f210bf1c3bd2ee6..725984b815bf3145769b63737b809fe7ec049928 100644 (file)
@@ -458,7 +458,8 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
        ;; The Windows version doesn't report meaningful inode numbers, so
        ;; use the canonicalized absolute file name of the directory instead.
        (setq attrs (or canonicalized
-                       (file-attribute-file-number (file-attributes this-dir))))
+                       (file-attribute-file-identifier
+                         (file-attributes this-dir))))
        (unless (member attrs normal-top-level-add-subdirs-inode-list)
          (push attrs normal-top-level-add-subdirs-inode-list)
          (dolist (file contents)
index 1b4edf2048311c56268427482ef0ee278b8da37f..ef729df5d2bf1a89b7eb5e3e842844202e1d2cfa 100644 (file)
@@ -928,7 +928,7 @@ Elements of the attribute list are:
 Large integers are bignums, so `eq' might not work on them.
 On most filesystems, the combination of the inode and the device
 identifier uniquely identifies the file.  This unique file identification
-is provided by the access function `file-attribute-file-number'.
+is provided by the access function `file-attribute-file-identifier'.
 
 On MS-Windows, performance depends on `w32-get-true-file-attributes',
 which see.