diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-10-05 20:28:54 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-10-05 20:28:54 +0000 |
commit | 5bfbeb501d13f9a0ac7dd2bef2bed49ed02fd7b5 (patch) | |
tree | 2d6df2fd7d7482018071f45017f7d793319a3607 /lisp/add-log.el | |
parent | 7327e65374f50f6da4ac28708ac3fb4ece234efe (diff) | |
download | emacs-5bfbeb501d13f9a0ac7dd2bef2bed49ed02fd7b5.tar.gz |
(add-log-current-defun): Handle Perl specially.
Diffstat (limited to 'lisp/add-log.el')
-rw-r--r-- | lisp/add-log.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el index 2c7af2d896c..faa46cc3c9d 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -289,7 +289,7 @@ Prefix arg means justify as well." "Return name of function definition point is in, or nil. Understands C, Lisp, LaTeX (\"functions\" are chapters, sections, ...), -Texinfo (@node titles), and Fortran. +Texinfo (@node titles), Perl, and Fortran. Other modes are handled by a heuristic that looks in the 10K before point for uppercase headings starting in the first column or @@ -423,6 +423,10 @@ Has a preference of looking backwards." (if (re-search-backward "^@node[ \t]+\\([^,]+\\)," nil t) (buffer-substring (match-beginning 1) (match-end 1)))) + ((eq major-mode 'perl-mode) + (if (re-search-backward "^sub[ \t]+\\([^ \t\n]+\\)" nil t) + (buffer-substring (match-beginning 1) + (match-end 1)))) ((eq major-mode 'fortran-mode) ;; must be inside function body for this to work (beginning-of-fortran-subprogram) |