From 10bcf543b710654af1d3857c3b4b5fdcb8f27621 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 14 Nov 2001 03:49:57 +0000 Subject: [PATCH] (ada-fill-comment-prefix): Doc fix. --- lisp/progmodes/ada-mode.el | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index b927a7019d4..85530df2284 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -7,7 +7,7 @@ ;; Markus Heritsch ;; Emmanuel Briot ;; Maintainer: Emmanuel Briot -;; Ada Core Technologies's version: $Revision: 1.43 $ +;; Ada Core Technologies's version: $Revision: 1.44 $ ;; Keywords: languages ada ;; This file is part of GNU Emacs. @@ -283,8 +283,8 @@ An example is: (defcustom ada-fill-comment-prefix "-- " "*Text inserted in the first columns when filling a comment paragraph. -Note: if you modify this variable, you will have to restart the `ada-mode' to -reread this variable." +Note: if you modify this variable, you will have to invoke `ada-mode' +again to take account of the new value." :type 'string :group 'ada) (defcustom ada-fill-comment-postfix " --" @@ -4149,16 +4149,13 @@ The paragraph is indented on the first line." (goto-char opos) ;; 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)) (beginning-of-line) + (while (and (not (bobp)) (looking-at "[ \t]*--[ \t]*[^ \t\n]")) + (forward-line -1)) + ;; If we found a paragraph-separating line, + ;; don't actually include it in the paragraph. + (unless (looking-at "[ \t]*--[ \t]*[^ \t\n]") + (forward-line 1)) (setq from (point-marker)) ;; Calculate the indentation we will need for the paragraph -- 2.39.5