aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2023-04-28 08:05:34 +0800
committerPo Lu2023-04-28 08:05:34 +0800
commit4ea40db8236c26d382ee1418d0d35b683070d11e (patch)
treecefb86bf251257762fc465ccb5a1f49437b12fe4
parentab10d1f6634f1d09e447427c442eb206ce6afc0b (diff)
parentdbd74657908e67e2a5001fbe440fb2a01a2f01af (diff)
downloademacs-4ea40db8236c26d382ee1418d0d35b683070d11e.tar.gz
emacs-4ea40db8236c26d382ee1418d0d35b683070d11e.zip
Merge remote-tracking branch 'origin/master' into feature/android
-rw-r--r--doc/lispref/lists.texi10
-rw-r--r--lisp/emacs-lisp/byte-opt.el11
-rw-r--r--lisp/net/tramp-gvfs.el11
-rw-r--r--lisp/net/tramp.el1
-rw-r--r--test/lisp/emacs-lisp/bytecomp-tests.el10
5 files changed, 36 insertions, 7 deletions
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index a509325854f..22a5f7f1239 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -1224,7 +1224,15 @@ x
1224@end example 1224@end example
1225 1225
1226However, the other arguments (all but the last) should be mutable 1226However, the other arguments (all but the last) should be mutable
1227lists. 1227lists. They can be dotted lists, whose last @sc{cdr}s are then
1228replaced with the next argument:
1229
1230@example
1231@group
1232(nconc (cons 1 2) (cons 3 (cons 4 5)) 'z)
1233 @result{} (1 3 4 . z)
1234@end group
1235@end example
1228 1236
1229A common pitfall is to use a constant list as a non-last argument to 1237A common pitfall is to use a constant list as a non-last argument to
1230@code{nconc}. If you do this, the resulting behavior is undefined 1238@code{nconc}. If you do this, the resulting behavior is undefined
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index da997212eef..0f7a3cb2665 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1531,7 +1531,16 @@ See Info node `(elisp) Integer Basics'."
1531 (prev (car newargs))) 1531 (prev (car newargs)))
1532 (cond 1532 (cond
1533 ;; Elide null args. 1533 ;; Elide null args.
1534 ((null arg) (loop (cdr args) newargs)) 1534 ((and (null arg)
1535 ;; Don't elide a terminal nil unless preceded by
1536 ;; a nonempty proper list, since that will have
1537 ;; its last cdr forced to nil.
1538 (or (cdr args)
1539 ;; FIXME: prove the 'nonempty proper list' property
1540 ;; for more forms than just `list', such as
1541 ;; `append', `mapcar' etc.
1542 (eq 'list (car-safe (car newargs)))))
1543 (loop (cdr args) newargs))
1535 ;; Merge consecutive `list' args. 1544 ;; Merge consecutive `list' args.
1536 ((and (eq (car-safe arg) 'list) 1545 ((and (eq (car-safe arg) 'list)
1537 (eq (car-safe prev) 'list)) 1546 (eq (car-safe prev) 'list))
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index ad7b1ff054c..859f4870b80 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -2183,11 +2183,12 @@ connection if a previous connection has died for some reason."
2183 ;; Sanity check. 2183 ;; Sanity check.
2184 (let ((method (tramp-file-name-method vec))) 2184 (let ((method (tramp-file-name-method vec)))
2185 (unless (member 2185 (unless (member
2186 (or (rassoc method '(("smb" . "smb-share") 2186 (or (assoc-default
2187 ("davs" . "dav") 2187 method '(("smb" . "smb-share")
2188 ("nextcloud" . "dav") 2188 ("davs" . "dav")
2189 ("afp". "afp-volume") 2189 ("nextcloud" . "dav")
2190 ("gdrive" . "google-drive"))) 2190 ("afp". "afp-volume")
2191 ("gdrive" . "google-drive")))
2191 method) 2192 method)
2192 tramp-gvfs-mounttypes) 2193 tramp-gvfs-mounttypes)
2193 (tramp-error vec 'file-error "Method `%s' not supported by GVFS" method))) 2194 (tramp-error vec 'file-error "Method `%s' not supported by GVFS" method)))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 81473404f0c..ca95b6b6971 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1349,6 +1349,7 @@ let-bind this variable."
1349;; IRIX64: /usr/bin 1349;; IRIX64: /usr/bin
1350;; QNAP QTS: --- 1350;; QNAP QTS: ---
1351;; Hydra: /run/current-system/sw/bin:/bin:/usr/bin 1351;; Hydra: /run/current-system/sw/bin:/bin:/usr/bin
1352;;;###tramp-autoload
1352(defcustom tramp-remote-path 1353(defcustom tramp-remote-path
1353 '(tramp-default-remote-path "/bin" "/usr/bin" "/sbin" "/usr/sbin" 1354 '(tramp-default-remote-path "/bin" "/usr/bin" "/sbin" "/usr/sbin"
1354 "/usr/local/bin" "/usr/local/sbin" "/local/bin" "/local/freeware/bin" 1355 "/usr/local/bin" "/usr/local/sbin" "/local/bin" "/local/freeware/bin"
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el
index 9ade47331df..222065c2e4e 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -766,6 +766,16 @@ inner loops respectively."
766 ((eq x 2) (setq y 'c))) 766 ((eq x 2) (setq y 'c)))
767 (list x y))))) 767 (list x y)))))
768 (mapcar fn (bytecomp-test-identity '(0 1 2 3 10 11)))) 768 (mapcar fn (bytecomp-test-identity '(0 1 2 3 10 11))))
769
770 ;; `nconc' nil arg elimination
771 (nconc (list 1 2 3 4) nil)
772 (nconc (list 1 2 3 4) nil nil)
773 (let ((x (cons 1 (cons 2 (cons 3 4)))))
774 (nconc x nil))
775 (let ((x (cons 1 (cons 2 (cons 3 4)))))
776 (nconc x nil nil))
777 (let ((x (cons 1 (cons 2 (cons 3 4)))))
778 (nconc nil x nil (list 5 6) nil))
769 ) 779 )
770 "List of expressions for cross-testing interpreted and compiled code.") 780 "List of expressions for cross-testing interpreted and compiled code.")
771 781