diff options
| -rw-r--r-- | lisp/dired-x.el | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 01e537df0f5..c89e109f839 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el | |||
| @@ -101,28 +101,12 @@ | |||
| 101 | ;;; here in case the user has autoloaded dired-x via the dired-jump key binding | 101 | ;;; here in case the user has autoloaded dired-x via the dired-jump key binding |
| 102 | ;;; (instead of autoloading to dired as is suggested in the info-pages). | 102 | ;;; (instead of autoloading to dired as is suggested in the info-pages). |
| 103 | 103 | ||
| 104 | ;;; WARNING: The copy of dired.el in GNU Emacs versions earlier than 19.20 had | 104 | (require 'dired) |
| 105 | ;;; the `provide' *after* the `run-hooks'. In such a case, loading dired below | ||
| 106 | ;;; will cause an infinite loop. To prevent this we test the value of the GNU | ||
| 107 | ;;; Emacs major version number before requiring dired. | ||
| 108 | |||
| 109 | (if (string< "19.19" | ||
| 110 | ;; Compare with major version number (i.e., 19.22 not 19.22.11). | ||
| 111 | (substring emacs-version 0 | ||
| 112 | (and (string-match "^[0-9]*\\.[0-9]*" emacs-version) | ||
| 113 | (match-end 0)))) | ||
| 114 | (require 'dired)) | ||
| 115 | 105 | ||
| 116 | ;;; We will redefine some functions and also need some macros so we need to | 106 | ;;; We will redefine some functions and also need some macros so we need to |
| 117 | ;;; load dired stuff of GNU Emacs. Since dired-aux.el (at least up to GNU | 107 | ;;; load dired stuff of GNU Emacs. |
| 118 | ;;; Emacs 19.22) does not `provide' itself, we do it here. This avoids the | 108 | |
| 119 | ;;; possibility recursive loading because of the nasty `eval-when-compile' that | 109 | (require 'dired-aux) |
| 120 | ;;; is in dired-aux.el. | ||
| 121 | |||
| 122 | (and (not (featurep 'dired-aux)) | ||
| 123 | (load "dired-aux" nil t) | ||
| 124 | (not (featurep 'dired-aux)) | ||
| 125 | (provide 'dired-aux)) | ||
| 126 | 110 | ||
| 127 | ;;;; User-defined variables. | 111 | ;;;; User-defined variables. |
| 128 | 112 | ||