diff options
| author | Po Lu | 2023-05-23 08:46:40 +0800 |
|---|---|---|
| committer | Po Lu | 2023-05-23 08:46:40 +0800 |
| commit | fb8d87e18d5540705761df9f3f18a5a103bca073 (patch) | |
| tree | e469ceb0046e3f8b039bf45ce55c0d358fbd4f7e | |
| parent | 6dc9a3eeb755b5b0047b39f2bd7ebdefb10a1dc4 (diff) | |
| parent | d4ff1d74209e97730c52ddd50c4d643c79087a33 (diff) | |
| download | emacs-fb8d87e18d5540705761df9f3f18a5a103bca073.tar.gz emacs-fb8d87e18d5540705761df9f3f18a5a103bca073.zip | |
Merge remote-tracking branch 'origin/master' into feature/android
| -rw-r--r-- | lisp/net/tramp-fuse.el | 7 | ||||
| -rw-r--r-- | lisp/vc/vc-hg.el | 25 | ||||
| -rw-r--r-- | src/syntax.c | 20 | ||||
| -rw-r--r-- | test/lisp/filenotify-tests.el | 14 |
4 files changed, 48 insertions, 18 deletions
diff --git a/lisp/net/tramp-fuse.el b/lisp/net/tramp-fuse.el index 8112e564a2c..5c0bb8e8d96 100644 --- a/lisp/net/tramp-fuse.el +++ b/lisp/net/tramp-fuse.el | |||
| @@ -141,7 +141,7 @@ | |||
| 141 | 141 | ||
| 142 | (defun tramp-fuse-mount-point (vec) | 142 | (defun tramp-fuse-mount-point (vec) |
| 143 | "Return local mount point of VEC." | 143 | "Return local mount point of VEC." |
| 144 | (or (tramp-get-connection-property vec "mount-point") | 144 | (or (tramp-get-file-property vec "/" "mount-point") |
| 145 | (expand-file-name | 145 | (expand-file-name |
| 146 | (concat | 146 | (concat |
| 147 | tramp-temp-name-prefix | 147 | tramp-temp-name-prefix |
| @@ -173,8 +173,11 @@ It has the same meaning as `remote-file-name-inhibit-cache'.") | |||
| 173 | (tramp-set-file-property | 173 | (tramp-set-file-property |
| 174 | vec "/" "mounted" | 174 | vec "/" "mounted" |
| 175 | (when (string-match | 175 | (when (string-match |
| 176 | (rx bol (group (literal (tramp-fuse-mount-spec vec))) blank) | 176 | (rx bol (group (literal (tramp-fuse-mount-spec vec))) |
| 177 | " on " (group (+ (not blank))) blank) | ||
| 177 | mount) | 178 | mount) |
| 179 | (tramp-set-file-property | ||
| 180 | vec "/" "mount-point" (match-string 2 mount)) | ||
| 178 | (match-string 1 mount))))))) | 181 | (match-string 1 mount))))))) |
| 179 | 182 | ||
| 180 | (defun tramp-fuse-get-fusermount () | 183 | (defun tramp-fuse-get-fusermount () |
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 78480fd8062..182d76882bb 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el | |||
| @@ -1372,17 +1372,28 @@ REV is the revision to check out into WORKFILE." | |||
| 1372 | ;; Follows vc-exec-after. | 1372 | ;; Follows vc-exec-after. |
| 1373 | (declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) | 1373 | (declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) |
| 1374 | 1374 | ||
| 1375 | (defvar vc-hg--program-version nil) | ||
| 1376 | |||
| 1377 | (defun vc-hg--program-version () | ||
| 1378 | (or vc-hg--program-version | ||
| 1379 | (setq vc-hg--program-version | ||
| 1380 | (with-temp-buffer | ||
| 1381 | (condition-case _ (vc-hg-command t 0 nil "version") | ||
| 1382 | (error "0") | ||
| 1383 | (:success | ||
| 1384 | (goto-char (point-min)) | ||
| 1385 | (re-search-forward "Mercurial Distributed SCM (version \\([0-9][0-9.]+\\)") | ||
| 1386 | (string-trim-right (match-string 1) "\\."))))))) | ||
| 1387 | |||
| 1375 | (defun vc-hg-dir-status-files (dir files update-function) | 1388 | (defun vc-hg-dir-status-files (dir files update-function) |
| 1376 | ;; XXX: We can't pass DIR directly to 'hg status' because that | 1389 | ;; XXX: We can't pass DIR directly to 'hg status' because that |
| 1377 | ;; returns all ignored files if FILES is non-nil (bug#22481). | 1390 | ;; returns all ignored files if FILES is non-nil (bug#22481). |
| 1378 | (let ((default-directory dir)) | 1391 | (let ((default-directory dir)) |
| 1379 | ;; TODO: Use "--config 'status.relative=1'" instead of "re:" | 1392 | (apply #'vc-hg-command (current-buffer) 'async files |
| 1380 | ;; when we're allowed to depend on Mercurial 4.2+ | 1393 | "status" (concat "-mardu" (if files "i")) "-C" |
| 1381 | ;; (it's a bit faster). | 1394 | (if (version<= "4.2" (vc-hg--program-version)) |
| 1382 | (vc-hg-command (current-buffer) 'async files | 1395 | '("--config" "commands.status.relative=1") |
| 1383 | "status" "re:" "-I" "." | 1396 | '("re:" "-I" ".")))) |
| 1384 | (concat "-mardu" (if files "i")) | ||
| 1385 | "-C")) | ||
| 1386 | (vc-run-delayed | 1397 | (vc-run-delayed |
| 1387 | (vc-hg-after-dir-status update-function))) | 1398 | (vc-hg-after-dir-status update-function))) |
| 1388 | 1399 | ||
diff --git a/src/syntax.c b/src/syntax.c index 839ab36bb2f..0cac923bba7 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -2323,13 +2323,16 @@ forw_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop, | |||
| 2323 | return 0; | 2323 | return 0; |
| 2324 | } | 2324 | } |
| 2325 | c = FETCH_CHAR_AS_MULTIBYTE (from_byte); | 2325 | c = FETCH_CHAR_AS_MULTIBYTE (from_byte); |
| 2326 | prev_syntax = syntax; | ||
| 2326 | syntax = SYNTAX_WITH_FLAGS (c); | 2327 | syntax = SYNTAX_WITH_FLAGS (c); |
| 2327 | code = syntax & 0xff; | 2328 | code = syntax & 0xff; |
| 2328 | if (code == Sendcomment | 2329 | if (code == Sendcomment |
| 2329 | && SYNTAX_FLAGS_COMMENT_STYLE (syntax, 0) == style | 2330 | && SYNTAX_FLAGS_COMMENT_STYLE (syntax, 0) == style |
| 2330 | && (SYNTAX_FLAGS_COMMENT_NESTED (syntax) ? | 2331 | && (SYNTAX_FLAGS_COMMENT_NESTED (syntax) ? |
| 2331 | (nesting > 0 && --nesting == 0) : nesting < 0) | 2332 | (nesting > 0 && --nesting == 0) : nesting < 0) |
| 2332 | && !(comment_end_can_be_escaped && char_quoted (from, from_byte))) | 2333 | && !(comment_end_can_be_escaped |
| 2334 | && ((prev_syntax & 0xff) == Sescape | ||
| 2335 | || (prev_syntax & 0xff) == Scharquote))) | ||
| 2333 | /* We have encountered a comment end of the same style | 2336 | /* We have encountered a comment end of the same style |
| 2334 | as the comment sequence which began this comment | 2337 | as the comment sequence which began this comment |
| 2335 | section. */ | 2338 | section. */ |
| @@ -2353,7 +2356,11 @@ forw_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop, | |||
| 2353 | inc_both (&from, &from_byte); | 2356 | inc_both (&from, &from_byte); |
| 2354 | UPDATE_SYNTAX_TABLE_FORWARD (from); | 2357 | UPDATE_SYNTAX_TABLE_FORWARD (from); |
| 2355 | if (from == stop) continue; /* Failure */ | 2358 | if (from == stop) continue; /* Failure */ |
| 2356 | } | 2359 | c = FETCH_CHAR_AS_MULTIBYTE (from_byte); |
| 2360 | prev_syntax = syntax; | ||
| 2361 | syntax = Smax; | ||
| 2362 | code = syntax; | ||
| 2363 | } | ||
| 2357 | inc_both (&from, &from_byte); | 2364 | inc_both (&from, &from_byte); |
| 2358 | UPDATE_SYNTAX_TABLE_FORWARD (from); | 2365 | UPDATE_SYNTAX_TABLE_FORWARD (from); |
| 2359 | 2366 | ||
| @@ -3334,7 +3341,14 @@ do { prev_from = from; \ | |||
| 3334 | are invalid now. Luckily, the `done' doesn't use them | 3341 | are invalid now. Luckily, the `done' doesn't use them |
| 3335 | and the INC_FROM sets them to a sane value without | 3342 | and the INC_FROM sets them to a sane value without |
| 3336 | looking at them. */ | 3343 | looking at them. */ |
| 3337 | if (!found) goto done; | 3344 | if (!found) |
| 3345 | { | ||
| 3346 | if ((prev_from_syntax & 0xff) == Sescape | ||
| 3347 | || (prev_from_syntax & 0xff) == Scharquote) | ||
| 3348 | goto endquoted; | ||
| 3349 | else | ||
| 3350 | goto done; | ||
| 3351 | } | ||
| 3338 | INC_FROM; | 3352 | INC_FROM; |
| 3339 | state->incomment = 0; | 3353 | state->incomment = 0; |
| 3340 | state->comstyle = 0; /* reset the comment style */ | 3354 | state->comstyle = 0; /* reset the comment style */ |
diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el index 97b7c46c689..0873910ddf9 100644 --- a/test/lisp/filenotify-tests.el +++ b/test/lisp/filenotify-tests.el | |||
| @@ -939,10 +939,13 @@ delivered." | |||
| 939 | :tags '(:expensive-test) | 939 | :tags '(:expensive-test) |
| 940 | (skip-unless (file-notify--test-local-enabled)) | 940 | (skip-unless (file-notify--test-local-enabled)) |
| 941 | 941 | ||
| 942 | ;; `auto-revert-buffers' runs every 5". And we must wait, until the | 942 | ;; Run with shortened `auto-revert-interval' for a faster test. |
| 943 | ;; file has been reverted. | 943 | (let* ((auto-revert-interval 1) |
| 944 | (let ((timeout (if (file-remote-p temporary-file-directory) 60 10)) | 944 | (timeout (if (file-remote-p temporary-file-directory) |
| 945 | buf) | 945 | 60 ; FIXME: can this be shortened? |
| 946 | (* auto-revert-interval 2.5))) | ||
| 947 | buf) | ||
| 948 | (auto-revert-set-timer) | ||
| 946 | (unwind-protect | 949 | (unwind-protect |
| 947 | (progn | 950 | (progn |
| 948 | ;; In the remote case, `vc-refresh-state' returns undesired | 951 | ;; In the remote case, `vc-refresh-state' returns undesired |
| @@ -960,10 +963,9 @@ delivered." | |||
| 960 | (sleep-for 1) | 963 | (sleep-for 1) |
| 961 | (auto-revert-mode 1) | 964 | (auto-revert-mode 1) |
| 962 | 965 | ||
| 963 | ;; `auto-revert-buffers' runs every 5". | ||
| 964 | (with-timeout (timeout (ignore)) | 966 | (with-timeout (timeout (ignore)) |
| 965 | (while (null auto-revert-notify-watch-descriptor) | 967 | (while (null auto-revert-notify-watch-descriptor) |
| 966 | (sleep-for 1))) | 968 | (sleep-for 0.2))) |
| 967 | 969 | ||
| 968 | ;; `file-notify--test-monitor' needs to know | 970 | ;; `file-notify--test-monitor' needs to know |
| 969 | ;; `file-notify--test-desc' in order to compute proper | 971 | ;; `file-notify--test-desc' in order to compute proper |