aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2009-01-04 19:39:12 +0000
committerJuanma Barranquero2009-01-04 19:39:12 +0000
commita97af989ec26b8ad6b47c57fb2b11317675a6b1a (patch)
treef49cbd0c0684ea5328679f2d35dffd20d5281552
parent71dd9983e7b35ad960003c9e88784aefd3a3cb39 (diff)
downloademacs-a97af989ec26b8ad6b47c57fb2b11317675a6b1a.tar.gz
emacs-a97af989ec26b8ad6b47c57fb2b11317675a6b1a.zip
* progmodes/ada-mode.el (ada-mode): Simplify doc string.
(ada-get-indent-paramlist): Use ada-broken-indent instead of hard-coded 0. (ada-get-indent-loop): Fix list access bug.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/progmodes/ada-mode.el49
2 files changed, 11 insertions, 45 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e224917f3c4..0ce7070be07 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12009-01-04 Stephen Leake <stephen_leake@member.fsf.org>
2
3 * progmodes/ada-mode.el (ada-mode): Simplify doc string.
4 (ada-get-indent-paramlist): Use ada-broken-indent instead of
5 hard-coded 0.
6 (ada-get-indent-loop): Fix list access bug.
7
12009-01-04 Juanma Barranquero <lekktu@gmail.com> 82009-01-04 Juanma Barranquero <lekktu@gmail.com>
2 9
3 * emacs-lisp/lisp-mode.el (emacs-lisp-mode, lisp-mode) 10 * emacs-lisp/lisp-mode.el (emacs-lisp-mode, lisp-mode)
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index 40bbeb9fe41..af1430a90ba 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -1,7 +1,7 @@
1;;; ada-mode.el --- major-mode for editing Ada sources 1;;; ada-mode.el --- major-mode for editing Ada sources
2 2
3;; Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
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>
@@ -1106,48 +1106,7 @@ the file name."
1106 1106
1107;;;###autoload 1107;;;###autoload
1108(defun ada-mode () 1108(defun ada-mode ()
1109 "Ada mode is the major mode for editing Ada code. 1109 "Ada mode is the major mode for editing Ada code."
1110
1111Bindings are as follows: (Note: 'LFD' is control-j.)
1112\\{ada-mode-map}
1113
1114 Indent line '\\[ada-tab]'
1115 Indent line, insert newline and indent the new line. '\\[newline-and-indent]'
1116
1117 Re-format the parameter-list point is in '\\[ada-format-paramlist]'
1118 Indent all lines in region '\\[ada-indent-region]'
1119
1120 Adjust case of identifiers and keywords in region '\\[ada-adjust-case-region]'
1121 Adjust case of identifiers and keywords in buffer '\\[ada-adjust-case-buffer]'
1122
1123 Fill comment paragraph, justify and append postfix '\\[fill-paragraph]'
1124
1125 Next func/proc/task '\\[ada-next-procedure]' Previous func/proc/task '\\[ada-previous-procedure]'
1126 Next package '\\[ada-next-package]' Previous package '\\[ada-previous-package]'
1127
1128 Goto matching start of current 'end ...;' '\\[ada-move-to-start]'
1129 Goto end of current block '\\[ada-move-to-end]'
1130
1131Comments are handled using standard GNU Emacs conventions, including:
1132 Start a comment '\\[indent-for-comment]'
1133 Comment region '\\[comment-region]'
1134 Uncomment region '\\[ada-uncomment-region]'
1135 Continue comment on next line '\\[indent-new-comment-line]'
1136
1137If you use imenu.el:
1138 Display index-menu of functions and procedures '\\[imenu]'
1139
1140If you use find-file.el:
1141 Switch to other file (Body <-> Spec) '\\[ff-find-other-file]'
1142 or '\\[ff-mouse-find-other-file]
1143 Switch to other file in other window '\\[ada-ff-other-window]'
1144 or '\\[ff-mouse-find-other-file-other-window]
1145 If you use this function in a spec and no body is available, it gets created with body stubs.
1146
1147If you use ada-xref.el:
1148 Goto declaration: '\\[ada-point-and-xref]' on the identifier
1149 or '\\[ada-goto-declaration]' with point on the identifier
1150 Complete identifier: '\\[ada-complete-identifier]'."
1151 1110
1152 (interactive) 1111 (interactive)
1153 (kill-all-local-variables) 1112 (kill-all-local-variables)
@@ -2822,7 +2781,7 @@ if INITIAL-POS is non-nil, moves point to INITIAL-POS before calculation."
2822 (t 2781 (t
2823 (goto-char (cdr (ada-search-ignore-string-comment "(\\|;" t nil t))) 2782 (goto-char (cdr (ada-search-ignore-string-comment "(\\|;" t nil t)))
2824 (ada-goto-next-non-ws) 2783 (ada-goto-next-non-ws)
2825 (list (point) 0))))) 2784 (list (point) 'ada-broken-indent)))))
2826 2785
2827(defun ada-get-indent-end (orgpoint) 2786(defun ada-get-indent-end (orgpoint)
2828 "Calculate the indentation when point is just before an end statement. 2787 "Calculate the indentation when point is just before an end statement.
@@ -3191,7 +3150,7 @@ ORGPOINT is the limit position used in the calculation."
3191 (setq pos (ada-get-indent-block-start orgpoint)) 3150 (setq pos (ada-get-indent-block-start orgpoint))
3192 (if (equal label 0) 3151 (if (equal label 0)
3193 pos 3152 pos
3194 (list (+ (car pos) label) (cdr pos)))) 3153 (list (+ (car pos) label) (cadr pos))))
3195 3154
3196 ;; 3155 ;;
3197 ;; 'for'- loop (or also a for ... use statement) 3156 ;; 'for'- loop (or also a for ... use statement)