462 |
;; comment-indent-function refuses delegates to indent. |
;; comment-indent-function refuses delegates to indent. |
463 |
(indent-according-to-mode) |
(indent-according-to-mode) |
464 |
;; Avoid moving comments past the fill-column. |
;; Avoid moving comments past the fill-column. |
465 |
(setq indent |
(unless (save-excursion (skip-chars-backward " \t") (bolp)) |
466 |
(min indent |
(setq indent |
467 |
(+ (current-column) |
(min indent |
468 |
(- fill-column |
(+ (current-column) |
469 |
(save-excursion (end-of-line) (current-column)))))) |
(- fill-column |
470 |
|
(save-excursion (end-of-line) (current-column))))))) |
471 |
(if (= (current-column) indent) |
(if (= (current-column) indent) |
472 |
(goto-char begpos) |
(goto-char begpos) |
473 |
;; If that's different from current, change it. |
;; If that's different from current, change it. |