Merge remote-tracking branch 'origin/master' into feature/android

This commit is contained in:
Po Lu 2023-04-28 08:05:34 +08:00
commit 4ea40db823
5 changed files with 36 additions and 7 deletions

View file

@ -1224,7 +1224,15 @@ x
@end example
However, the other arguments (all but the last) should be mutable
lists.
lists. They can be dotted lists, whose last @sc{cdr}s are then
replaced with the next argument:
@example
@group
(nconc (cons 1 2) (cons 3 (cons 4 5)) 'z)
@result{} (1 3 4 . z)
@end group
@end example
A common pitfall is to use a constant list as a non-last argument to
@code{nconc}. If you do this, the resulting behavior is undefined

View file

@ -1531,7 +1531,16 @@ See Info node `(elisp) Integer Basics'."
(prev (car newargs)))
(cond
;; Elide null args.
((null arg) (loop (cdr args) newargs))
((and (null arg)
;; Don't elide a terminal nil unless preceded by
;; a nonempty proper list, since that will have
;; its last cdr forced to nil.
(or (cdr args)
;; FIXME: prove the 'nonempty proper list' property
;; for more forms than just `list', such as
;; `append', `mapcar' etc.
(eq 'list (car-safe (car newargs)))))
(loop (cdr args) newargs))
;; Merge consecutive `list' args.
((and (eq (car-safe arg) 'list)
(eq (car-safe prev) 'list))

View file

@ -2183,11 +2183,12 @@ connection if a previous connection has died for some reason."
;; Sanity check.
(let ((method (tramp-file-name-method vec)))
(unless (member
(or (rassoc method '(("smb" . "smb-share")
("davs" . "dav")
("nextcloud" . "dav")
("afp". "afp-volume")
("gdrive" . "google-drive")))
(or (assoc-default
method '(("smb" . "smb-share")
("davs" . "dav")
("nextcloud" . "dav")
("afp". "afp-volume")
("gdrive" . "google-drive")))
method)
tramp-gvfs-mounttypes)
(tramp-error vec 'file-error "Method `%s' not supported by GVFS" method)))

View file

@ -1349,6 +1349,7 @@ let-bind this variable."
;; IRIX64: /usr/bin
;; QNAP QTS: ---
;; Hydra: /run/current-system/sw/bin:/bin:/usr/bin
;;;###tramp-autoload
(defcustom tramp-remote-path
'(tramp-default-remote-path "/bin" "/usr/bin" "/sbin" "/usr/sbin"
"/usr/local/bin" "/usr/local/sbin" "/local/bin" "/local/freeware/bin"

View file

@ -766,6 +766,16 @@ inner loops respectively."
((eq x 2) (setq y 'c)))
(list x y)))))
(mapcar fn (bytecomp-test-identity '(0 1 2 3 10 11))))
;; `nconc' nil arg elimination
(nconc (list 1 2 3 4) nil)
(nconc (list 1 2 3 4) nil nil)
(let ((x (cons 1 (cons 2 (cons 3 4)))))
(nconc x nil))
(let ((x (cons 1 (cons 2 (cons 3 4)))))
(nconc x nil nil))
(let ((x (cons 1 (cons 2 (cons 3 4)))))
(nconc nil x nil (list 5 6) nil))
)
"List of expressions for cross-testing interpreted and compiled code.")