1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-19 18:13:55 +00:00

* lisp/minibuffer.el (completion-file-name-table): Complete user names.

This commit is contained in:
Stefan Monnier 2012-04-20 15:56:59 -04:00
parent 61bb069e8c
commit ed571ccb1d
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuffer.el (completion-file-name-table): Complete user names.
2012-04-20 Leo Liu <sdl.web@gmail.com>
* font-lock.el (lisp-font-lock-keywords-2): Add pcase, pcase-let

View File

@ -1817,6 +1817,12 @@ same as `substitute-in-file-name'."
(condition-case nil
(cond
((eq action 'metadata) '(metadata (category . file)))
((string-match-p "\\`~[^/\\]*\\'" string)
(completion-table-with-context "~"
(mapcar (lambda (u) (concat u "/"))
(system-users))
(substring string 1)
pred action))
((eq (car-safe action) 'boundaries)
(let ((start (length (file-name-directory string)))
(end (string-match-p "/" (cdr action))))