diff options
| author | Roland McGrath | 1992-08-10 21:24:45 +0000 |
|---|---|---|
| committer | Roland McGrath | 1992-08-10 21:24:45 +0000 |
| commit | 36e6631cf59add98a5ef8e95d3e6edafe994fd48 (patch) | |
| tree | 3f5ee228951b55f890b20e6f8bf4f92da751717e | |
| parent | 9c95ac442f5a24c5b069d59b376f487df497e301 (diff) | |
| download | emacs-36e6631cf59add98a5ef8e95d3e6edafe994fd48.tar.gz emacs-36e6631cf59add98a5ef8e95d3e6edafe994fd48.zip | |
*** empty log message ***
| -rw-r--r-- | lisp/add-log.el | 50 |
1 files changed, 28 insertions, 22 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el index 0aa2489f6b8..8809010d94d 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el | |||
| @@ -287,28 +287,34 @@ Has a preference of looking backwards." | |||
| 287 | (progn (forward-sexp 1) (point)))) | 287 | (progn (forward-sexp 1) (point)))) |
| 288 | ;; Ordinary C function syntax. | 288 | ;; Ordinary C function syntax. |
| 289 | (setq beg (point)) | 289 | (setq beg (point)) |
| 290 | (down-list 1) ; into arglist | 290 | (if (condition-case nil |
| 291 | (backward-up-list 1) | 291 | ;; Protect against "Unbalanced parens" error. |
| 292 | (skip-chars-backward " \t") | 292 | (progn |
| 293 | ;; Verify initial pos was after real start of function. | 293 | (down-list 1) ; into arglist |
| 294 | (if (and (save-excursion | 294 | (backward-up-list 1) |
| 295 | (goto-char beg) | 295 | (skip-chars-backward " \t") |
| 296 | ;; For this purpose, include the line | 296 | t) |
| 297 | ;; that has the decl keywords. | 297 | (error nil)) |
| 298 | ;; This may also include some of the comments | 298 | ;; Verify initial pos was after |
| 299 | ;; before the function. | 299 | ;; real start of function. |
| 300 | (while (and (not (bobp)) | 300 | (if (and (save-excursion |
| 301 | (save-excursion | 301 | (goto-char beg) |
| 302 | (forward-line -1) | 302 | ;; For this purpose, include the line |
| 303 | (looking-at "[^\n\f]"))) | 303 | ;; that has the decl keywords. This |
| 304 | (forward-line -1)) | 304 | ;; may also include some of the |
| 305 | (>= location (point))) | 305 | ;; comments before the function. |
| 306 | ;; Consistency check: going down and up | 306 | (while (and (not (bobp)) |
| 307 | ;; shouldn't take us back before BEG. | 307 | (save-excursion |
| 308 | (> (point) beg)) | 308 | (forward-line -1) |
| 309 | (buffer-substring (point) | 309 | (looking-at "[^\n\f]"))) |
| 310 | (progn (backward-sexp 1) | 310 | (forward-line -1)) |
| 311 | (point))))))))) | 311 | (>= location (point))) |
| 312 | ;; Consistency check: going down and up | ||
| 313 | ;; shouldn't take us back before BEG. | ||
| 314 | (> (point) beg)) | ||
| 315 | (buffer-substring (point) | ||
| 316 | (progn (backward-sexp 1) | ||
| 317 | (point)))))))))) | ||
| 312 | ((memq major-mode | 318 | ((memq major-mode |
| 313 | '(TeX-mode plain-TeX-mode LaTeX-mode;; tex-mode.el | 319 | '(TeX-mode plain-TeX-mode LaTeX-mode;; tex-mode.el |
| 314 | plain-tex-mode latex-mode;; cmutex.el | 320 | plain-tex-mode latex-mode;; cmutex.el |