From: Stefan Kangas Date: Fri, 5 Jul 2019 18:53:53 +0000 (+0200) Subject: Fix looking up functions like "-e" in cperl-mode X-Git-Tag: emacs-27.0.90~1962 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=70225ecae1fc3069a59384f2ff3576bbba4e1037;p=emacs.git 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) --- 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