aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-10-05 20:28:54 +0000
committerRichard M. Stallman1994-10-05 20:28:54 +0000
commit64bd2d516537f79e565269c23b91a62036690cb4 (patch)
tree99784efde34ba65a6846b79dba2cfdab8cd8a01c
parentf793dc6c1e7dfb38798149d609e7b6eaba65585f (diff)
downloademacs-64bd2d516537f79e565269c23b91a62036690cb4.tar.gz
emacs-64bd2d516537f79e565269c23b91a62036690cb4.zip
(add-log-current-defun): Handle Perl specially.
-rw-r--r--lisp/add-log.el6
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."
289 "Return name of function definition point is in, or nil. 289 "Return name of function definition point is in, or nil.
290 290
291Understands C, Lisp, LaTeX (\"functions\" are chapters, sections, ...), 291Understands C, Lisp, LaTeX (\"functions\" are chapters, sections, ...),
292Texinfo (@node titles), and Fortran. 292Texinfo (@node titles), Perl, and Fortran.
293 293
294Other modes are handled by a heuristic that looks in the 10K before 294Other modes are handled by a heuristic that looks in the 10K before
295point for uppercase headings starting in the first column or 295point for uppercase headings starting in the first column or
@@ -423,6 +423,10 @@ Has a preference of looking backwards."
423 (if (re-search-backward "^@node[ \t]+\\([^,]+\\)," nil t) 423 (if (re-search-backward "^@node[ \t]+\\([^,]+\\)," nil t)
424 (buffer-substring (match-beginning 1) 424 (buffer-substring (match-beginning 1)
425 (match-end 1)))) 425 (match-end 1))))
426 ((eq major-mode 'perl-mode)
427 (if (re-search-backward "^sub[ \t]+\\([^ \t\n]+\\)" nil t)
428 (buffer-substring (match-beginning 1)
429 (match-end 1))))
426 ((eq major-mode 'fortran-mode) 430 ((eq major-mode 'fortran-mode)
427 ;; must be inside function body for this to work 431 ;; must be inside function body for this to work
428 (beginning-of-fortran-subprogram) 432 (beginning-of-fortran-subprogram)