Mercurial > emacs
comparison lisp/progmodes/cplus-md.el @ 16427:3b9f64eb097b
Comment change.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 12 Oct 1996 02:42:58 +0000 |
parents | e263cca8d928 |
children | 720d1f98ae42 |
comparison
equal
deleted
inserted
replaced
16426:0db426a80aff | 16427:3b9f64eb097b |
---|---|
351 (if (looking-at "^\\(/\\*\\|//\\)") | 351 (if (looking-at "^\\(/\\*\\|//\\)") |
352 0 ; Existing comment at bol stays there. | 352 0 ; Existing comment at bol stays there. |
353 (save-excursion | 353 (save-excursion |
354 (skip-chars-backward " \t") | 354 (skip-chars-backward " \t") |
355 (max | 355 (max |
356 ;; leave at least one space on non-empty lines. | 356 ;; Leave at least one space on non-empty lines. |
357 (if (zerop (current-column)) 0 (1+ (current-column))) | 357 (if (zerop (current-column)) 0 (1+ (current-column))) |
358 (let ((cur-pt (point))) | 358 (let ((cur-pt (point))) |
359 (beginning-of-line 0) | 359 (beginning-of-line 0) |
360 ;; If previous line had a comment, use it's indent | 360 ;; If previous line had a comment, use its indentation. |
361 (if (re-search-forward comment-start-skip cur-pt t) | 361 (if (re-search-forward comment-start-skip cur-pt t) |
362 (progn | 362 (progn |
363 (goto-char (match-beginning 0)) | 363 (goto-char (match-beginning 0)) |
364 (current-column)) | 364 (current-column)) |
365 comment-column)))))) ; otherwise indent at comment column. | 365 comment-column)))))) ; otherwise indent at comment column. |