From 70225ecae1fc3069a59384f2ff3576bbba4e1037 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 5 Jul 2019 20:53:53 +0200 Subject: [PATCH] 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) --- lisp/progmodes/cperl-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 1aa79817916..d5c404c7d2f 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -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 -- 2.39.2