]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix looking up functions like "-e" in cperl-mode
authorStefan Kangas <stefankangas@gmail.com>
Fri, 5 Jul 2019 18:53:53 +0000 (20:53 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 13 Jul 2019 07:39:42 +0000 (10:39 +0300)
* lisp/progmodes/cperl-mode.el (cperl-perldoc): Handle functions with
leading dash (e.g. "-f"). (Bug#6013)

lisp/progmodes/cperl-mode.el

index 1aa79817916c370b83f60b7a6fc0663eaa80ff75..d5c404c7d2f0e57d87a66d3fdb7782d4c280ac7c 100644 (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