mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Replace two functions with seq-subseq
* lisp/emacs-lisp/seq.el (seq-subseq): Add autoload cookie. * lisp/eshell/esh-util.el (eshell-sublist): Redefine using seq-subseq and make obsolete. Update callers. * lisp/wid-edit.el (widget-sublist): Redefine as obsolete function alias for seq-subseq. Update callers.
This commit is contained in:
parent
be9e3c48fa
commit
cd5dfa086d
4 changed files with 15 additions and 27 deletions
|
|
@ -758,7 +758,7 @@ matched."
|
|||
(setq nth (eshell-hist-word-reference nth)))
|
||||
(unless (numberp mth)
|
||||
(setq mth (eshell-hist-word-reference mth)))
|
||||
(cons (mapconcat #'identity (eshell-sublist textargs nth mth) " ")
|
||||
(cons (mapconcat #'identity (seq-subseq textargs nth (1+ mth)) " ")
|
||||
end))))
|
||||
|
||||
(defun eshell-hist-parse-modifier (hist reference)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -710,9 +698,17 @@ gid format. Valid values are `string' and `integer', defaulting to
|
|||
; (or result
|
||||
; (file-attributes filename))))
|
||||
|
||||
;; Obsolete.
|
||||
|
||||
(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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue