Fix looking up functions like "-e" in cperl-mode

* lisp/progmodes/cperl-mode.el (cperl-perldoc): Handle functions with
leading dash (e.g. "-f"). (Bug#6013)
This commit is contained in:
Stefan Kangas 2019-07-05 20:53:53 +02:00 committed by Eli Zaretskii
parent 3b3e7da601
commit 70225ecae1

View file

@ -8382,7 +8382,7 @@ the appropriate statement modifier."
(require 'man)
(let* ((case-fold-search nil)
(is-func (and
(string-match "^[a-z]+$" word)
(string-match "^\\(-[A-Za-z]\\|[a-z]+\\)$" word)
(string-match (concat "^" word "\\>")
(documentation-property
'cperl-short-docs