Skip to content

Commit bd843b3

Browse files
author
Yuuki Harano
committed
Merge branch 'master' of https://github.com/emacs-mirror/emacs into pgtk
2 parents 9f1d869 + de1d150 commit bd843b3

File tree

4 files changed

+48
-21
lines changed

4 files changed

+48
-21
lines changed

doc/emacs/fixit.texi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ undo commands.
7777

7878
Alternatively, if you want to resume undoing, without redoing
7979
previous undo commands, use @kbd{M-x undo-only}. This is like
80-
@code{undo}, but will not redo changes you have just undone.
81-
To complement it @kbd{M-x undo-redo} will undo previous undo commands
80+
@code{undo}, but will not redo changes you have just undone. To
81+
complement it, @kbd{M-x undo-redo} will undo previous undo commands
8282
(and will not record itself as an undoable command).
8383

8484
If you notice that a buffer has been modified accidentally, the

etc/NEWS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ dimension.
7474
* Editing Changes in Emacs 28.1
7575

7676
+++
77-
** New command 'undo-redo'
77+
** New command 'undo-redo'.
78+
It undoes previous undo commands, but doesn't record itself as an
79+
undoable command.
7880

7981
+++
8082
** 'read-number' now has its own history variable.

lisp/net/tramp.el

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3721,9 +3721,9 @@ support symbolic links."
37213721
(if (process-live-p p)
37223722
;; Display output.
37233723
(with-current-buffer output-buffer
3724-
(display-buffer output-buffer '(nil (allow-no-window . t)))
37253724
(setq mode-line-process '(":%s"))
3726-
(shell-mode)
3725+
(unless (eq major-mode 'shell-mode)
3726+
(shell-mode))
37273727
(set-process-filter p #'comint-output-filter)
37283728
(set-process-sentinel p #'shell-command-sentinel)
37293729
(when error-file
@@ -3733,7 +3733,8 @@ support symbolic links."
37333733
(with-current-buffer error-buffer
37343734
(insert-file-contents-literally
37353735
error-file nil nil nil 'replace))
3736-
(delete-file error-file)))))
3736+
(delete-file error-file))))
3737+
(display-buffer output-buffer '(nil (allow-no-window . t))))
37373738

37383739
(when error-file
37393740
(delete-file error-file)))))
@@ -4848,7 +4849,12 @@ verbosity of 6."
48484849
"Read a password from user (compat function).
48494850
Consults the auth-source package.
48504851
Invokes `password-read' if available, `read-passwd' else."
4851-
(let* ((case-fold-search t)
4852+
(let* (;; If `auth-sources' contains "~/.authinfo.gpg", and
4853+
;; `exec-path' contains a relative file name like ".", it
4854+
;; could happen that the "gpg" command is not found. So we
4855+
;; adapt `default-directory'. (Bug#39389, Bug#39489)
4856+
(default-directory (tramp-compat-temporary-file-directory))
4857+
(case-fold-search t)
48524858
(key (tramp-make-tramp-file-name
48534859
;; In tramp-sh.el, we must use "password-vector" due to
48544860
;; multi-hop.

test/lisp/net/tramp-tests.el

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
(require 'vc-hg)
5151

5252
(declare-function tramp-find-executable "tramp-sh")
53+
(declare-function tramp-get-remote-gid "tramp-sh")
5354
(declare-function tramp-get-remote-path "tramp-sh")
5455
(declare-function tramp-get-remote-perl "tramp-sh")
5556
(declare-function tramp-get-remote-stat "tramp-sh")
@@ -3113,22 +3114,38 @@ This tests also `access-file', `file-readable-p',
31133114
(file-remote-p tmp-name1)
31143115
(replace-regexp-in-string
31153116
"/" "//" (file-remote-p tmp-name1 'localname))))
3117+
;; `file-ownership-preserved-p' is implemented only in tramp-sh.el.
3118+
(test-file-ownership-preserved-p (tramp--test-sh-p))
31163119
attr)
31173120
(unwind-protect
31183121
(progn
3122+
;; A sticky bit could damage the `file-ownership-preserved-p' test.
3123+
(when
3124+
(and test-file-ownership-preserved-p
3125+
(zerop (logand
3126+
#o1000
3127+
(file-modes tramp-test-temporary-file-directory))))
3128+
(write-region "foo" nil tmp-name1)
3129+
(setq test-file-ownership-preserved-p
3130+
(= (tramp-compat-file-attribute-group-id
3131+
(file-attributes tmp-name1))
3132+
(tramp-get-remote-gid
3133+
(tramp-dissect-file-name tmp-name1) 'integer)))
3134+
(delete-file tmp-name1))
3135+
31193136
(should-error
31203137
(access-file tmp-name1 "error")
31213138
:type tramp-file-missing)
31223139
;; `file-ownership-preserved-p' should return t for
3123-
;; non-existing files. It is implemented only in tramp-sh.el.
3124-
(when (tramp--test-sh-p)
3140+
;; non-existing files.
3141+
(when test-file-ownership-preserved-p
31253142
(should (file-ownership-preserved-p tmp-name1 'group)))
31263143
(write-region "foo" nil tmp-name1)
31273144
(should (file-exists-p tmp-name1))
31283145
(should (file-readable-p tmp-name1))
31293146
(should (file-regular-p tmp-name1))
31303147
(should-not (access-file tmp-name1 "error"))
3131-
(when (tramp--test-sh-p)
3148+
(when test-file-ownership-preserved-p
31323149
(should (file-ownership-preserved-p tmp-name1 'group)))
31333150

31343151
;; We do not test inodes and device numbers.
@@ -3158,16 +3175,16 @@ This tests also `access-file', `file-readable-p',
31583175
(should (stringp (tramp-compat-file-attribute-group-id attr)))
31593176

31603177
(tramp--test-ignore-make-symbolic-link-error
3161-
(should-error
3162-
(access-file tmp-name2 "error")
3163-
:type tramp-file-missing)
3164-
(when (tramp--test-sh-p)
3178+
(should-error
3179+
(access-file tmp-name2 "error")
3180+
:type tramp-file-missing)
3181+
(when test-file-ownership-preserved-p
31653182
(should (file-ownership-preserved-p tmp-name2 'group)))
31663183
(make-symbolic-link tmp-name1 tmp-name2)
31673184
(should (file-exists-p tmp-name2))
31683185
(should (file-symlink-p tmp-name2))
31693186
(should-not (access-file tmp-name2 "error"))
3170-
(when (tramp--test-sh-p)
3187+
(when test-file-ownership-preserved-p
31713188
(should (file-ownership-preserved-p tmp-name2 'group)))
31723189
(setq attr (file-attributes tmp-name2))
31733190
(should
@@ -3198,15 +3215,15 @@ This tests also `access-file', `file-readable-p',
31983215
(tramp-dissect-file-name tmp-name3))))
31993216
(delete-file tmp-name2))
32003217

3201-
(when (tramp--test-sh-p)
3218+
(when test-file-ownership-preserved-p
32023219
(should (file-ownership-preserved-p tmp-name1 'group)))
32033220
(delete-file tmp-name1)
32043221
(make-directory tmp-name1)
32053222
(should (file-exists-p tmp-name1))
32063223
(should (file-readable-p tmp-name1))
32073224
(should-not (file-regular-p tmp-name1))
32083225
(should-not (access-file tmp-name1 ""))
3209-
(when (tramp--test-sh-p)
3226+
(when test-file-ownership-preserved-p
32103227
(should (file-ownership-preserved-p tmp-name1 'group)))
32113228
(setq attr (file-attributes tmp-name1))
32123229
(should (eq (tramp-compat-file-attribute-type attr) t)))
@@ -4357,7 +4374,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
43574374
(with-no-warnings
43584375
(make-process
43594376
:name "test5" :buffer (current-buffer)
4360-
:command '("cat" "/")
4377+
:command '("cat" "/does-not-exist")
43614378
:stderr stderr
43624379
:file-handler t)))
43634380
(should (processp proc))
@@ -4367,7 +4384,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
43674384
(delete-process proc)
43684385
(with-current-buffer stderr
43694386
(should
4370-
(string-match "cat:.* Is a directory" (buffer-string)))))
4387+
(string-match
4388+
"cat:.* No such file or directory" (buffer-string)))))
43714389

43724390
;; Cleanup.
43734391
(ignore-errors (delete-process proc))
@@ -4381,7 +4399,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
43814399
(with-no-warnings
43824400
(make-process
43834401
:name "test6" :buffer (current-buffer)
4384-
:command '("cat" "/")
4402+
:command '("cat" "/does-not-exist")
43854403
:stderr tmpfile
43864404
:file-handler t)))
43874405
(should (processp proc))
@@ -4392,7 +4410,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
43924410
(with-temp-buffer
43934411
(insert-file-contents tmpfile)
43944412
(should
4395-
(string-match "cat:.* Is a directory" (buffer-string)))))
4413+
(string-match
4414+
"cat:.* No such file or directory" (buffer-string)))))
43964415

43974416
;; Cleanup.
43984417
(ignore-errors (delete-process proc))

0 commit comments

Comments
 (0)