From 0025bfde027cbcd2d1fee6f0b9429a84c4770ac2 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 254269ddf1..6970b5ec84 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -8382,7 +8382,7 @@ cperl-perldoc (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.11.0