diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-05-04 21:58:34 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-05-04 21:58:34 +0000 |
commit | cbe8cf2a450914c6d36babe4ee87a2cc161d0019 (patch) | |
tree | 4da47c65333bd46a3e49f60c91eb7e3504d55451 /lisp/progmodes/perl-mode.el | |
parent | 4e0299e5780136c89f9286cbb101e2208b8eb5fe (diff) | |
download | emacs-cbe8cf2a450914c6d36babe4ee87a2cc161d0019.tar.gz emacs-cbe8cf2a450914c6d36babe4ee87a2cc161d0019.tar.bz2 emacs-cbe8cf2a450914c6d36babe4ee87a2cc161d0019.zip |
(perl-beginning-of-function): Skip anonymous subs.
Diffstat (limited to 'lisp/progmodes/perl-mode.el')
-rw-r--r-- | lisp/progmodes/perl-mode.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index e92bb1053a6..950e0cba06f 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -923,8 +923,9 @@ Returns new value of point in all cases." (or arg (setq arg 1)) (if (< arg 0) (forward-char 1)) (and (/= arg 0) - (re-search-backward "^\\s(\\|^\\s-*sub\\b[^{]+{\\|^\\s-*format\\b[^=]*=\\|^\\." - nil 'move arg) + (re-search-backward + "^\\s(\\|^\\s-*sub\\b[ \t\n]*\\_<[^{]+{\\|^\\s-*format\\b[^=]*=\\|^\\." + nil 'move arg) (goto-char (1- (match-end 0)))) (point)) |