283 |
|
|
284 |
(defcustom ada-fill-comment-prefix "-- " |
(defcustom ada-fill-comment-prefix "-- " |
285 |
"*Text inserted in the first columns when filling a comment paragraph. |
"*Text inserted in the first columns when filling a comment paragraph. |
286 |
Note: if you modify this variable, you will have to restart the `ada-mode' to |
Note: if you modify this variable, you will have to invoke `ada-mode' |
287 |
reread this variable." |
again to take account of the new value." |
288 |
:type 'string :group 'ada) |
:type 'string :group 'ada) |
289 |
|
|
290 |
(defcustom ada-fill-comment-postfix " --" |
(defcustom ada-fill-comment-postfix " --" |
4149 |
(goto-char opos) |
(goto-char opos) |
4150 |
|
|
4151 |
;; Find beginning of paragraph |
;; Find beginning of paragraph |
|
(back-to-indentation) |
|
|
(while (and (not (bobp)) (looking-at "--[ \t]*[^ \t\n]")) |
|
|
(forward-line -1) |
|
|
(back-to-indentation)) |
|
|
|
|
|
;; We want one line to above the first one, unless we are at the beginning |
|
|
;; of the buffer |
|
|
(unless (bobp) |
|
|
(forward-line 1)) |
|
4152 |
(beginning-of-line) |
(beginning-of-line) |
4153 |
|
(while (and (not (bobp)) (looking-at "[ \t]*--[ \t]*[^ \t\n]")) |
4154 |
|
(forward-line -1)) |
4155 |
|
;; If we found a paragraph-separating line, |
4156 |
|
;; don't actually include it in the paragraph. |
4157 |
|
(unless (looking-at "[ \t]*--[ \t]*[^ \t\n]") |
4158 |
|
(forward-line 1)) |
4159 |
(setq from (point-marker)) |
(setq from (point-marker)) |
4160 |
|
|
4161 |
;; Calculate the indentation we will need for the paragraph |
;; Calculate the indentation we will need for the paragraph |