diff options
| author | Karl Heuer | 1996-01-09 23:15:52 +0000 |
|---|---|---|
| committer | Karl Heuer | 1996-01-09 23:15:52 +0000 |
| commit | 9eabb7d50c668d2b39b389a27390d26b3086e1c9 (patch) | |
| tree | f07b51c8de7b249c96e042ced24c064ee9607f23 | |
| parent | 2f29e0c6d98976c706792255d157f4b8d142d16d (diff) | |
| download | emacs-9eabb7d50c668d2b39b389a27390d26b3086e1c9.tar.gz emacs-9eabb7d50c668d2b39b389a27390d26b3086e1c9.zip | |
(dired-standard-move-to-filename-regexp): New variable.
(dired-insert-directory): Don't alter environment if would use the
C locale anyway, or if dired-move-to-filename-regexp has been
changed from the default value.
When changing the environment, avoid need for setenv.
| -rw-r--r-- | lisp/dired.el | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lisp/dired.el b/lisp/dired.el index 6bf16084c00..e8697cd0a78 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -566,7 +566,15 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh." | |||
| 566 | end) | 566 | end) |
| 567 | ;; This makes sure that month names come out in English | 567 | ;; This makes sure that month names come out in English |
| 568 | ;; so we can find the start of the file name. | 568 | ;; so we can find the start of the file name. |
| 569 | (setenv "LC_ALL" "C") | 569 | ;; But if the user has customized the way of finding the file name, |
| 570 | ;; this is not necessary. | ||
| 571 | (if (and (equal dired-move-to-filename-regexp | ||
| 572 | dired-standard-move-to-filename-regexp) | ||
| 573 | ;; It also isn't necessary if we'd use the C locale anyway. | ||
| 574 | (not (equal (or (getenv "LC_ALL") (getenv "LC_TIME") | ||
| 575 | (getenv "LANGUAGE") "C") | ||
| 576 | "C"))) | ||
| 577 | (setq process-environment (cons "LC_ALL=C" process-environment))) | ||
| 570 | (if (consp dir-or-list) | 578 | (if (consp dir-or-list) |
| 571 | ;; In this case, use the file names in the cdr | 579 | ;; In this case, use the file names in the cdr |
| 572 | ;; exactly as originally given to dired-noselect. | 580 | ;; exactly as originally given to dired-noselect. |
| @@ -1246,6 +1254,10 @@ Optional arg GLOBAL means to replace all matches." | |||
| 1246 | "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)[ ]+[0-9]+ [ 0-9][0-9][:0-9][0-9][ 0-9] " | 1254 | "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)[ ]+[0-9]+ [ 0-9][0-9][:0-9][0-9][ 0-9] " |
| 1247 | "Regular expression to match a month abbreviation followed by a number.") | 1255 | "Regular expression to match a month abbreviation followed by a number.") |
| 1248 | 1256 | ||
| 1257 | (defconst dired-standard-move-to-filename-regexp | ||
| 1258 | "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)[ ]+[0-9]+ [ 0-9][0-9][:0-9][0-9][ 0-9] " | ||
| 1259 | "Regular expression to match a month abbreviation followed by a number.") | ||
| 1260 | |||
| 1249 | ;; Move to first char of filename on this line. | 1261 | ;; Move to first char of filename on this line. |
| 1250 | ;; Returns position (point) or nil if no filename on this line." | 1262 | ;; Returns position (point) or nil if no filename on this line." |
| 1251 | (defun dired-move-to-filename (&optional raise-error eol) | 1263 | (defun dired-move-to-filename (&optional raise-error eol) |