emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/android 458c6e5c917: Merge remote-tracking branch 'origin/master


From: Po Lu
Subject: feature/android 458c6e5c917: Merge remote-tracking branch 'origin/master' into feature/android
Date: Tue, 4 Apr 2023 19:58:24 -0400 (EDT)

branch: feature/android
commit 458c6e5c9171f41f327ef88f4a4999db586f8e91
Merge: fb87f7a9050 30692f16b15
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Merge remote-tracking branch 'origin/master' into feature/android
---
 lisp/files.el                  |  2 +-
 lisp/net/tramp-sh.el           |  2 +-
 lisp/net/tramp.el              | 10 ++++++----
 lisp/progmodes/ruby-ts-mode.el |  1 +
 lisp/userlock.el               | 13 +++++++------
 5 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/lisp/files.el b/lisp/files.el
index a473851f4a8..ada37d2e9e5 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -555,7 +555,7 @@ using a transform that puts the lock files on a local file 
system."
   :version "28.1")
 
 (defcustom remote-file-name-inhibit-locks nil
-  "Whether to use file locks for remote files."
+  "Whether to create file locks for remote files."
   :group 'files
   :version "28.1"
   :type 'boolean)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 2ef97d540a0..2df3006c1d9 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4496,7 +4496,7 @@ process to set up.  VEC specifies the connection."
 
     ;; Set `remote-tty' process property.
     (let ((tty (tramp-send-command-and-read vec "echo \\\"`tty`\\\"" 
'noerror)))
-      (unless (string-empty-p tty)
+      (unless (tramp-string-empty-or-nil-p tty)
        (process-put proc 'remote-tty tty)
        (tramp-set-connection-property proc "remote-tty" tty)))
 
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index b1bd93410bc..3420bb76d14 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4791,10 +4791,12 @@ Do not set it manually, it is used buffer-local in 
`tramp-get-lock-pid'.")
           (delete-file lockname)
        ;; Trigger the unlock error.
        (signal 'file-error `("Cannot remove lock file for" ,file)))
-    ;; `userlock--handle-unlock-error' exists since Emacs 28.1.
-    (error
-     (when create-lockfiles
-       (tramp-compat-funcall 'userlock--handle-unlock-error err)))))
+    ;; `userlock--handle-unlock-error' exists since Emacs 28.1.  It
+    ;; checks for `create-lockfiles' since Emacs 30.1, we don't need
+    ;; this check here, then.
+    (error (unless (or (not create-lockfiles)
+                       (bound-and-true-p remote-file-name-inhibit-locks))
+             (tramp-compat-funcall 'userlock--handle-unlock-error err)))))
 
 (defun tramp-handle-load (file &optional noerror nomessage nosuffix 
must-suffix)
   "Like `load' for Tramp files."
diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el
index 262d989cd44..6a7326af61d 100644
--- a/lisp/progmodes/ruby-ts-mode.el
+++ b/lisp/progmodes/ruby-ts-mode.el
@@ -1122,6 +1122,7 @@ leading double colon is not added."
                       "hash"
                       "parenthesized_statements"
                       "if"
+                      "unless"
                       "case"
                       "when"
                       "block"
diff --git a/lisp/userlock.el b/lisp/userlock.el
index 61f061d3e54..562bc0a0a9f 100644
--- a/lisp/userlock.el
+++ b/lisp/userlock.el
@@ -206,11 +206,12 @@ file, then make the change again."))
 ;;;###autoload
 (defun userlock--handle-unlock-error (error)
   "Report an ERROR that occurred while unlocking a file."
-  (display-warning
-   '(unlock-file)
-   ;; There is no need to explain that this is an unlock error because
-   ;; ERROR is a `file-error' condition, which explains this.
-   (message "%s, ignored" (error-message-string error))
-   :warning))
+  (when create-lockfiles
+    (display-warning
+     '(unlock-file)
+     ;; There is no need to explain that this is an unlock error because
+     ;; ERROR is a `file-error' condition, which explains this.
+     (message "%s, ignored" (error-message-string error))
+     :warning)))
 
 ;;; userlock.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]