summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-12-30 04:57:17 +0000
committerRichard M. Stallman <rms@gnu.org>1996-12-30 04:57:17 +0000
commit2250013d5fd6d2bcfa3a48c2f439d4598f046ea9 (patch)
tree2f46c9d231597d21d644d6dfd7ca2174ddf05f4f
parenta2f7205c986a72b2ac13d09b0b7fe403db9b8109 (diff)
downloademacs-2250013d5fd6d2bcfa3a48c2f439d4598f046ea9.tar.gz
(dired-permission-flags-regexp): New variable.
(dired-move-to-end-of-filename): Use it instead of a constant.
-rw-r--r--lisp/dired.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index 428994a9f50..c45ba1b2ab1 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1278,7 +1278,7 @@ Optional arg GLOBAL means to replace all matches."
(concat (or dir default-directory) file))
(defun dired-make-relative (file &optional dir no-error)
- ;;"Convert FILE (an absolute pathname) to a pathname relative to DIR.
+ ;;"Convert FILE (an absolute file name) to a name relative to DIR.
;; Else error (unless NO-ERROR is non-nil, then FILE is returned unchanged)
;;DIR defaults to default-directory."
;; DIR must be file-name-as-directory, as with all directory args in
@@ -1301,6 +1301,10 @@ Optional arg GLOBAL means to replace all matches."
[ 0-9][0-9][:0-9][0-9][ 0-9] "
"Regular expression to match a month abbreviation followed date/time.")
+(defvar dired-permission-flags-regexp
+ "\\([^ ]\\)[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)"
+ "Regular expression to match the permission flags in `ls -l'.")
+
;; Move to first char of filename on this line.
;; Returns position (point) or nil if no filename on this line."
(defun dired-move-to-filename (&optional raise-error eol)
@@ -1334,8 +1338,7 @@ Optional arg GLOBAL means to replace all matches."
;; "l---------" (some systems make symlinks that way)
;; "----------" (plain file with zero perms)
(if (re-search-backward
- "\\([^ ]\\)[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)"
- nil t)
+ dired-permission-flags-regexp nil t)
(setq file-type (char-after (match-beginning 1))
symlink (eq file-type ?l)
;; Only with -F we need to know whether it's an executable