aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1994-01-07 12:23:44 +0000
committerRichard M. Stallman <[email protected]>1994-01-07 12:23:44 +0000
commitc4a7b2a414784651b1224ef669a16fabc119e0cd (patch)
treede6904ce42de770383b6d57976c614cab9d5c8f4 /lisp
parent47d53769121d39a84f49bf25be2c04c2fac59407 (diff)
(dired-move-to-filename-regexp): New variable.
(dired-move-to-filename): Use that.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/dired.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index 77235cb79c..a0acaab171 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1116,6 +1116,10 @@ Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on
;;; Functions for finding the file name in a dired buffer line.
+(defvar dired-move-to-filename-regexp
+ "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)[ ]+[0-9]+"
+ "Regular expression to match a month abbreviation followed by a number.")
+
;; 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)
@@ -1123,7 +1127,7 @@ Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on
(or eol (setq eol (progn (end-of-line) (point))))
(beginning-of-line)
(if (re-search-forward
- "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)[ ]+[0-9]+"
+ dired-move-to-filename-regexp
eol t)
(progn
(skip-chars-forward " ") ; there is one SPC after day of month