diff options
| author | Richard M. Stallman | 1995-02-09 00:17:31 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-02-09 00:17:31 +0000 |
| commit | a681b2a1c52951c661b68a52c1ec8f76aa969238 (patch) | |
| tree | 372a91cbb68390b1844c2b2992f9d582caee5770 | |
| parent | 02c80ac26a14d800ac7499c633d2dbe07872fecb (diff) | |
| download | emacs-a681b2a1c52951c661b68a52c1ec8f76aa969238.tar.gz emacs-a681b2a1c52951c661b68a52c1ec8f76aa969238.zip | |
Add autoload cookie.
(ada-mode-map): Don't define C-m, M-a, M-e, M-q.
Don't define M-q.
(ada-mode): Set fill-paragraph-function locally.
(ada-fill-comment-paragraph): Return t.
(ada-gen-make-bodyfile): Add missing backslash.
| -rw-r--r-- | lisp/progmodes/ada-mode.el | 42 |
1 files changed, 16 insertions, 26 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 5ff506ece49..9a6f2d7816d 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el | |||
| @@ -25,19 +25,6 @@ | |||
| 25 | ;;; indenting code and support for code browsing (see ada-xref). | 25 | ;;; indenting code and support for code browsing (see ada-xref). |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | ;;; COMMENTARY | ||
| 29 | ;;; ========== | ||
| 30 | ;;; Put the ada-mode.el file in your load-path (for .el files) and | ||
| 31 | ;;; optionally byte compile it. It becomes a lot faster, if byte | ||
| 32 | ;;; compiled. Don't care about the warnings; they are harmless. | ||
| 33 | ;;; | ||
| 34 | ;;; To make emacs start up Ada Mode when loading a ada source, add | ||
| 35 | ;;; these lines to your .emacs: | ||
| 36 | ;;; | ||
| 37 | ;;; (autoload 'ada-mode "ada-mode" nil t) | ||
| 38 | ;;; (setq auto-mode-alist (cons '("\\.ad[abs]$" . ada-mode) | ||
| 39 | ;;; auto-mode-alist)) | ||
| 40 | |||
| 41 | ;;; USAGE | 28 | ;;; USAGE |
| 42 | ;;; ===== | 29 | ;;; ===== |
| 43 | ;;; If you have modified your startup file as described above, emacs | 30 | ;;; If you have modified your startup file as described above, emacs |
| @@ -122,11 +109,11 @@ | |||
| 122 | ;;; LCD Archive Entry: | 109 | ;;; LCD Archive Entry: |
| 123 | ;;; ada-mode|Rolf Ebert|<ebert@inf.enst.fr> | 110 | ;;; ada-mode|Rolf Ebert|<ebert@inf.enst.fr> |
| 124 | ;;; |Major-mode for Ada | 111 | ;;; |Major-mode for Ada |
| 125 | ;;; |$Date: 1994/11/28 12:12:08 $|$Revision: 2.10 $| | 112 | ;;; |$Date: 1995/02/09 00:01:34 $|$Revision: 1.1 $| |
| 126 | 113 | ||
| 127 | 114 | ||
| 128 | (defconst ada-mode-version (substring "$Revision: 2.10 $" 11 -2) | 115 | (defconst ada-mode-version (substring "$Revision: 1.1 $" 11 -2) |
| 129 | "$Id: ada-mode.el,v 2.10 1994/11/28 12:12:08 re Exp $ | 116 | "$Id: ada-mode.el,v 1.1 1995/02/09 00:01:34 rms Exp rms $ |
| 130 | 117 | ||
| 131 | Report bugs to: Rolf Ebert <ebert@inf.enst.fr>") | 118 | Report bugs to: Rolf Ebert <ebert@inf.enst.fr>") |
| 132 | 119 | ||
| @@ -370,6 +357,7 @@ exception\\|declare\\|generic\\|private\\)\\>\\)" | |||
| 370 | ) | 357 | ) |
| 371 | 358 | ||
| 372 | 359 | ||
| 360 | ;;;###autoload | ||
| 373 | (defun ada-mode () | 361 | (defun ada-mode () |
| 374 | "Ada Mode is the major mode for editing Ada code. | 362 | "Ada Mode is the major mode for editing Ada code. |
| 375 | 363 | ||
| @@ -450,6 +438,9 @@ If you use ada-xref.el: | |||
| 450 | (make-local-variable 'case-fold-search) | 438 | (make-local-variable 'case-fold-search) |
| 451 | (setq case-fold-search t) | 439 | (setq case-fold-search t) |
| 452 | 440 | ||
| 441 | (make-local-variable 'fill-paragraph-function) | ||
| 442 | (setq fill-paragraph-function 'ada-fill-comment-paragraph) | ||
| 443 | |||
| 453 | (make-local-variable 'font-lock-defaults) | 444 | (make-local-variable 'font-lock-defaults) |
| 454 | (setq font-lock-defaults '(ada-font-lock-keywords nil t ((?\_ . "w")))) | 445 | (setq font-lock-defaults '(ada-font-lock-keywords nil t ((?\_ . "w")))) |
| 455 | 446 | ||
| @@ -640,7 +631,8 @@ If ada-indent-comment-as code is non-nil, the paragraph is idented." | |||
| 640 | (delete-char 1)) | 631 | (delete-char 1)) |
| 641 | 632 | ||
| 642 | (message "filling comment paragraph ... done") | 633 | (message "filling comment paragraph ... done") |
| 643 | (goto-char opos))) | 634 | (goto-char opos)) |
| 635 | t) | ||
| 644 | 636 | ||
| 645 | 637 | ||
| 646 | ;;;--------------------------------;;; | 638 | ;;;--------------------------------;;; |
| @@ -3395,7 +3387,6 @@ Searches through former 'with' statements for possible completions." | |||
| 3395 | (setq ada-mode-map (make-sparse-keymap)) | 3387 | (setq ada-mode-map (make-sparse-keymap)) |
| 3396 | 3388 | ||
| 3397 | ;; Indentation and Formatting | 3389 | ;; Indentation and Formatting |
| 3398 | (define-key ada-mode-map "\C-M" 'newline) | ||
| 3399 | (define-key ada-mode-map "\C-j" 'ada-indent-newline-indent) | 3390 | (define-key ada-mode-map "\C-j" 'ada-indent-newline-indent) |
| 3400 | (define-key ada-mode-map "\t" 'ada-tab) | 3391 | (define-key ada-mode-map "\t" 'ada-tab) |
| 3401 | (define-key ada-mode-map "\C-c\C-l" 'ada-indent-region) | 3392 | (define-key ada-mode-map "\C-c\C-l" 'ada-indent-region) |
| @@ -3403,13 +3394,14 @@ Searches through former 'with' statements for possible completions." | |||
| 3403 | (define-key ada-mode-map [S-tab] 'ada-untab) | 3394 | (define-key ada-mode-map [S-tab] 'ada-untab) |
| 3404 | (define-key ada-mode-map "\C-c\C-f" 'ada-format-paramlist) | 3395 | (define-key ada-mode-map "\C-c\C-f" 'ada-format-paramlist) |
| 3405 | (define-key ada-mode-map "\C-c\C-p" 'ada-call-pretty-printer) | 3396 | (define-key ada-mode-map "\C-c\C-p" 'ada-call-pretty-printer) |
| 3406 | (define-key ada-mode-map "\M-q" 'ada-fill-comment-paragraph) | 3397 | ;;; We don't want to make meta-characters case-specific. |
| 3407 | (define-key ada-mode-map "\M-Q" 'ada-fill-comment-paragraph-justify) | 3398 | ;;; (define-key ada-mode-map "\M-Q" 'ada-fill-comment-paragraph-justify) |
| 3408 | (define-key ada-mode-map "\M-\C-q" 'ada-fill-comment-paragraph-postfix) | 3399 | (define-key ada-mode-map "\M-\C-q" 'ada-fill-comment-paragraph-postfix) |
| 3409 | 3400 | ||
| 3410 | ;; Movement | 3401 | ;; Movement |
| 3411 | (define-key ada-mode-map "\M-e" 'ada-next-procedure) | 3402 | ;;; It isn't good to redefine these. What should be done instead? -- rms. |
| 3412 | (define-key ada-mode-map "\M-a" 'ada-previous-procedure) | 3403 | ;;; (define-key ada-mode-map "\M-e" 'ada-next-procedure) |
| 3404 | ;;; (define-key ada-mode-map "\M-a" 'ada-previous-procedure) | ||
| 3413 | (define-key ada-mode-map "\M-\C-e" 'ada-next-package) | 3405 | (define-key ada-mode-map "\M-\C-e" 'ada-next-package) |
| 3414 | (define-key ada-mode-map "\M-\C-a" 'ada-previous-package) | 3406 | (define-key ada-mode-map "\M-\C-a" 'ada-previous-package) |
| 3415 | (define-key ada-mode-map "\C-c\C-a" 'ada-move-to-start) | 3407 | (define-key ada-mode-map "\C-c\C-a" 'ada-move-to-start) |
| @@ -3715,7 +3707,7 @@ This does a lot more highlighting.") | |||
| 3715 | ;; look for next non WS | 3707 | ;; look for next non WS |
| 3716 | (backward-char) | 3708 | (backward-char) |
| 3717 | (re-search-forward "[ ]*.") | 3709 | (re-search-forward "[ ]*.") |
| 3718 | (if (char-equal (char-after (match-end 0)) ?;) | 3710 | (if (char-equal (char-after (match-end 0)) ?\;) |
| 3719 | (delete-char 1) ;; delete the ';' | 3711 | (delete-char 1) ;; delete the ';' |
| 3720 | ;; else | 3712 | ;; else |
| 3721 | ;; find ');' or 'return <id> ;' | 3713 | ;; find ');' or 'return <id> ;' |
| @@ -3783,6 +3775,4 @@ to the current specs." | |||
| 3783 | 3775 | ||
| 3784 | (provide 'ada-mode) | 3776 | (provide 'ada-mode) |
| 3785 | 3777 | ||
| 3786 | ;;; package ada-mode ends here | 3778 | ;;; ada-mode.el ends here |
| 3787 | |||
| 3788 | |||