changeset 9347:1a69634e3477

(add-log-current-defun): Handle Perl specially.
author Richard M. Stallman <rms@gnu.org>
date Wed, 05 Oct 1994 20:28:54 +0000
parents fec27dfc0684
children c4ccb2502ebf
files lisp/add-log.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/add-log.el	Wed Oct 05 09:33:33 1994 +0000
+++ b/lisp/add-log.el	Wed Oct 05 20:28:54 1994 +0000
@@ -289,7 +289,7 @@
   "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 @@
 		 (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)