Mercurial > emacs
comparison lisp/progmodes/ada-mode.el @ 41036:aaa6f44a1b96
(ada-fill-comment-prefix): Doc fix.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 14 Nov 2001 03:49:57 +0000 |
parents | 39ee7e7e2200 |
children | 6204eb16d008 |
comparison
equal
deleted
inserted
replaced
41035:787bfba12bec | 41036:aaa6f44a1b96 |
---|---|
5 | 5 |
6 ;; Author: Rolf Ebert <ebert@inf.enst.fr> | 6 ;; Author: Rolf Ebert <ebert@inf.enst.fr> |
7 ;; Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de> | 7 ;; Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de> |
8 ;; Emmanuel Briot <briot@gnat.com> | 8 ;; Emmanuel Briot <briot@gnat.com> |
9 ;; Maintainer: Emmanuel Briot <briot@gnat.com> | 9 ;; Maintainer: Emmanuel Briot <briot@gnat.com> |
10 ;; Ada Core Technologies's version: $Revision: 1.43 $ | 10 ;; Ada Core Technologies's version: $Revision: 1.44 $ |
11 ;; Keywords: languages ada | 11 ;; Keywords: languages ada |
12 | 12 |
13 ;; This file is part of GNU Emacs. | 13 ;; This file is part of GNU Emacs. |
14 | 14 |
15 ;; GNU Emacs is free software; you can redistribute it and/or modify | 15 ;; GNU Emacs is free software; you can redistribute it and/or modify |
281 "*Non-nil means indent according to the innermost open parenthesis." | 281 "*Non-nil means indent according to the innermost open parenthesis." |
282 :type 'boolean :group 'ada) | 282 :type 'boolean :group 'ada) |
283 | 283 |
284 (defcustom ada-fill-comment-prefix "-- " | 284 (defcustom ada-fill-comment-prefix "-- " |
285 "*Text inserted in the first columns when filling a comment paragraph. | 285 "*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 | 286 Note: if you modify this variable, you will have to invoke `ada-mode' |
287 reread this variable." | 287 again to take account of the new value." |
288 :type 'string :group 'ada) | 288 :type 'string :group 'ada) |
289 | 289 |
290 (defcustom ada-fill-comment-postfix " --" | 290 (defcustom ada-fill-comment-postfix " --" |
291 "*Text inserted at the end of each line when filling a comment paragraph. | 291 "*Text inserted at the end of each line when filling a comment paragraph. |
292 with `ada-fill-comment-paragraph-postfix'." | 292 with `ada-fill-comment-paragraph-postfix'." |
4147 (beginning-of-line) | 4147 (beginning-of-line) |
4148 (setq to (point-marker)) | 4148 (setq to (point-marker)) |
4149 (goto-char opos) | 4149 (goto-char opos) |
4150 | 4150 |
4151 ;; Find beginning of paragraph | 4151 ;; Find beginning of paragraph |
4152 (back-to-indentation) | 4152 (beginning-of-line) |
4153 (while (and (not (bobp)) (looking-at "--[ \t]*[^ \t\n]")) | 4153 (while (and (not (bobp)) (looking-at "[ \t]*--[ \t]*[^ \t\n]")) |
4154 (forward-line -1) | 4154 (forward-line -1)) |
4155 (back-to-indentation)) | 4155 ;; If we found a paragraph-separating line, |
4156 | 4156 ;; don't actually include it in the paragraph. |
4157 ;; We want one line to above the first one, unless we are at the beginning | 4157 (unless (looking-at "[ \t]*--[ \t]*[^ \t\n]") |
4158 ;; of the buffer | |
4159 (unless (bobp) | |
4160 (forward-line 1)) | 4158 (forward-line 1)) |
4161 (beginning-of-line) | |
4162 (setq from (point-marker)) | 4159 (setq from (point-marker)) |
4163 | 4160 |
4164 ;; Calculate the indentation we will need for the paragraph | 4161 ;; Calculate the indentation we will need for the paragraph |
4165 (back-to-indentation) | 4162 (back-to-indentation) |
4166 (setq indent (current-column)) | 4163 (setq indent (current-column)) |