From 15fc7b3cde92e420f48dfe188251e6af4d832af5 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 5 Jan 2023 13:23:04 +0100 Subject: [PATCH] Remove obsolete Tramp items * etc/NEWS: Obsolete user option 'tramp-completion-reread-directory-timeout' has been removed. Fix typos. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Ignore `make-directory-internal'. * lisp/net/tramp-sh.el (tramp-get-remote-trash): Remove. * lisp/net/tramp-smb.el (tramp-smb-handle-make-directory-internal): Remove. * lisp/net/tramp.el (tramp-default-user): Fix docstring. (tramp-completion-reread-directory-timeout): Remove. --- etc/NEWS | 58 +++++++++++++++++++++------------------ lisp/net/tramp-archive.el | 2 +- lisp/net/tramp-sh.el | 8 ------ lisp/net/tramp-smb.el | 20 -------------- lisp/net/tramp.el | 18 +----------- 5 files changed, 34 insertions(+), 72 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 1ab6822da3f..a2924201267 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1,6 +1,6 @@ GNU Emacs NEWS -- history of user-visible changes. -Copyright (C) 2021-2023 Free Software Foundation, Inc. +Copyright (C) 2022-2023 Free Software Foundation, Inc. See the end of the file for license conditions. Please send Emacs bug reports to 'bug-gnu-emacs@gnu.org'. @@ -32,13 +32,13 @@ applies, and please also update docstrings as needed. ** X selection requests are now handled much faster and asynchronously. This means it should be less necessary to disable the likes of -`select-active-regions' when Emacs is running over a slow network +'select-active-regions' when Emacs is running over a slow network connection. ** Emacs now updates invisible frames that are made visible by a compositor. If an invisible or an iconified frame is shown to the user by the compositing manager, Emacs will now redisplay such a frame even though -'frame-visible-' returns nil or 'icon' for it. This can happen, for +'frame-visible-p' returns nil or 'icon' for it. This can happen, for example, as part of preview for iconified frames. +++ @@ -48,11 +48,11 @@ as it has in batch mode since Emacs 24. * Editing Changes in Emacs 30.1 -** New helper 'transpose-sexps-function' -Emacs now can set this defvar to customize the behavior of the +** New helper variable 'transpose-sexps-function'. +Emacs now can set this variable to customize the behavior of the 'transpose-sexps' function. -** New function 'treesit-transpose-sexps' +** New function 'treesit-transpose-sexps'. treesit.el now unconditionally sets 'transpose-sexps-function' for all Tree-sitter modes. This functionality utilizes the new 'transpose-sexps-function'. @@ -60,20 +60,20 @@ Tree-sitter modes. This functionality utilizes the new * Changes in Specialized Modes and Packages in Emacs 30.1 --- -** Variable order and truncation can now be configured in gdb-many-window mode. -The new variable 'gdb-locals-table-row-config' allows users to +** Variable order and truncation can now be configured in 'gdb-many-windows'. +The new user option 'gdb-locals-table-row-config' allows users to configure the order and max length of various properties in the local variables buffer when using 'gdb-many-windows'. -By default, this variable is set to write the properties in the order: +By default, this user option is set to write the properties in the order: name, type and value, where the name and type are truncated to 20 characters, and the value is truncated according to the value of 'gdb-locals-value-limit'. -If you want to get back the old behavior, set -'gdb-locals-table-row-config' to the value +If you want to get back the old behavior, set the user option to the value - ((type . 0)(name . 0)(value . ,gdb-locals-value-limit)). + (setopt gdb-locals-table-row-config + `((type . 0) (name . 0) (value . ,gdb-locals-value-limit))) ** VC @@ -83,7 +83,7 @@ This is a string or a list of strings that specifies the Git log switches for shortlogs, such as the one produced by 'C-x v L'. 'vc-git-log-switches' is no longer used for shortlogs. -** bs +** Buffer Selection --- *** New user option 'bs-default-action-list'. @@ -102,32 +102,39 @@ manual. +++ *** 'eshell-read-aliases-list' is now an interactive command. -After manually editing 'eshell-aliases-file', you can use -'M-x eshell-read-aliases-list' to load the edited aliases. +After manually editing 'eshell-aliases-file', you can use this command +to load the edited aliases. ** Prog Mode + +++ -*** New command 'prog-fill-reindent-defun' +*** New command 'prog-fill-reindent-defun'. This command either fills a single paragraph in a defun, such as a -doc-string, or a comment, or (re)indents the surrounding defun if +docstring, or a comment, or (re)indents the surrounding defun if point is not in a comment or a string. It is by default bound to 'M-q' in 'prog-mode' and all its descendants. + * New Modes and Packages in Emacs 30.1 + --- -** The highly accessible Modus themes collection has six items +** The highly accessible Modus themes collection has six items. The 'modus-operandi' and 'modus-vivendi' are the main themes that have been part of Emacs since version 28. The former is light, the latter dark. In addition to these, we now have 'modus-operandi-tinted' and 'modus-vivendi-tinted' for easier legibility, as well as 'modus-operandi-deuteranopia' and 'modus-vivendi-deuteranopia' to cover the needs of users with red-green color deficiency. The Info -manual of the themes describes the details and showcases all their -customization options. +manual "(modus-themes) Top" describes the details and showcases all +their customization options. * Incompatible Lisp Changes in Emacs 30.1 +** User option 'tramp-completion-reread-directory-timeout' has been removed. +This user option has been obsoleted in Emacs 27, use +'remote-file-name-inhibit-cache' instead. + * Lisp Changes in Emacs 30.1 @@ -139,7 +146,7 @@ The compiler now warns about an empty body argument to 'when', 'unless', 'ignore-error' and 'with-suppressed-warnings' in addition to the existing warnings for 'let' and 'let*'. Example: - (when (> x 2)) + (when (> x 2)) This warning can be suppressed using 'with-suppressed-warnings' with the warning name 'empty-body'. @@ -149,9 +156,9 @@ the warning name 'empty-body'. The compiler now warns about quoted condition (error) names in 'condition-case' and 'ignore-error'. Example: - (condition-case nil - (/ x y) - ('arith-error "division by zero")) + (condition-case nil + (/ x y) + ('arith-error "division by zero")) Quoting them adds the error name 'quote' to those handled or ignored respectively, which was probably not intended. @@ -162,7 +169,7 @@ The compiler now warns about comparisons by identity with a literal string, cons, vector, record, function, large integer or float as this may not match any value at all. Example: - (eq x "hello") + (eq x "hello") Only literals for symbols and small integers (fixnums), including characters, are guaranteed to have a consistent (unique) identity. @@ -177,7 +184,6 @@ compared reliably at all. This warning can be suppressed using 'with-suppressed-warnings' with the warning name 'suspicious'. - * Changes in Emacs 30.1 on Non-Free Operating Systems diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 36992014e13..66447f0cb58 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -299,7 +299,7 @@ It must be supported by libarchive(3).") (lock-file . ignore) (make-auto-save-file-name . ignore) (make-directory . tramp-archive-handle-not-implemented) - (make-directory-internal . tramp-archive-handle-not-implemented) + (make-directory-internal . ignore) (make-lock-file-name . ignore) (make-nearby-temp-file . tramp-handle-make-nearby-temp-file) (make-process . ignore) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 1ba2a92e21c..f215cbc19ef 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -5825,14 +5825,6 @@ Nonexistent directories are removed from spec." vec (format "%s --canonicalize-missing /" result))) result)))) -(defun tramp-get-remote-trash (vec) - "Determine remote `trash' command. -This command is returned only if `delete-by-moving-to-trash' is non-nil." - (and delete-by-moving-to-trash - (with-tramp-connection-property vec "trash" - (tramp-message vec 5 "Finding a suitable `trash' command") - (tramp-find-executable vec "trash" (tramp-get-remote-path vec))))) - (defun tramp-get-remote-touch (vec) "Determine remote `touch' command." (with-tramp-connection-property vec "touch" diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index dc374fd01b5..0c457565057 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -1181,26 +1181,6 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." (unless (file-directory-p dir) (tramp-error v 'file-error "Couldn't make directory %s" dir)))) -;; This is not used anymore. -(defun tramp-smb-handle-make-directory-internal (directory) - "Like `make-directory-internal' for Tramp files." - (declare (obsolete nil "29.1")) - (setq directory (directory-file-name (expand-file-name directory))) - (unless (file-name-absolute-p directory) - (setq directory (expand-file-name directory default-directory))) - (with-parsed-tramp-file-name directory nil - (when (file-directory-p (file-name-directory directory)) - (tramp-smb-send-command - v (if (tramp-smb-get-cifs-capabilities v) - (format "posix_mkdir %s %o" - (tramp-smb-shell-quote-localname v) (default-file-modes)) - (format "mkdir %s" (tramp-smb-shell-quote-localname v)))) - ;; We must also flush the cache of the directory, because - ;; `file-attributes' reads the values from there. - (tramp-flush-file-properties v localname)) - (unless (file-directory-p directory) - (tramp-error v 'file-error "Couldn't make directory %s" directory)))) - (defun tramp-smb-handle-make-symbolic-link (target linkname &optional ok-if-already-exists) "Like `make-symbolic-link' for Tramp files. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 4b6addd9b05..67a269ce50a 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -443,9 +443,7 @@ See `tramp-methods' for a list of possibilities for METHOD." (defcustom tramp-default-user nil "Default user to use for transferring files. It is nil by default; otherwise settings in configuration files like -\"~/.ssh/config\" would be overwritten. Also see `tramp-default-user-alist'. - -This variable is regarded as obsolete, and will be removed soon." +\"~/.ssh/config\" would be overwritten. Also see `tramp-default-user-alist'." :type '(choice (const nil) string)) ;;;###tramp-autoload @@ -1402,20 +1400,6 @@ based on the Tramp and Emacs versions, and should not be set here." :version "26.1" :type '(repeat string)) -(defcustom tramp-completion-reread-directory-timeout 10 - "Defines seconds since last remote command before rereading a directory. -A remote directory might have changed its contents. In order to -make it visible during file name completion in the minibuffer, -Tramp flushes its cache and rereads the directory contents when -more than `tramp-completion-reread-directory-timeout' seconds -have been gone since last remote command execution. A value of t -would require an immediate reread during filename completion, nil -means to use always cached values for the directory contents." - :type '(choice (const nil) (const t) integer)) -(make-obsolete-variable - 'tramp-completion-reread-directory-timeout - 'remote-file-name-inhibit-cache "27.2") - ;;; Internal Variables: (defvar tramp-current-connection nil -- 2.39.2