aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-12-30 04:57:17 +0000
committerRichard M. Stallman1996-12-30 04:57:17 +0000
commit23e217f6d2239c2f2b659fd4185b398e82ec37c0 (patch)
treeb2b3447c18919718b595bc3a2f152f427dd47936
parent6aea3b07e8a9453f5d99d211e23803d3124d199f (diff)
downloademacs-23e217f6d2239c2f2b659fd4185b398e82ec37c0.tar.gz
emacs-23e217f6d2239c2f2b659fd4185b398e82ec37c0.zip
(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."
1278 (concat (or dir default-directory) file)) 1278 (concat (or dir default-directory) file))
1279 1279
1280(defun dired-make-relative (file &optional dir no-error) 1280(defun dired-make-relative (file &optional dir no-error)
1281 ;;"Convert FILE (an absolute pathname) to a pathname relative to DIR. 1281 ;;"Convert FILE (an absolute file name) to a name relative to DIR.
1282 ;; Else error (unless NO-ERROR is non-nil, then FILE is returned unchanged) 1282 ;; Else error (unless NO-ERROR is non-nil, then FILE is returned unchanged)
1283 ;;DIR defaults to default-directory." 1283 ;;DIR defaults to default-directory."
1284 ;; DIR must be file-name-as-directory, as with all directory args in 1284 ;; 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."
1301 [ 0-9][0-9][:0-9][0-9][ 0-9] " 1301 [ 0-9][0-9][:0-9][0-9][ 0-9] "
1302 "Regular expression to match a month abbreviation followed date/time.") 1302 "Regular expression to match a month abbreviation followed date/time.")
1303 1303
1304(defvar dired-permission-flags-regexp
1305 "\\([^ ]\\)[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)"
1306 "Regular expression to match the permission flags in `ls -l'.")
1307
1304;; Move to first char of filename on this line. 1308;; Move to first char of filename on this line.
1305;; Returns position (point) or nil if no filename on this line." 1309;; Returns position (point) or nil if no filename on this line."
1306(defun dired-move-to-filename (&optional raise-error eol) 1310(defun dired-move-to-filename (&optional raise-error eol)
@@ -1334,8 +1338,7 @@ Optional arg GLOBAL means to replace all matches."
1334 ;; "l---------" (some systems make symlinks that way) 1338 ;; "l---------" (some systems make symlinks that way)
1335 ;; "----------" (plain file with zero perms) 1339 ;; "----------" (plain file with zero perms)
1336 (if (re-search-backward 1340 (if (re-search-backward
1337 "\\([^ ]\\)[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)[-r][-w]\\([^ ]\\)" 1341 dired-permission-flags-regexp nil t)
1338 nil t)
1339 (setq file-type (char-after (match-beginning 1)) 1342 (setq file-type (char-after (match-beginning 1))
1340 symlink (eq file-type ?l) 1343 symlink (eq file-type ?l)
1341 ;; Only with -F we need to know whether it's an executable 1344 ;; Only with -F we need to know whether it's an executable