(vc-update-change-log): Use add-log-full-name and
[bpt/emacs.git] / lisp / add-log.el
CommitLineData
84fc2cfa
ER
1;;; add-log.el --- change log maintenance commands for Emacs
2
e332f80b 3;; Copyright (C) 1985, 1986, 1988, 1993, 1994 Free Software Foundation, Inc.
84fc2cfa 4
e9571d2a
ER
5;; Keywords: maint
6
84fc2cfa
ER
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software; you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
fd7fa35a 11;; the Free Software Foundation; either version 2, or (at your option)
84fc2cfa
ER
12;; any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
b578f267
EN
20;; along with GNU Emacs; see the file COPYING. If not, write to the
21;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22;; Boston, MA 02111-1307, USA.
84fc2cfa 23
e41b2db1
ER
24;;; Commentary:
25
26;; This facility is documented in the Emacs Manual.
27
fd7fa35a 28;;; Code:
84fc2cfa 29
84fc2cfa
ER
30(defvar change-log-default-name nil
31 "*Name of a change log file for \\[add-change-log-entry].")
32
6258d3af
RM
33(defvar add-log-current-defun-function nil
34 "\
35*If non-nil, function to guess name of current function from surrounding text.
36\\[add-change-log-entry] calls this function (if nil, `add-log-current-defun'
37instead) with no arguments. It returns a string or nil if it cannot guess.")
38
59ac2ce6 39(defvar add-log-full-name nil
02ec1592
BF
40 "*Full name of user, for inclusion in ChangeLog daily headers.
41This defaults to the value returned by the `user-full-name' function.")
42
59ac2ce6 43(defvar add-log-mailing-address nil
02ec1592 44 "*Electronic mail address of user, for inclusion in ChangeLog daily headers.
fb38ca86 45This defaults to the value of `user-mail-address'.")
02ec1592 46
5f562719 47(defvar change-log-font-lock-keywords
b9e5d99e 48 '(("^[SMTWF].+" . font-lock-function-name-face) ; Date line.
5f562719
RS
49 ("^\t\\* \\([^ :\n]+\\)" 1 font-lock-comment-face) ; File name.
50 ("\(\\([^)\n]+\\)\)" 1 font-lock-keyword-face)) ; Function name.
51 "Additional expressions to highlight in Change Log mode.")
52
dab0cb95
RS
53(defvar change-log-mode-map nil
54 "Keymap for Change Log major mode.")
55(if change-log-mode-map
56 nil
57 (setq change-log-mode-map (make-sparse-keymap))
58 (define-key change-log-mode-map "\M-q" 'change-log-fill-paragraph))
59
84fc2cfa
ER
60(defun change-log-name ()
61 (or change-log-default-name
8afc29f0
RS
62 (if (eq system-type 'vax-vms)
63 "$CHANGE_LOG$.TXT"
3912227e 64 (if (or (eq system-type 'ms-dos) (eq system-type 'windows-nt))
5675b1e4 65 "changelo"
8afc29f0 66 "ChangeLog"))))
84fc2cfa 67
287d149f 68;;;###autoload
84fc2cfa
ER
69(defun prompt-for-change-log-name ()
70 "Prompt for a change log name."
117aaf60
KH
71 (let* ((default (change-log-name))
72 (name (expand-file-name
73 (read-file-name (format "Log file (default %s): " default)
74 nil default))))
75 ;; Handle something that is syntactically a directory name.
76 ;; Look for ChangeLog or whatever in that directory.
77 (if (string= (file-name-nondirectory name) "")
78 (expand-file-name (file-name-nondirectory default)
79 name)
80 ;; Handle specifying a file that is a directory.
81 (if (file-directory-p name)
82 (expand-file-name (file-name-nondirectory default)
83 (file-name-as-directory name))
84 name))))
84fc2cfa 85
45a13f0d
RM
86;;;###autoload
87(defun find-change-log (&optional file-name)
88 "Find a change log file for \\[add-change-log-entry] and return the name.
a82e2ed5
RS
89
90Optional arg FILE-NAME specifies the file to use.
de98fcaf
RS
91If FILE-NAME is nil, use the value of `change-log-default-name'.
92If 'change-log-default-name' is nil, behave as though it were 'ChangeLog'
93\(or whatever we use on this operating system).
94
95If 'change-log-default-name' contains a leading directory component, then
96simply find it in the current directory. Otherwise, search in the current
97directory and its successive parents for a file so named.
45a13f0d
RM
98
99Once a file is found, `change-log-default-name' is set locally in the
100current buffer to the complete file name."
a82e2ed5
RS
101 ;; If user specified a file name or if this buffer knows which one to use,
102 ;; just use that.
45a13f0d 103 (or file-name
de98fcaf
RS
104 (setq file-name (and change-log-default-name
105 (file-name-directory change-log-default-name)
106 change-log-default-name))
a82e2ed5
RS
107 (progn
108 ;; Chase links in the source file
109 ;; and use the change log in the dir where it points.
110 (setq file-name (or (and buffer-file-name
111 (file-name-directory
112 (file-chase-links buffer-file-name)))
113 default-directory))
114 (if (file-directory-p file-name)
115 (setq file-name (expand-file-name (change-log-name) file-name)))
116 ;; Chase links before visiting the file.
117 ;; This makes it easier to use a single change log file
118 ;; for several related directories.
119 (setq file-name (file-chase-links file-name))
120 (setq file-name (expand-file-name file-name))
121 ;; Move up in the dir hierarchy till we find a change log file.
122 (let ((file1 file-name)
123 parent-dir)
124 (while (and (not (or (get-file-buffer file1) (file-exists-p file1)))
125 (progn (setq parent-dir
126 (file-name-directory
127 (directory-file-name
128 (file-name-directory file1))))
129 ;; Give up if we are already at the root dir.
130 (not (string= (file-name-directory file1)
131 parent-dir))))
132 ;; Move up to the parent dir and try again.
133 (setq file1 (expand-file-name
134 (file-name-nondirectory (change-log-name))
135 parent-dir)))
136 ;; If we found a change log in a parent, use that.
137 (if (or (get-file-buffer file1) (file-exists-p file1))
138 (setq file-name file1)))))
139 ;; Make a local variable in this buffer so we needn't search again.
140 (set (make-local-variable 'change-log-default-name) file-name)
141 file-name)
45a13f0d 142
84fc2cfa 143;;;###autoload
287d149f 144(defun add-change-log-entry (&optional whoami file-name other-window new-entry)
84fc2cfa
ER
145 "Find change log file and add an entry for today.
146Optional arg (interactive prefix) non-nil means prompt for user name and site.
147Second arg is file name of change log. If nil, uses `change-log-default-name'.
287d149f
RM
148Third arg OTHER-WINDOW non-nil means visit in other window.
149Fourth arg NEW-ENTRY non-nil means always create a new entry at the front;
150never append to an existing entry."
84fc2cfa
ER
151 (interactive (list current-prefix-arg
152 (prompt-for-change-log-name)))
550d8777
RS
153 (or add-log-full-name
154 (setq add-log-full-name (user-full-name)))
155 (or add-log-mailing-address
156 (setq add-log-mailing-address user-mail-address))
02ec1592
BF
157 (if whoami
158 (progn
159 (setq add-log-full-name (read-input "Full name: " add-log-full-name))
84fc2cfa
ER
160 ;; Note that some sites have room and phone number fields in
161 ;; full name which look silly when inserted. Rather than do
162 ;; anything about that here, let user give prefix argument so that
163 ;; s/he can edit the full name field in prompter if s/he wants.
02ec1592
BF
164 (setq add-log-mailing-address
165 (read-input "Mailing address: " add-log-mailing-address))))
166 (let ((defun (funcall (or add-log-current-defun-function
167 'add-log-current-defun)))
168 paragraph-end entry)
45a13f0d 169
3e1c918b 170 (setq file-name (expand-file-name (find-change-log file-name)))
82f4acaf
RM
171
172 ;; Set ENTRY to the file name to use in the new entry.
173 (and buffer-file-name
174 ;; Never want to add a change log entry for the ChangeLog file itself.
175 (not (string= buffer-file-name file-name))
176 (setq entry (if (string-match
177 (concat "^" (regexp-quote (file-name-directory
178 file-name)))
179 buffer-file-name)
180 (substring buffer-file-name (match-end 0))
181 (file-name-nondirectory buffer-file-name))))
182
84fc2cfa
ER
183 (if (and other-window (not (equal file-name buffer-file-name)))
184 (find-file-other-window file-name)
185 (find-file file-name))
675a998f
RS
186 (or (eq major-mode 'change-log-mode)
187 (change-log-mode))
84fc2cfa
ER
188 (undo-boundary)
189 (goto-char (point-min))
ec367ad6 190 (if (looking-at (concat (regexp-quote (substring (current-time-string)
82f4acaf 191 0 10))
02ec1592 192 ".* " (regexp-quote add-log-full-name)
4daaec5d 193 " <" (regexp-quote add-log-mailing-address)))
ec367ad6
RS
194 (forward-line 1)
195 (insert (current-time-string)
02ec1592 196 " " add-log-full-name
4daaec5d 197 " <" add-log-mailing-address ">\n\n"))
82f4acaf 198
74046d00 199 ;; Search only within the first paragraph.
716a781e
RS
200 (if (looking-at "\n*[^\n* \t]")
201 (skip-chars-forward "\n")
202 (forward-paragraph 1))
82f4acaf 203 (setq paragraph-end (point))
84fc2cfa 204 (goto-char (point-min))
82f4acaf 205
1832dbd1 206 ;; Now insert the new line for this entry.
82f4acaf
RM
207 (cond ((re-search-forward "^\\s *\\*\\s *$" paragraph-end t)
208 ;; Put this file name into the existing empty entry.
209 (if entry
210 (insert entry)))
287d149f 211 ((and (not new-entry)
e172f546
KH
212 (let (case-fold-search)
213 (re-search-forward
214 (concat (regexp-quote (concat "* " entry))
215 ;; Don't accept `foo.bar' when
216 ;; looking for `foo':
217 "\\(\\s \\|[(),:]\\)")
218 paragraph-end t)))
82f4acaf
RM
219 ;; Add to the existing entry for the same file.
220 (re-search-forward "^\\s *$\\|^\\s \\*")
e172f546
KH
221 (goto-char (match-beginning 0))
222 ;; Delete excess empty lines; make just 2.
09b389d0 223 (while (and (not (eobp)) (looking-at "^\\s *$"))
1832dbd1
RS
224 (delete-region (point) (save-excursion (forward-line 1) (point))))
225 (insert "\n\n")
226 (forward-line -2)
dd309224 227 (indent-relative-maybe))
21d7e080 228 (t
dd309224
RM
229 ;; Make a new entry.
230 (forward-line 1)
231 (while (looking-at "\\sW")
232 (forward-line 1))
09b389d0 233 (while (and (not (eobp)) (looking-at "^\\s *$"))
1832dbd1
RS
234 (delete-region (point) (save-excursion (forward-line 1) (point))))
235 (insert "\n\n\n")
236 (forward-line -2)
dd309224
RM
237 (indent-to left-margin)
238 (insert "* " (or entry ""))))
1832dbd1 239 ;; Now insert the function name, if we have one.
21d7e080
ER
240 ;; Point is at the entry for this file,
241 ;; either at the end of the line or at the first blank line.
242 (if defun
243 (progn
dd309224 244 ;; Make it easy to get rid of the function name.
21d7e080 245 (undo-boundary)
dd309224
RM
246 (insert (if (save-excursion
247 (beginning-of-line 1)
248 (looking-at "\\s *$"))
249 ""
250 " ")
251 "(" defun "): "))
1832dbd1 252 ;; No function name, so put in a colon unless we have just a star.
dd309224
RM
253 (if (not (save-excursion
254 (beginning-of-line 1)
255 (looking-at "\\s *\\(\\*\\s *\\)?$")))
1832dbd1 256 (insert ": ")))))
84fc2cfa 257
84fc2cfa
ER
258;;;###autoload
259(defun add-change-log-entry-other-window (&optional whoami file-name)
260 "Find change log file in other window and add an entry for today.
6258d3af
RM
261Optional arg (interactive prefix) non-nil means prompt for user name and site.
262Second arg is file name of change log. \
263If nil, uses `change-log-default-name'."
84fc2cfa
ER
264 (interactive (if current-prefix-arg
265 (list current-prefix-arg
266 (prompt-for-change-log-name))))
267 (add-change-log-entry whoami file-name t))
82f4acaf 268;;;###autoload (define-key ctl-x-4-map "a" 'add-change-log-entry-other-window)
84fc2cfa 269
1da56800 270;;;###autoload
21d7e080 271(defun change-log-mode ()
eb8c3be9 272 "Major mode for editing change logs; like Indented Text Mode.
09b389d0 273Prevents numeric backups and sets `left-margin' to 8 and `fill-column' to 74.
5516387c
RM
274New log entries are usually made with \\[add-change-log-entry] or \\[add-change-log-entry-other-window].
275Each entry behaves as a paragraph, and the entries for one day as a page.
276Runs `change-log-mode-hook'."
21d7e080
ER
277 (interactive)
278 (kill-all-local-variables)
279 (indented-text-mode)
82f4acaf
RM
280 (setq major-mode 'change-log-mode
281 mode-name "Change Log"
282 left-margin 8
4f675a8c
KH
283 fill-column 74
284 indent-tabs-mode t
285 tab-width 8)
287d149f 286 (use-local-map change-log-mode-map)
21d7e080 287 ;; Let each entry behave as one paragraph:
14ee1953
RS
288 ;; We really do want "^" in paragraph-start below: it is only the lines that
289 ;; begin at column 0 (despite the left-margin of 8) that we are looking for.
290 (set (make-local-variable 'paragraph-start) "\\s *$\\|\f\\|^\\sw")
291 (set (make-local-variable 'paragraph-separate) "\\s *$\\|\f\\|^\\sw")
21d7e080 292 ;; Let all entries for one day behave as one page.
2c91c85c
RS
293 ;; Match null string on the date-line so that the date-line
294 ;; is grouped with what follows.
964141f2 295 (set (make-local-variable 'page-delimiter) "^\\<\\|^\f")
dd309224
RM
296 (set (make-local-variable 'version-control) 'never)
297 (set (make-local-variable 'adaptive-fill-regexp) "\\s *")
4b286eca
SM
298 (set (make-local-variable 'font-lock-defaults)
299 '(change-log-font-lock-keywords t))
21d7e080
ER
300 (run-hooks 'change-log-mode-hook))
301
287d149f
RM
302;; It might be nice to have a general feature to replace this. The idea I
303;; have is a variable giving a regexp matching text which should not be
304;; moved from bol by filling. change-log-mode would set this to "^\\s *\\s(".
305;; But I don't feel up to implementing that today.
306(defun change-log-fill-paragraph (&optional justify)
307 "Fill the paragraph, but preserve open parentheses at beginning of lines.
308Prefix arg means justify as well."
309 (interactive "P")
14ee1953
RS
310 (let ((end (save-excursion (forward-paragraph) (point)))
311 (beg (save-excursion (backward-paragraph)(point)))
312 (paragraph-start (concat paragraph-start "\\|\\s *\\s(")))
313 (fill-region beg end justify)))
287d149f 314\f
21d7e080 315(defvar add-log-current-defun-header-regexp
26add1bf 316 "^\\([A-Z][A-Z_ ]*[A-Z_]\\|[-_a-zA-Z]+\\)[ \t]*[:=]"
21d7e080
ER
317 "*Heuristic regexp used by `add-log-current-defun' for unknown major modes.")
318
e332f80b 319;;;###autoload
21d7e080
ER
320(defun add-log-current-defun ()
321 "Return name of function definition point is in, or nil.
322
63314951 323Understands C, Lisp, LaTeX (\"functions\" are chapters, sections, ...),
64bd2d51 324Texinfo (@node titles), Perl, and Fortran.
21d7e080
ER
325
326Other modes are handled by a heuristic that looks in the 10K before
327point for uppercase headings starting in the first column or
328identifiers followed by `:' or `=', see variable
329`add-log-current-defun-header-regexp'.
330
331Has a preference of looking backwards."
2cc0b765
RS
332 (condition-case nil
333 (save-excursion
334 (let ((location (point)))
3fec4c1b
RS
335 (cond ((memq major-mode '(emacs-lisp-mode lisp-mode scheme-mode
336 lisp-interaction-mode))
a0151877 337 ;; If we are now precisely at the beginning of a defun,
2cc0b765
RS
338 ;; make sure beginning-of-defun finds that one
339 ;; rather than the previous one.
340 (or (eobp) (forward-char 1))
341 (beginning-of-defun)
342 ;; Make sure we are really inside the defun found, not after it.
947b2743
RS
343 (if (and (looking-at "\\s(")
344 (progn (end-of-defun)
2cc0b765
RS
345 (< location (point)))
346 (progn (forward-sexp -1)
347 (>= location (point))))
348 (progn
0e933219
JB
349 (if (looking-at "\\s(")
350 (forward-char 1))
351 (forward-sexp 1)
a0151877 352 (skip-chars-forward " '")
2cc0b765
RS
353 (buffer-substring (point)
354 (progn (forward-sexp 1) (point))))))
32e986d4 355 ((and (memq major-mode '(c-mode c++-mode c++-c-mode objc-mode))
2cc0b765
RS
356 (save-excursion (beginning-of-line)
357 ;; Use eq instead of = here to avoid
358 ;; error when at bob and char-after
359 ;; returns nil.
360 (while (eq (char-after (- (point) 2)) ?\\)
36e6631c 361 (forward-line -1))
2cc0b765
RS
362 (looking-at "[ \t]*#[ \t]*define[ \t]")))
363 ;; Handle a C macro definition.
364 (beginning-of-line)
365 (while (eq (char-after (- (point) 2)) ?\\) ;not =; note above
366 (forward-line -1))
367 (search-forward "define")
368 (skip-chars-forward " \t")
369 (buffer-substring (point)
370 (progn (forward-sexp 1) (point))))
32e986d4 371 ((memq major-mode '(c-mode c++-mode c++-c-mode objc-mode))
2cc0b765
RS
372 (beginning-of-line)
373 ;; See if we are in the beginning part of a function,
374 ;; before the open brace. If so, advance forward.
375 (while (not (looking-at "{\\|\\(\\s *$\\)"))
376 (forward-line 1))
377 (or (eobp)
378 (forward-char 1))
379 (beginning-of-defun)
380 (if (progn (end-of-defun)
381 (< location (point)))
382 (progn
383 (backward-sexp 1)
384 (let (beg tem)
fd7fa35a 385
2cc0b765
RS
386 (forward-line -1)
387 ;; Skip back over typedefs of arglist.
388 (while (and (not (bobp))
389 (looking-at "[ \t\n]"))
390 (forward-line -1))
391 ;; See if this is using the DEFUN macro used in Emacs,
392 ;; or the DEFUN macro used by the C library.
393 (if (condition-case nil
394 (and (save-excursion
019644ee
RS
395 (end-of-line)
396 (while (= (preceding-char) ?\\)
397 (end-of-line 2))
2cc0b765
RS
398 (backward-sexp 1)
399 (beginning-of-line)
400 (setq tem (point))
401 (looking-at "DEFUN\\b"))
402 (>= location tem))
403 (error nil))
404 (progn
405 (goto-char tem)
406 (down-list 1)
407 (if (= (char-after (point)) ?\")
408 (progn
409 (forward-sexp 1)
410 (skip-chars-forward " ,")))
411 (buffer-substring (point)
412 (progn (forward-sexp 1) (point))))
32e986d4
RS
413 (if (looking-at "^[+-]")
414 (get-method-definition)
415 ;; Ordinary C function syntax.
416 (setq beg (point))
e172f546
KH
417 (if (and (condition-case nil
418 ;; Protect against "Unbalanced parens" error.
419 (progn
420 (down-list 1) ; into arglist
421 (backward-up-list 1)
422 (skip-chars-backward " \t")
423 t)
424 (error nil))
425 ;; Verify initial pos was after
426 ;; real start of function.
427 (save-excursion
428 (goto-char beg)
429 ;; For this purpose, include the line
430 ;; that has the decl keywords. This
431 ;; may also include some of the
432 ;; comments before the function.
433 (while (and (not (bobp))
434 (save-excursion
435 (forward-line -1)
436 (looking-at "[^\n\f]")))
437 (forward-line -1))
438 (>= location (point)))
32e986d4
RS
439 ;; Consistency check: going down and up
440 ;; shouldn't take us back before BEG.
441 (> (point) beg))
e172f546
KH
442 (let (end middle)
443 ;; Don't include any final newline
444 ;; in the name we use.
445 (if (= (preceding-char) ?\n)
446 (forward-char -1))
447 (setq end (point))
448 (backward-sexp 1)
449 ;; Now find the right beginning of the name.
450 ;; Include certain keywords if they
451 ;; precede the name.
452 (setq middle (point))
453 (forward-word -1)
6dfa1d83
RS
454 ;; Ignore these subparts of a class decl
455 ;; and move back to the class name itself.
456 (while (looking-at "public \\|private ")
457 (skip-chars-backward " \t:")
458 (setq end (point))
459 (backward-sexp 1)
460 (setq middle (point))
461 (forward-word -1))
e172f546
KH
462 (and (bolp)
463 (looking-at "struct \\|union \\|class ")
464 (setq middle (point)))
465 (buffer-substring middle end)))))))))
2cc0b765
RS
466 ((memq major-mode
467 '(TeX-mode plain-TeX-mode LaTeX-mode;; tex-mode.el
468 plain-tex-mode latex-mode;; cmutex.el
469 ))
470 (if (re-search-backward
471 "\\\\\\(sub\\)*\\(section\\|paragraph\\|chapter\\)" nil t)
472 (progn
473 (goto-char (match-beginning 0))
474 (buffer-substring (1+ (point));; without initial backslash
475 (progn
476 (end-of-line)
477 (point))))))
478 ((eq major-mode 'texinfo-mode)
3071ee28 479 (if (re-search-backward "^@node[ \t]+\\([^,\n]+\\)" nil t)
2cc0b765
RS
480 (buffer-substring (match-beginning 1)
481 (match-end 1))))
64bd2d51
RS
482 ((eq major-mode 'perl-mode)
483 (if (re-search-backward "^sub[ \t]+\\([^ \t\n]+\\)" nil t)
484 (buffer-substring (match-beginning 1)
485 (match-end 1))))
a9e2a7f2
RS
486 ((eq major-mode 'fortran-mode)
487 ;; must be inside function body for this to work
488 (beginning-of-fortran-subprogram)
489 (let ((case-fold-search t)) ; case-insensitive
490 ;; search for fortran subprogram start
491 (if (re-search-forward
492 "^[ \t]*\\(program\\|subroutine\\|function\
493\\|[ \ta-z0-9*]*[ \t]+function\\)"
63314951 494 nil t)
a9e2a7f2
RS
495 (progn
496 ;; move to EOL or before first left paren
497 (if (re-search-forward "[(\n]" nil t)
498 (progn (forward-char -1)
499 (skip-chars-backward " \t"))
500 (end-of-line))
501 ;; Use the name preceding that.
502 (buffer-substring (point)
503 (progn (forward-sexp -1)
504 (point)))))))
2cc0b765
RS
505 (t
506 ;; If all else fails, try heuristics
507 (let (case-fold-search)
508 (end-of-line)
509 (if (re-search-backward add-log-current-defun-header-regexp
510 (- (point) 10000)
511 t)
512 (buffer-substring (match-beginning 1)
513 (match-end 1))))))))
514 (error nil)))
ef15f270 515
15319a8f
RS
516(defvar get-method-definition-md)
517
59c1a7de
RS
518;; Subroutine used within get-method-definition.
519;; Add the last match in the buffer to the end of `md',
520;; followed by the string END; move to the end of that match.
521(defun get-method-definition-1 (end)
15319a8f
RS
522 (setq get-method-definition-md
523 (concat get-method-definition-md
524 (buffer-substring (match-beginning 1) (match-end 1))
525 end))
59c1a7de
RS
526 (goto-char (match-end 0)))
527
528;; For objective C, return the method name if we are in a method.
529(defun get-method-definition ()
15319a8f 530 (let ((get-method-definition-md "["))
59c1a7de 531 (save-excursion
f27f16ed 532 (if (re-search-backward "^@implementation\\s-*\\([A-Za-z_]*\\)" nil t)
59c1a7de
RS
533 (get-method-definition-1 " ")))
534 (save-excursion
535 (cond
f27f16ed 536 ((re-search-forward "^\\([-+]\\)[ \t\n\f\r]*\\(([^)]*)\\)?\\s-*" nil t)
59c1a7de
RS
537 (get-method-definition-1 "")
538 (while (not (looking-at "[{;]"))
539 (looking-at
f27f16ed 540 "\\([A-Za-z_]*:?\\)\\s-*\\(([^)]*)\\)?[A-Za-z_]*[ \t\n\f\r]*")
59c1a7de 541 (get-method-definition-1 ""))
15319a8f 542 (concat get-method-definition-md "]"))))))
59c1a7de 543
ef15f270 544
1da56800
RS
545(provide 'add-log)
546
fd7fa35a 547;;; add-log.el ends here