Correct default regexp in 'package-menu-hide-package'

* lisp/emacs-lisp/package.el (package-menu-mode-menu): Correct default
regexp, so it only selects the package at point.
(Bug#39436)
This commit is contained in:
Pieter van Oostrum 2020-02-09 16:55:29 +01:00 committed by Eli Zaretskii
parent faada7ca42
commit 7448834f73

View file

@ -3194,7 +3194,8 @@ The default regexp will hide only the package whose name is at point."
(declare (interactive-only "change `package-hidden-regexps' instead."))
(let* ((name (when (derived-mode-p 'package-menu-mode)
(concat "\\`" (regexp-quote (symbol-name (package-desc-name
(tabulated-list-get-id)))))))
(tabulated-list-get-id))))
"\\'")))
(re (read-string "Hide packages matching regexp: " name)))
;; Test if it is valid.
(string-match re "")