diff options
| author | Richard M. Stallman | 1994-01-07 12:23:44 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-01-07 12:23:44 +0000 |
| commit | c4a7b2a414784651b1224ef669a16fabc119e0cd (patch) | |
| tree | de6904ce42de770383b6d57976c614cab9d5c8f4 | |
| parent | 47d53769121d39a84f49bf25be2c04c2fac59407 (diff) | |
| download | emacs-c4a7b2a414784651b1224ef669a16fabc119e0cd.tar.gz emacs-c4a7b2a414784651b1224ef669a16fabc119e0cd.zip | |
(dired-move-to-filename-regexp): New variable.
(dired-move-to-filename): Use that.
| -rw-r--r-- | lisp/dired.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/dired.el b/lisp/dired.el index 77235cb79c9..a0acaab1710 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 | |||
| 1116 | 1116 | ||
| 1117 | ;;; Functions for finding the file name in a dired buffer line. | 1117 | ;;; Functions for finding the file name in a dired buffer line. |
| 1118 | 1118 | ||
| 1119 | (defvar dired-move-to-filename-regexp | ||
| 1120 | "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)[ ]+[0-9]+" | ||
| 1121 | "Regular expression to match a month abbreviation followed by a number.") | ||
| 1122 | |||
| 1119 | ;; Move to first char of filename on this line. | 1123 | ;; Move to first char of filename on this line. |
| 1120 | ;; Returns position (point) or nil if no filename on this line." | 1124 | ;; Returns position (point) or nil if no filename on this line." |
| 1121 | (defun dired-move-to-filename (&optional raise-error eol) | 1125 | (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 | |||
| 1123 | (or eol (setq eol (progn (end-of-line) (point)))) | 1127 | (or eol (setq eol (progn (end-of-line) (point)))) |
| 1124 | (beginning-of-line) | 1128 | (beginning-of-line) |
| 1125 | (if (re-search-forward | 1129 | (if (re-search-forward |
| 1126 | "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)[ ]+[0-9]+" | 1130 | dired-move-to-filename-regexp |
| 1127 | eol t) | 1131 | eol t) |
| 1128 | (progn | 1132 | (progn |
| 1129 | (skip-chars-forward " ") ; there is one SPC after day of month | 1133 | (skip-chars-forward " ") ; there is one SPC after day of month |