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

This commit is contained in:
Po Lu 2023-06-15 08:25:45 +08:00
commit ca120044ac
2 changed files with 8 additions and 2 deletions

View file

@ -176,7 +176,9 @@ DOC is a string where \"FUNCTION\" and \"OLDFUN\" are expected.")
;; FIXME: Despite appearances, this is not faithful: SPEC and
;; (advice-eval-interactive-spec SPEC) will behave subtly differently w.r.t
;; command-history (and maybe a few other details).
(call-interactively `(lambda (&rest args) (interactive ,spec) args)))
(call-interactively
;; Sadly (lambda (&rest args) (interactive spec) args) doesn't work :-(
(cconv--interactive-helper (lambda (&rest args) args) spec)))
;; ((functionp spec) (funcall spec))
(t (eval spec))))

View file

@ -2395,7 +2395,11 @@ These include:
(prefix (unless (zerop base-size) (substring string 0 base-size)))
(base-prefix (buffer-substring (minibuffer--completion-prompt-end)
(+ start base-size)))
(base-suffix (buffer-substring (point) (point-max)))
(base-suffix
(if (eq (alist-get 'category (cdr md)) 'file)
(buffer-substring (save-excursion (or (search-forward "/" nil t) (point-max)))
(point-max))
""))
(all-md (completion--metadata (buffer-substring-no-properties
start (point))
base-size md