[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp files.el
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] emacs/lisp files.el |
Date: |
Sat, 21 Mar 2009 15:53:30 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 09/03/21 15:53:30
Modified files:
lisp : files.el
Log message:
(file-modes-rights-to-number): Doc fix.
(file-modes-symbolic-to-number): Handle empty permissions arg
(Bug#2729).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/files.el?cvsroot=emacs&r1=1.1040&r2=1.1041
Patches:
Index: files.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.1040
retrieving revision 1.1041
diff -u -b -r1.1040 -r1.1041
--- files.el 15 Mar 2009 02:31:45 -0000 1.1040
+++ files.el 21 Mar 2009 15:53:29 -0000 1.1041
@@ -5892,7 +5892,7 @@
(defun file-modes-rights-to-number (rights who-mask &optional from)
"Convert a symbolic mode string specification to an equivalent number.
-RIGHTS is the symbolic mode spec, it should match \"([+=-][rwxXstugo]+)+\".
+RIGHTS is the symbolic mode spec, it should match \"([+=-][rwxXstugo]*)+\".
WHO-MASK is the bit-mask specifying the category of users to which to
apply the access permissions. See `file-modes-char-to-who'.
FROM (or 0 if nil) gives the mode bits on which to base permissions if
@@ -5920,7 +5920,7 @@
(defun file-modes-symbolic-to-number (modes &optional from)
"Convert symbolic file modes to numeric file modes.
MODES is the string to convert, it should match
-\"[ugoa]*([+-=][rwxXstugo]+)+,...\".
+\"[ugoa]*([+-=][rwxXstugo]*)+,...\".
See (info \"(coreutils)File permissions\") for more information on this
notation.
FROM (or 0 if nil) gives the mode bits on which to base permissions if
@@ -5930,7 +5930,7 @@
(let ((case-fold-search nil)
(num-modes (or from 0)))
(while (/= (string-to-char modes) 0)
- (if (string-match "^\\([ugoa]*\\)\\([+=-][rwxXstugo]+\\)+\\(,\\|\\)"
modes)
+ (if (string-match "^\\([ugoa]*\\)\\([+=-][rwxXstugo]*\\)+\\(,\\|\\)"
modes)
(let ((num-who (apply 'logior 0
(mapcar 'file-modes-char-to-who
(match-string 1 modes)))))