mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-24 07:20:37 +00:00
Make two eshell aliases obsolete
* lisp/eshell/esh-util.el (eshell-user-name): Redefine as obsolete function alias for 'user-login-name'. (eshell-copy-tree): Redefine as obsolete function alias for 'copy-tree'. * lisp/eshell/esh-cmd.el (eshell-do-eval): Don't use above obsolete alias.
This commit is contained in:
parent
f215332c8b
commit
7de495a7c1
@ -1001,7 +1001,7 @@ be finished later after the completion of an asynchronous subprocess."
|
||||
;; expand any macros directly into the form. This is done so that
|
||||
;; we can modify any `let' forms to evaluate only once.
|
||||
(if (macrop (car form))
|
||||
(let ((exp (eshell-copy-tree (macroexpand form))))
|
||||
(let ((exp (copy-tree (macroexpand form))))
|
||||
(eshell-manipulate (format-message "expanding macro `%s'"
|
||||
(symbol-name (car form)))
|
||||
(setcar form (car exp))
|
||||
@ -1009,7 +1009,7 @@ be finished later after the completion of an asynchronous subprocess."
|
||||
(let ((args (cdr form)))
|
||||
(cond
|
||||
((eq (car form) 'while)
|
||||
;; `eshell-copy-tree' is needed here so that the test argument
|
||||
;; `copy-tree' is needed here so that the test argument
|
||||
;; doesn't get modified and thus always yield the same result.
|
||||
(when (car eshell-command-body)
|
||||
(cl-assert (not synchronous-p))
|
||||
@ -1017,27 +1017,27 @@ be finished later after the completion of an asynchronous subprocess."
|
||||
(setcar eshell-command-body nil)
|
||||
(setcar eshell-test-body nil))
|
||||
(unless (car eshell-test-body)
|
||||
(setcar eshell-test-body (eshell-copy-tree (car args))))
|
||||
(setcar eshell-test-body (copy-tree (car args))))
|
||||
(while (cadr (eshell-do-eval (car eshell-test-body)))
|
||||
(setcar eshell-command-body
|
||||
(if (cddr args)
|
||||
`(progn ,@(eshell-copy-tree (cdr args)))
|
||||
(eshell-copy-tree (cadr args))))
|
||||
`(progn ,@(copy-tree (cdr args)))
|
||||
(copy-tree (cadr args))))
|
||||
(eshell-do-eval (car eshell-command-body) synchronous-p)
|
||||
(setcar eshell-command-body nil)
|
||||
(setcar eshell-test-body (eshell-copy-tree (car args))))
|
||||
(setcar eshell-test-body (copy-tree (car args))))
|
||||
(setcar eshell-command-body nil))
|
||||
((eq (car form) 'if)
|
||||
;; `eshell-copy-tree' is needed here so that the test argument
|
||||
;; `copy-tree' is needed here so that the test argument
|
||||
;; doesn't get modified and thus always yield the same result.
|
||||
(if (car eshell-command-body)
|
||||
(progn
|
||||
(cl-assert (not synchronous-p))
|
||||
(eshell-do-eval (car eshell-command-body)))
|
||||
(unless (car eshell-test-body)
|
||||
(setcar eshell-test-body (eshell-copy-tree (car args))))
|
||||
(setcar eshell-test-body (copy-tree (car args))))
|
||||
(setcar eshell-command-body
|
||||
(eshell-copy-tree
|
||||
(copy-tree
|
||||
(if (cadr (eshell-do-eval (car eshell-test-body)))
|
||||
(cadr args)
|
||||
(car (cddr args)))))
|
||||
|
@ -486,8 +486,6 @@ list."
|
||||
"Return the user id for user NAME."
|
||||
(car (rassoc name (eshell-read-user-names))))
|
||||
|
||||
(defalias 'eshell-user-name 'user-login-name)
|
||||
|
||||
(autoload 'pcomplete-read-hosts-file "pcomplete")
|
||||
(autoload 'pcomplete-read-hosts "pcomplete")
|
||||
(autoload 'pcomplete-read-host-names "pcomplete")
|
||||
@ -644,8 +642,6 @@ gid format. Valid values are `string' and `integer', defaulting to
|
||||
entry)
|
||||
(file-attributes file id-format))))
|
||||
|
||||
(defalias 'eshell-copy-tree 'copy-tree)
|
||||
|
||||
(defsubst eshell-processp (proc)
|
||||
"If the `processp' function does not exist, PROC is not a process."
|
||||
(and (fboundp 'processp) (processp proc)))
|
||||
@ -715,6 +711,9 @@ gid format. Valid values are `string' and `integer', defaulting to
|
||||
; (or result
|
||||
; (file-attributes filename))))
|
||||
|
||||
(define-obsolete-function-alias 'eshell-copy-tree #'copy-tree "28.1")
|
||||
(define-obsolete-function-alias 'eshell-user-name #'user-login-name "28.1")
|
||||
|
||||
(provide 'esh-util)
|
||||
|
||||
;;; esh-util.el ends here
|
||||
|
Loading…
Reference in New Issue
Block a user