[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 7de495a 2/7: Make two eshell aliases obsolete
From: |
Stefan Kangas |
Subject: |
master 7de495a 2/7: Make two eshell aliases obsolete |
Date: |
Mon, 1 Feb 2021 08:01:18 -0500 (EST) |
branch: master
commit 7de495a7c14f24d494e3391e7655130867c21e27
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
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.
---
lisp/eshell/esh-cmd.el | 18 +++++++++---------
lisp/eshell/esh-util.el | 7 +++----
2 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index 4d63467..daca035 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -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)))))
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index 872e3b5..0b5cf19 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -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
- master updated (a6be184 -> 3b708f4), Stefan Kangas, 2021/02/01
- master f215332 1/7: Add cross-references to defvar-local, Stefan Kangas, 2021/02/01
- master 7de495a 2/7: Make two eshell aliases obsolete,
Stefan Kangas <=
- master c322728 3/7: Redefine two functions as regular defuns, Stefan Kangas, 2021/02/01
- master 9785c6d 5/7: * lisp/hi-lock.el (hi-lock-mode): Doc fix; don't mention Emacs 21., Stefan Kangas, 2021/02/01
- master 3b708f4 7/7: * test/src/minibuf-tests.el (test-inhibit-interaction): Fix test., Stefan Kangas, 2021/02/01
- master d987ca6 6/7: Remove another variable obsolete since Emacs 23.2, Stefan Kangas, 2021/02/01
- master 1fdd7a0 4/7: Make XEmacs compat alias obsolete in allout-widgets.el, Stefan Kangas, 2021/02/01