30 |
|
|
31 |
;;; Bugs: |
;;; Bugs: |
32 |
|
|
|
;; - comment-indent on /* */ jumps to /* ><*/ instead of /* >< */. |
|
33 |
;; - nested comments in sgml-mode are not properly quoted. |
;; - nested comments in sgml-mode are not properly quoted. |
34 |
;; - single-char nestable comment-start can only do the "\\s<+" stuff |
;; - single-char nestable comment-start can only do the "\\s<+" stuff |
35 |
;; if the corresponding closing marker happens to be right. |
;; if the corresponding closing marker happens to be right. |
449 |
(begpos (comment-search-forward eolpos t)) |
(begpos (comment-search-forward eolpos t)) |
450 |
cpos indent) |
cpos indent) |
451 |
;; An existing comment? |
;; An existing comment? |
452 |
(if begpos (setq cpos (point-marker)) |
(if begpos |
453 |
|
(progn |
454 |
|
(if (and (not (looking-at "[\t\n ]")) |
455 |
|
(looking-at comment-end-skip)) |
456 |
|
;; The comment is empty and we have skipped all its space |
457 |
|
;; and landed right before the comment-ender: |
458 |
|
;; Go back to the middle of the space. |
459 |
|
(forward-char (/ (skip-chars-backward " \t") -2))) |
460 |
|
(setq cpos (point-marker))) |
461 |
;; If none, insert one. |
;; If none, insert one. |
462 |
(save-excursion |
(save-excursion |
463 |
;; Some comment-indent-function insist on not moving comments that |
;; Some comment-indent-function insist on not moving comments that |