Mercurial > emacs
comparison lisp/progmodes/c-mode.el @ 1662:ee7f627ef26e
Fri Dec 4 00:31:30 1992 Jim Blandy (jimb@totoro.cs.oberlin.edu)
* c-mode.el (c-fill-paragraph): When trying to make sure that the
comment ender isn't on its own line, don't signal an error if
there is no comment ender.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sun, 06 Dec 1992 22:40:25 +0000 |
parents | 26d8a65a6e32 |
children | e0463f021e2f |
comparison
equal
deleted
inserted
replaced
1661:26d8a65a6e32 | 1662:ee7f627ef26e |
---|---|
318 (delete-region (point) (+ (point) chars-to-delete))) | 318 (delete-region (point) (+ (point) chars-to-delete))) |
319 ;; Find the comment ender (should be on last line of buffer, | 319 ;; Find the comment ender (should be on last line of buffer, |
320 ;; given the narrowing) and don't leave it on its own line. | 320 ;; given the narrowing) and don't leave it on its own line. |
321 (goto-char (point-max)) | 321 (goto-char (point-max)) |
322 (forward-line -1) | 322 (forward-line -1) |
323 (search-forward "*/") | 323 (search-forward "*/" nil 'move) |
324 (beginning-of-line) | 324 (beginning-of-line) |
325 (if (looking-at "[ \t]*\\*/") | 325 (if (looking-at "[ \t]*\\*/") |
326 (delete-indentation))))) | 326 (delete-indentation))))) |
327 ;; Outside of comments: do ordinary filling. | 327 ;; Outside of comments: do ordinary filling. |
328 (fill-paragraph arg)))) | 328 (fill-paragraph arg)))) |