summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/dired-x.el8
-rw-r--r--lisp/dired.el11
2 files changed, 8 insertions, 11 deletions
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 796625058be..4d66ab6f128 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1138,14 +1138,6 @@ otherwise."
;;; Miscellaneous internal functions
-;; This should be a builtin
-(defun dired-buffer-more-recently-used-p (buffer1 buffer2)
- "Return t if BUFFER1 is more recently used than BUFFER2.
-Considers buffers closer to the car of `buffer-list' to be more recent."
- (and (not (equal buffer1 buffer2))
- (memq buffer1 (buffer-list))
- (not (memq buffer1 (memq buffer2 (buffer-list))))))
-
;; Needed if ls -lh is supported and also for GNU ls -ls.
(defun dired-x--string-to-number (str)
"Like `string-to-number' but recognize a trailing unit prefix.
diff --git a/lisp/dired.el b/lisp/dired.el
index 5769b73f638..bdcfc36a0e0 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -40,9 +40,6 @@
(require 'dired-loaddefs nil t)
(require 'dnd)
-(declare-function dired-buffer-more-recently-used-p
- "dired-x" (buffer1 buffer2))
-
;;; Customizable variables
@@ -3505,6 +3502,14 @@ is the directory where the file on this line resides."
(point-max)
(point))))
+;; This should be a builtin
+(defun dired-buffer-more-recently-used-p (buffer1 buffer2)
+ "Return t if BUFFER1 is more recently used than BUFFER2.
+Considers buffers closer to the car of `buffer-list' to be more recent."
+ (and (not (equal buffer1 buffer2))
+ (memq buffer1 (buffer-list))
+ (not (memq buffer1 (memq buffer2 (buffer-list))))))
+
;;; Deleting files