new version
[emacs.git] / lisp / add-log.el
blob4a935223cfe70cb1c45aae0adf1223005c8b2819
1 ;;; add-log.el --- change log maintenance commands for Emacs
3 ;; Copyright (C) 1985, 86, 88, 93, 94, 1997 Free Software Foundation, Inc.
5 ;; Keywords: tools
7 ;; This file is part of GNU Emacs.
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
11 ;; the Free Software Foundation; either version 2, or (at your option)
12 ;; any later version.
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.
19 ;; You should have received a copy of the GNU General Public License
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.
24 ;;; Commentary:
26 ;; This facility is documented in the Emacs Manual.
28 ;;; Code:
30 (defgroup change-log nil
31 "Change log maintenance"
32 :group 'tools
33 :prefix "change-log-"
34 :prefix "add-log-")
37 (defcustom change-log-default-name nil
38 "*Name of a change log file for \\[add-change-log-entry]."
39 :type '(choice (const :tag "default" nil)
40 string)
41 :group 'change-log)
43 (defcustom add-log-current-defun-function nil
45 *If non-nil, function to guess name of current function from surrounding text.
46 \\[add-change-log-entry] calls this function (if nil, `add-log-current-defun'
47 instead) with no arguments. It returns a string or nil if it cannot guess."
48 :type 'boolean
49 :group 'change-log)
51 ;;;###autoload
52 (defcustom add-log-full-name nil
53 "*Full name of user, for inclusion in ChangeLog daily headers.
54 This defaults to the value returned by the `user-full-name' function."
55 :type '(choice (const :tag "Default" nil)
56 string)
57 :group 'change-log)
59 ;;;###autoload
60 (defcustom add-log-mailing-address nil
61 "*Electronic mail address of user, for inclusion in ChangeLog daily headers.
62 This defaults to the value of `user-mail-address'."
63 :type '(choice (const :tag "Default" nil)
64 string)
65 :group 'change-log)
67 (defcustom add-log-time-format 'add-log-iso8601-time-string
68 "*Function that defines the time format.
69 For example, `add-log-iso8601-time-string', which gives the
70 date in international ISO 8601 format,
71 and `current-time-string' are two valid values."
72 :type '(radio (const :tag "International ISO 8601 format"
73 add-log-iso8601-time-string)
74 (const :tag "Old format, as returned by `current-time-string'"
75 current-time-string)
76 (function :tag "Other"))
77 :group 'change-log)
79 (defvar change-log-font-lock-keywords
80 '(;;
81 ;; Date lines, new and old styles.
82 ("^\\sw.........[0-9: ]*"
83 (0 font-lock-string-face)
84 ("\\([^<]+\\)<\\([A-Za-z0-9_.-]+@[A-Za-z0-9_.-]+\\)>" nil nil
85 (1 font-lock-reference-face)
86 (2 font-lock-variable-name-face)))
88 ;; File names.
89 ("^\t\\* \\([^ ,:([\n]+\\)"
90 (1 font-lock-function-name-face)
91 ("\\=, \\([^ ,:([\n]+\\)" nil nil (1 font-lock-function-name-face)))
93 ;; Function or variable names.
94 ("(\\([^ ,:\n]+\\)"
95 (1 font-lock-keyword-face)
96 ("\\=, \\([^ ,:\n]+\\)" nil nil (1 font-lock-keyword-face)))
98 ;; Conditionals.
99 ("\\[!?\\([^]\n]+\\)\\]\\(:\\| (\\)" (1 font-lock-variable-name-face))
101 ;; Acknowledgments.
102 ("^\t\\(From\\|Reported by\\)" 1 font-lock-comment-face)
104 "Additional expressions to highlight in Change Log mode.")
106 (defvar change-log-mode-map nil
107 "Keymap for Change Log major mode.")
108 (if change-log-mode-map
110 (setq change-log-mode-map (make-sparse-keymap)))
112 (defvar change-log-time-zone-rule nil
113 "Time zone used for calculating change log time stamps.
114 It takes the same format as the TZ argument of `set-time-zone-rule'.
115 If nil, use local time.")
117 (defun add-log-iso8601-time-zone (time)
118 (let* ((utc-offset (or (car (current-time-zone time)) 0))
119 (sign (if (< utc-offset 0) ?- ?+))
120 (sec (abs utc-offset))
121 (ss (% sec 60))
122 (min (/ sec 60))
123 (mm (% min 60))
124 (hh (/ min 60)))
125 (format (cond ((not (zerop ss)) "%c%02d:%02d:%02d")
126 ((not (zerop mm)) "%c%02d:%02d")
127 (t "%c%02d"))
128 sign hh mm ss)))
130 (defun add-log-iso8601-time-string ()
131 (if change-log-time-zone-rule
132 (let ((tz (getenv "TZ"))
133 (now (current-time)))
134 (unwind-protect
135 (progn
136 (set-time-zone-rule
137 change-log-time-zone-rule)
138 (concat
139 (format-time-string "%Y-%m-%d " now)
140 (add-log-iso8601-time-zone now)))
141 (set-time-zone-rule tz)))
142 (format-time-string "%Y-%m-%d")))
144 (defun change-log-name ()
145 (or change-log-default-name
146 (if (eq system-type 'vax-vms)
147 "$CHANGE_LOG$.TXT"
148 "ChangeLog")))
150 ;;;###autoload
151 (defun prompt-for-change-log-name ()
152 "Prompt for a change log name."
153 (let* ((default (change-log-name))
154 (name (expand-file-name
155 (read-file-name (format "Log file (default %s): " default)
156 nil default))))
157 ;; Handle something that is syntactically a directory name.
158 ;; Look for ChangeLog or whatever in that directory.
159 (if (string= (file-name-nondirectory name) "")
160 (expand-file-name (file-name-nondirectory default)
161 name)
162 ;; Handle specifying a file that is a directory.
163 (if (file-directory-p name)
164 (expand-file-name (file-name-nondirectory default)
165 (file-name-as-directory name))
166 name))))
168 ;;;###autoload
169 (defun find-change-log (&optional file-name)
170 "Find a change log file for \\[add-change-log-entry] and return the name.
172 Optional arg FILE-NAME specifies the file to use.
173 If FILE-NAME is nil, use the value of `change-log-default-name'.
174 If 'change-log-default-name' is nil, behave as though it were 'ChangeLog'
175 \(or whatever we use on this operating system).
177 If 'change-log-default-name' contains a leading directory component, then
178 simply find it in the current directory. Otherwise, search in the current
179 directory and its successive parents for a file so named.
181 Once a file is found, `change-log-default-name' is set locally in the
182 current buffer to the complete file name."
183 ;; If user specified a file name or if this buffer knows which one to use,
184 ;; just use that.
185 (or file-name
186 (setq file-name (and change-log-default-name
187 (file-name-directory change-log-default-name)
188 change-log-default-name))
189 (progn
190 ;; Chase links in the source file
191 ;; and use the change log in the dir where it points.
192 (setq file-name (or (and buffer-file-name
193 (file-name-directory
194 (file-chase-links buffer-file-name)))
195 default-directory))
196 (if (file-directory-p file-name)
197 (setq file-name (expand-file-name (change-log-name) file-name)))
198 ;; Chase links before visiting the file.
199 ;; This makes it easier to use a single change log file
200 ;; for several related directories.
201 (setq file-name (file-chase-links file-name))
202 (setq file-name (expand-file-name file-name))
203 ;; Move up in the dir hierarchy till we find a change log file.
204 (let ((file1 file-name)
205 parent-dir)
206 (while (and (not (or (get-file-buffer file1) (file-exists-p file1)))
207 (progn (setq parent-dir
208 (file-name-directory
209 (directory-file-name
210 (file-name-directory file1))))
211 ;; Give up if we are already at the root dir.
212 (not (string= (file-name-directory file1)
213 parent-dir))))
214 ;; Move up to the parent dir and try again.
215 (setq file1 (expand-file-name
216 (file-name-nondirectory (change-log-name))
217 parent-dir)))
218 ;; If we found a change log in a parent, use that.
219 (if (or (get-file-buffer file1) (file-exists-p file1))
220 (setq file-name file1)))))
221 ;; Make a local variable in this buffer so we needn't search again.
222 (set (make-local-variable 'change-log-default-name) file-name)
223 file-name)
226 ;;;###autoload
227 (defun add-change-log-entry (&optional whoami file-name other-window new-entry)
228 "Find change log file and add an entry for today.
229 Optional arg (interactive prefix) non-nil means prompt for user name and site.
230 Second arg is file name of change log. If nil, uses `change-log-default-name'.
231 Third arg OTHER-WINDOW non-nil means visit in other window.
232 Fourth arg NEW-ENTRY non-nil means always create a new entry at the front;
233 never append to an existing entry. Today's date is calculated according to
234 `change-log-time-zone-rule' if non-nil, otherwise in local time."
235 (interactive (list current-prefix-arg
236 (prompt-for-change-log-name)))
237 (or add-log-full-name
238 (setq add-log-full-name (user-full-name)))
239 (or add-log-mailing-address
240 (setq add-log-mailing-address user-mail-address))
241 (if whoami
242 (progn
243 (setq add-log-full-name (read-input "Full name: " add-log-full-name))
244 ;; Note that some sites have room and phone number fields in
245 ;; full name which look silly when inserted. Rather than do
246 ;; anything about that here, let user give prefix argument so that
247 ;; s/he can edit the full name field in prompter if s/he wants.
248 (setq add-log-mailing-address
249 (read-input "Mailing address: " add-log-mailing-address))))
250 (let ((defun (funcall (or add-log-current-defun-function
251 'add-log-current-defun)))
252 paragraph-end entry)
254 (setq file-name (expand-file-name (find-change-log file-name)))
256 ;; Set ENTRY to the file name to use in the new entry.
257 (and buffer-file-name
258 ;; Never want to add a change log entry for the ChangeLog file itself.
259 (not (string= buffer-file-name file-name))
260 (setq entry (if (string-match
261 (concat "^" (regexp-quote (file-name-directory
262 file-name)))
263 buffer-file-name)
264 (substring buffer-file-name (match-end 0))
265 (file-name-nondirectory buffer-file-name))))
267 (if (and other-window (not (equal file-name buffer-file-name)))
268 (find-file-other-window file-name)
269 (find-file file-name))
270 (or (eq major-mode 'change-log-mode)
271 (change-log-mode))
272 (undo-boundary)
273 (goto-char (point-min))
274 (let ((new-entry (concat (funcall add-log-time-format)
275 " " add-log-full-name
276 " <" add-log-mailing-address ">")))
277 (if (looking-at (regexp-quote new-entry))
278 (forward-line 1)
279 (insert new-entry "\n\n")))
281 ;; Search only within the first paragraph.
282 (if (looking-at "\n*[^\n* \t]")
283 (skip-chars-forward "\n")
284 (forward-paragraph 1))
285 (setq paragraph-end (point))
286 (goto-char (point-min))
288 ;; Now insert the new line for this entry.
289 (cond ((re-search-forward "^\\s *\\*\\s *$" paragraph-end t)
290 ;; Put this file name into the existing empty entry.
291 (if entry
292 (insert entry)))
293 ((and (not new-entry)
294 (let (case-fold-search)
295 (re-search-forward
296 (concat (regexp-quote (concat "* " entry))
297 ;; Don't accept `foo.bar' when
298 ;; looking for `foo':
299 "\\(\\s \\|[(),:]\\)")
300 paragraph-end t)))
301 ;; Add to the existing entry for the same file.
302 (re-search-forward "^\\s *$\\|^\\s \\*")
303 (goto-char (match-beginning 0))
304 ;; Delete excess empty lines; make just 2.
305 (while (and (not (eobp)) (looking-at "^\\s *$"))
306 (delete-region (point) (save-excursion (forward-line 1) (point))))
307 (insert "\n\n")
308 (forward-line -2)
309 (indent-relative-maybe))
311 ;; Make a new entry.
312 (forward-line 1)
313 (while (looking-at "\\sW")
314 (forward-line 1))
315 (while (and (not (eobp)) (looking-at "^\\s *$"))
316 (delete-region (point) (save-excursion (forward-line 1) (point))))
317 (insert "\n\n\n")
318 (forward-line -2)
319 (indent-to left-margin)
320 (insert "* " (or entry ""))))
321 ;; Now insert the function name, if we have one.
322 ;; Point is at the entry for this file,
323 ;; either at the end of the line or at the first blank line.
324 (if defun
325 (progn
326 ;; Make it easy to get rid of the function name.
327 (undo-boundary)
328 (insert (if (save-excursion
329 (beginning-of-line 1)
330 (looking-at "\\s *$"))
332 " ")
333 "(" defun "): "))
334 ;; No function name, so put in a colon unless we have just a star.
335 (if (not (save-excursion
336 (beginning-of-line 1)
337 (looking-at "\\s *\\(\\*\\s *\\)?$")))
338 (insert ": ")))))
340 ;;;###autoload
341 (defun add-change-log-entry-other-window (&optional whoami file-name)
342 "Find change log file in other window and add an entry for today.
343 Optional arg (interactive prefix) non-nil means prompt for user name and site.
344 Second arg is file name of change log. \
345 If nil, uses `change-log-default-name'."
346 (interactive (if current-prefix-arg
347 (list current-prefix-arg
348 (prompt-for-change-log-name))))
349 (add-change-log-entry whoami file-name t))
350 ;;;###autoload (define-key ctl-x-4-map "a" 'add-change-log-entry-other-window)
352 ;;;###autoload
353 (defun change-log-mode ()
354 "Major mode for editing change logs; like Indented Text Mode.
355 Prevents numeric backups and sets `left-margin' to 8 and `fill-column' to 74.
356 New log entries are usually made with \\[add-change-log-entry] or \\[add-change-log-entry-other-window].
357 Each entry behaves as a paragraph, and the entries for one day as a page.
358 Runs `change-log-mode-hook'."
359 (interactive)
360 (kill-all-local-variables)
361 (indented-text-mode)
362 (setq major-mode 'change-log-mode
363 mode-name "Change Log"
364 left-margin 8
365 fill-column 74
366 indent-tabs-mode t
367 tab-width 8)
368 (use-local-map change-log-mode-map)
369 (set (make-local-variable 'fill-paragraph-function)
370 'change-log-fill-paragraph)
371 ;; Let each entry behave as one paragraph:
372 ;; We really do want "^" in paragraph-start below: it is only the lines that
373 ;; begin at column 0 (despite the left-margin of 8) that we are looking for.
374 (set (make-local-variable 'paragraph-start) "\\s *$\\|\f\\|^\\<")
375 (set (make-local-variable 'paragraph-separate) "\\s *$\\|\f\\|^\\<")
376 ;; Let all entries for one day behave as one page.
377 ;; Match null string on the date-line so that the date-line
378 ;; is grouped with what follows.
379 (set (make-local-variable 'page-delimiter) "^\\<\\|^\f")
380 (set (make-local-variable 'version-control) 'never)
381 (set (make-local-variable 'adaptive-fill-regexp) "\\s *")
382 (set (make-local-variable 'font-lock-defaults)
383 '(change-log-font-lock-keywords t))
384 (run-hooks 'change-log-mode-hook))
386 ;; It might be nice to have a general feature to replace this. The idea I
387 ;; have is a variable giving a regexp matching text which should not be
388 ;; moved from bol by filling. change-log-mode would set this to "^\\s *\\s(".
389 ;; But I don't feel up to implementing that today.
390 (defun change-log-fill-paragraph (&optional justify)
391 "Fill the paragraph, but preserve open parentheses at beginning of lines.
392 Prefix arg means justify as well."
393 (interactive "P")
394 (let ((end (progn (forward-paragraph) (point)))
395 (beg (progn (backward-paragraph) (point)))
396 (paragraph-start (concat paragraph-start "\\|\\s *\\s(")))
397 (fill-region beg end justify)
400 (defcustom add-log-current-defun-header-regexp
401 "^\\([A-Z][A-Z_ ]*[A-Z_]\\|[-_a-zA-Z]+\\)[ \t]*[:=]"
402 "*Heuristic regexp used by `add-log-current-defun' for unknown major modes."
403 :type 'regexp
404 :group 'change-log)
406 ;;;###autoload
407 (defvar add-log-lisp-like-modes
408 '(emacs-lisp-mode lisp-mode scheme-mode lisp-interaction-mode)
409 "*Modes that look like Lisp to `add-log-current-defun'.")
411 ;;;###autoload
412 (defvar add-log-c-like-modes
413 '(c-mode c++-mode c++-c-mode objc-mode)
414 "*Modes that look like C to `add-log-current-defun'.")
416 ;;;###autoload
417 (defvar add-log-tex-like-modes
418 '(TeX-mode plain-TeX-mode LaTeX-mode plain-tex-mode latex-mode)
419 "*Modes that look like TeX to `add-log-current-defun'.")
421 ;;;###autoload
422 (defun add-log-current-defun ()
423 "Return name of function definition point is in, or nil.
425 Understands C, Lisp, LaTeX (\"functions\" are chapters, sections, ...),
426 Texinfo (@node titles), Perl, and Fortran.
428 Other modes are handled by a heuristic that looks in the 10K before
429 point for uppercase headings starting in the first column or
430 identifiers followed by `:' or `=', see variable
431 `add-log-current-defun-header-regexp'.
433 Has a preference of looking backwards."
434 (condition-case nil
435 (save-excursion
436 (let ((location (point)))
437 (cond ((memq major-mode add-log-lisp-like-modes)
438 ;; If we are now precisely at the beginning of a defun,
439 ;; make sure beginning-of-defun finds that one
440 ;; rather than the previous one.
441 (or (eobp) (forward-char 1))
442 (beginning-of-defun)
443 ;; Make sure we are really inside the defun found, not after it.
444 (if (and (looking-at "\\s(")
445 (progn (end-of-defun)
446 (< location (point)))
447 (progn (forward-sexp -1)
448 (>= location (point))))
449 (progn
450 (if (looking-at "\\s(")
451 (forward-char 1))
452 (forward-sexp 1)
453 (skip-chars-forward " '")
454 (buffer-substring (point)
455 (progn (forward-sexp 1) (point))))))
456 ((and (memq major-mode add-log-c-like-modes)
457 (save-excursion
458 (beginning-of-line)
459 ;; Use eq instead of = here to avoid
460 ;; error when at bob and char-after
461 ;; returns nil.
462 (while (eq (char-after (- (point) 2)) ?\\)
463 (forward-line -1))
464 (looking-at "[ \t]*#[ \t]*define[ \t]")))
465 ;; Handle a C macro definition.
466 (beginning-of-line)
467 (while (eq (char-after (- (point) 2)) ?\\) ;not =; note above
468 (forward-line -1))
469 (search-forward "define")
470 (skip-chars-forward " \t")
471 (buffer-substring (point)
472 (progn (forward-sexp 1) (point))))
473 ((memq major-mode add-log-c-like-modes)
474 (beginning-of-line)
475 ;; See if we are in the beginning part of a function,
476 ;; before the open brace. If so, advance forward.
477 (while (not (looking-at "{\\|\\(\\s *$\\)"))
478 (forward-line 1))
479 (or (eobp)
480 (forward-char 1))
481 (beginning-of-defun)
482 (if (progn (end-of-defun)
483 (< location (point)))
484 (progn
485 (backward-sexp 1)
486 (let (beg tem)
488 (forward-line -1)
489 ;; Skip back over typedefs of arglist.
490 (while (and (not (bobp))
491 (looking-at "[ \t\n]"))
492 (forward-line -1))
493 ;; See if this is using the DEFUN macro used in Emacs,
494 ;; or the DEFUN macro used by the C library.
495 (if (condition-case nil
496 (and (save-excursion
497 (end-of-line)
498 (while (= (preceding-char) ?\\)
499 (end-of-line 2))
500 (backward-sexp 1)
501 (beginning-of-line)
502 (setq tem (point))
503 (looking-at "DEFUN\\b"))
504 (>= location tem))
505 (error nil))
506 (progn
507 (goto-char tem)
508 (down-list 1)
509 (if (= (char-after (point)) ?\")
510 (progn
511 (forward-sexp 1)
512 (skip-chars-forward " ,")))
513 (buffer-substring (point)
514 (progn (forward-sexp 1) (point))))
515 (if (looking-at "^[+-]")
516 (get-method-definition)
517 ;; Ordinary C function syntax.
518 (setq beg (point))
519 (if (and (condition-case nil
520 ;; Protect against "Unbalanced parens" error.
521 (progn
522 (down-list 1) ; into arglist
523 (backward-up-list 1)
524 (skip-chars-backward " \t")
526 (error nil))
527 ;; Verify initial pos was after
528 ;; real start of function.
529 (save-excursion
530 (goto-char beg)
531 ;; For this purpose, include the line
532 ;; that has the decl keywords. This
533 ;; may also include some of the
534 ;; comments before the function.
535 (while (and (not (bobp))
536 (save-excursion
537 (forward-line -1)
538 (looking-at "[^\n\f]")))
539 (forward-line -1))
540 (>= location (point)))
541 ;; Consistency check: going down and up
542 ;; shouldn't take us back before BEG.
543 (> (point) beg))
544 (let (end middle)
545 ;; Don't include any final newline
546 ;; in the name we use.
547 (if (= (preceding-char) ?\n)
548 (forward-char -1))
549 (setq end (point))
550 (backward-sexp 1)
551 ;; Now find the right beginning of the name.
552 ;; Include certain keywords if they
553 ;; precede the name.
554 (setq middle (point))
555 (forward-word -1)
556 ;; Ignore these subparts of a class decl
557 ;; and move back to the class name itself.
558 (while (looking-at "public \\|private ")
559 (skip-chars-backward " \t:")
560 (setq end (point))
561 (backward-sexp 1)
562 (setq middle (point))
563 (forward-word -1))
564 (and (bolp)
565 (looking-at "struct \\|union \\|class ")
566 (setq middle (point)))
567 (buffer-substring middle end)))))))))
568 ((memq major-mode add-log-tex-like-modes)
569 (if (re-search-backward
570 "\\\\\\(sub\\)*\\(section\\|paragraph\\|chapter\\)" nil t)
571 (progn
572 (goto-char (match-beginning 0))
573 (buffer-substring (1+ (point));; without initial backslash
574 (progn
575 (end-of-line)
576 (point))))))
577 ((eq major-mode 'texinfo-mode)
578 (if (re-search-backward "^@node[ \t]+\\([^,\n]+\\)" nil t)
579 (buffer-substring (match-beginning 1)
580 (match-end 1))))
581 ((eq major-mode 'perl-mode)
582 (if (re-search-backward "^sub[ \t]+\\([^ \t\n]+\\)" nil t)
583 (buffer-substring (match-beginning 1)
584 (match-end 1))))
585 ((eq major-mode 'fortran-mode)
586 ;; must be inside function body for this to work
587 (beginning-of-fortran-subprogram)
588 (let ((case-fold-search t)) ; case-insensitive
589 ;; search for fortran subprogram start
590 (if (re-search-forward
591 "^[ \t]*\\(program\\|subroutine\\|function\
592 \\|[ \ta-z0-9*]*[ \t]+function\\)"
593 nil t)
594 (progn
595 ;; move to EOL or before first left paren
596 (if (re-search-forward "[(\n]" nil t)
597 (progn (forward-char -1)
598 (skip-chars-backward " \t"))
599 (end-of-line))
600 ;; Use the name preceding that.
601 (buffer-substring (point)
602 (progn (forward-sexp -1)
603 (point)))))))
605 ;; If all else fails, try heuristics
606 (let (case-fold-search)
607 (end-of-line)
608 (if (re-search-backward add-log-current-defun-header-regexp
609 (- (point) 10000)
611 (buffer-substring (match-beginning 1)
612 (match-end 1))))))))
613 (error nil)))
615 (defvar get-method-definition-md)
617 ;; Subroutine used within get-method-definition.
618 ;; Add the last match in the buffer to the end of `md',
619 ;; followed by the string END; move to the end of that match.
620 (defun get-method-definition-1 (end)
621 (setq get-method-definition-md
622 (concat get-method-definition-md
623 (buffer-substring (match-beginning 1) (match-end 1))
624 end))
625 (goto-char (match-end 0)))
627 ;; For objective C, return the method name if we are in a method.
628 (defun get-method-definition ()
629 (let ((get-method-definition-md "["))
630 (save-excursion
631 (if (re-search-backward "^@implementation\\s-*\\([A-Za-z_]*\\)" nil t)
632 (get-method-definition-1 " ")))
633 (save-excursion
634 (cond
635 ((re-search-forward "^\\([-+]\\)[ \t\n\f\r]*\\(([^)]*)\\)?\\s-*" nil t)
636 (get-method-definition-1 "")
637 (while (not (looking-at "[{;]"))
638 (looking-at
639 "\\([A-Za-z_]*:?\\)\\s-*\\(([^)]*)\\)?[A-Za-z_]*[ \t\n\f\r]*")
640 (get-method-definition-1 ""))
641 (concat get-method-definition-md "]"))))))
644 (provide 'add-log)
646 ;;; add-log.el ends here