diff options
| author | Richard M. Stallman | 1994-10-05 20:28:54 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-10-05 20:28:54 +0000 |
| commit | 64bd2d516537f79e565269c23b91a62036690cb4 (patch) | |
| tree | 99784efde34ba65a6846b79dba2cfdab8cd8a01c | |
| parent | f793dc6c1e7dfb38798149d609e7b6eaba65585f (diff) | |
| download | emacs-64bd2d516537f79e565269c23b91a62036690cb4.tar.gz emacs-64bd2d516537f79e565269c23b91a62036690cb4.zip | |
(add-log-current-defun): Handle Perl specially.
| -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." | |||
| 289 | "Return name of function definition point is in, or nil. | 289 | "Return name of function definition point is in, or nil. |
| 290 | 290 | ||
| 291 | Understands C, Lisp, LaTeX (\"functions\" are chapters, sections, ...), | 291 | Understands C, Lisp, LaTeX (\"functions\" are chapters, sections, ...), |
| 292 | Texinfo (@node titles), and Fortran. | 292 | Texinfo (@node titles), Perl, and Fortran. |
| 293 | 293 | ||
| 294 | Other modes are handled by a heuristic that looks in the 10K before | 294 | Other modes are handled by a heuristic that looks in the 10K before |
| 295 | point for uppercase headings starting in the first column or | 295 | point 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) |