mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Better 'project-buffer' completion category defaults in Emacs <= 30
* lisp/progmodes/project.el: Fall back to adding 'project-buffer' to 'completion-category-defaults' if 'define-completion-category' is not available (bug#79409).
This commit is contained in:
parent
0e9cee2bf5
commit
a060bdec82
1 changed files with 5 additions and 3 deletions
|
|
@ -1718,9 +1718,11 @@ Return non-nil if PROJECT is not a remote project."
|
|||
(t
|
||||
(complete-with-action action buffers string pred)))))
|
||||
|
||||
(when (fboundp 'define-completion-category) ; Introduced in Emacs 31.
|
||||
(define-completion-category 'project-buffer '(buffer)
|
||||
"Completion category for buffers in a given project."))
|
||||
(if (fboundp 'define-completion-category) ; Introduced in Emacs 31.
|
||||
(define-completion-category 'project-buffer '(buffer)
|
||||
"Completion category for buffers in a given project.")
|
||||
(add-to-list 'completion-category-defaults
|
||||
'(project-buffer (styles . (basic substring)))))
|
||||
|
||||
(defun project--read-project-buffer ()
|
||||
(let* ((pr (project-current t))
|
||||
|
|
|
|||
Loading…
Reference in a new issue