diff options
| author | Richard M. Stallman | 1995-10-20 15:22:56 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-10-20 15:22:56 +0000 |
| commit | 6dfa1d83fd3c647784d41c7561848daec5ddb29a (patch) | |
| tree | a5650e53be70c164ea62fd45fbbfc1f554fa6159 | |
| parent | 7badea30363cb3c0ee83f83ab1ab53860db61146 (diff) | |
| download | emacs-6dfa1d83fd3c647784d41c7561848daec5ddb29a.tar.gz emacs-6dfa1d83fd3c647784d41c7561848daec5ddb29a.zip | |
(add-log-current-defun): Handle `private', `public' in C++ class definitions.
| -rw-r--r-- | lisp/add-log.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el index 41ada9f91bb..48a72a9a3ec 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el | |||
| @@ -444,6 +444,14 @@ Has a preference of looking backwards." | |||
| 444 | ;; precede the name. | 444 | ;; precede the name. |
| 445 | (setq middle (point)) | 445 | (setq middle (point)) |
| 446 | (forward-word -1) | 446 | (forward-word -1) |
| 447 | ;; Ignore these subparts of a class decl | ||
| 448 | ;; and move back to the class name itself. | ||
| 449 | (while (looking-at "public \\|private ") | ||
| 450 | (skip-chars-backward " \t:") | ||
| 451 | (setq end (point)) | ||
| 452 | (backward-sexp 1) | ||
| 453 | (setq middle (point)) | ||
| 454 | (forward-word -1)) | ||
| 447 | (and (bolp) | 455 | (and (bolp) |
| 448 | (looking-at "struct \\|union \\|class ") | 456 | (looking-at "struct \\|union \\|class ") |
| 449 | (setq middle (point))) | 457 | (setq middle (point))) |