summaryrefslogtreecommitdiff
path: root/lisp/eshell/esh-util.el
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2021-04-05 21:00:18 +0200
committerAndrea Corallo <akrl@sdf.org>2021-04-05 21:00:18 +0200
commit74b58f28ecbc6fe9d7a60c96c79acfdf2329ff73 (patch)
treeb1e99508f836a1d12d17eb3072e14b0cfb2ba407 /lisp/eshell/esh-util.el
parent0a3e715e1f5e13874139b4678375b8f5704b800b (diff)
parent14d295871a93c37a33d558ec4e8d49a93b787d8e (diff)
downloademacs-74b58f28ecbc6fe9d7a60c96c79acfdf2329ff73.tar.gz
emacs-74b58f28ecbc6fe9d7a60c96c79acfdf2329ff73.tar.bz2
emacs-74b58f28ecbc6fe9d7a60c96c79acfdf2329ff73.zip
Merge remote-tracking branch 'savannah/master' into native-comp
Diffstat (limited to 'lisp/eshell/esh-util.el')
-rw-r--r--lisp/eshell/esh-util.el36
1 files changed, 10 insertions, 26 deletions
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index 8ef1ac9c345..a48f62654d5 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -223,18 +223,6 @@ then quoting is done by a backslash, rather than a doubled delimiter."
(string-to-number string)
string))))))
-(defun eshell-sublist (l &optional n m)
- "Return from LIST the N to M elements.
-If N or M is nil, it means the end of the list."
- (let ((a (copy-sequence l)))
- (if (and m (consp (nthcdr m a)))
- (setcdr (nthcdr m a) nil))
- (if n
- (setq a (nthcdr n a))
- (setq n (1- (length a))
- a (last a)))
- a))
-
(defvar-local eshell-path-env (getenv "PATH")
"Content of $PATH.
It might be different from \(getenv \"PATH\"), when
@@ -303,20 +291,6 @@ Prepend remote identification of `default-directory', if any."
(define-obsolete-function-alias 'eshell-flatten-list #'flatten-tree "27.1")
-(defun eshell-uniquify-list (l)
- "Remove occurring multiples in L. You probably want to sort first."
- (let ((m l))
- (while m
- (while (and (cdr m)
- (string= (car m)
- (cadr m)))
- (setcdr m (cddr m)))
- (setq m (cdr m))))
- l)
-(define-obsolete-function-alias
- 'eshell-uniqify-list
- 'eshell-uniquify-list "27.1")
-
(defun eshell-stringify (object)
"Convert OBJECT into a string value."
(cond
@@ -710,9 +684,19 @@ gid format. Valid values are `string' and `integer', defaulting to
; (or result
; (file-attributes filename))))
+;; Obsolete.
+
+(define-obsolete-function-alias 'eshell-uniquify-list #'seq-uniq "28.1")
+(define-obsolete-function-alias 'eshell-uniqify-list #'seq-uniq "28.1")
(define-obsolete-function-alias 'eshell-copy-tree #'copy-tree "28.1")
(define-obsolete-function-alias 'eshell-user-name #'user-login-name "28.1")
+(defun eshell-sublist (l &optional n m)
+ "Return from LIST the N to M elements.
+If N or M is nil, it means the end of the list."
+ (declare (obsolete seq-subseq "28.1"))
+ (seq-subseq l n (1+ m)))
+
(provide 'esh-util)
;;; esh-util.el ends here