Mercurial > emacs
comparison lisp/progmodes/ada-mode.el @ 71537:2a4ed80e93ba
(ada-which-compiler, ada-mode-menu, ada-compile-mouse-goto-error,
ada-deactivate-properties, ada-no-auto-case): Fix typos in docstrings.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Fri, 30 Jun 2006 08:32:19 +0000 |
parents | 2b19dbb7ecf5 |
children | c09c379b85d4 b19aaf4ab0ee 138ce2701550 |
comparison
equal
deleted
inserted
replaced
71536:e9a4b71a2f79 | 71537:2a4ed80e93ba |
---|---|
436 >>>>>Ada.Numerics; -- from ada-with-indent" | 436 >>>>>Ada.Numerics; -- from ada-with-indent" |
437 :type 'integer :group 'ada) | 437 :type 'integer :group 'ada) |
438 | 438 |
439 (defcustom ada-which-compiler 'gnat | 439 (defcustom ada-which-compiler 'gnat |
440 "*Name of the compiler to use. | 440 "*Name of the compiler to use. |
441 This will determine what features are made available through the ada-mode. | 441 This will determine what features are made available through the Ada mode. |
442 The possible choices are : | 442 The possible choices are : |
443 `gnat': Use Ada Core Technologies' Gnat compiler. Add some cross-referencing | 443 `gnat': Use Ada Core Technologies' Gnat compiler. Add some cross-referencing |
444 features | 444 features |
445 `generic': Use a generic compiler" | 445 `generic': Use a generic compiler" |
446 :type '(choice (const gnat) | 446 :type '(choice (const gnat) |
458 (defvar ada-spec-suffixes '(".ads") | 458 (defvar ada-spec-suffixes '(".ads") |
459 "List of possible suffixes for Ada spec files. | 459 "List of possible suffixes for Ada spec files. |
460 The extensions should include a `.' if needed.") | 460 The extensions should include a `.' if needed.") |
461 | 461 |
462 (defvar ada-mode-menu (make-sparse-keymap "Ada") | 462 (defvar ada-mode-menu (make-sparse-keymap "Ada") |
463 "Menu for ada-mode.") | 463 "Menu for Ada mode.") |
464 | 464 |
465 (defvar ada-mode-map (make-sparse-keymap) | 465 (defvar ada-mode-map (make-sparse-keymap) |
466 "Local keymap used for Ada mode.") | 466 "Local keymap used for Ada mode.") |
467 | 467 |
468 (defvar ada-mode-abbrev-table nil | 468 (defvar ada-mode-abbrev-table nil |
726 ;;------------------------------------------------------------ | 726 ;;------------------------------------------------------------ |
727 ;; Support for compile.el | 727 ;; Support for compile.el |
728 ;;------------------------------------------------------------ | 728 ;;------------------------------------------------------------ |
729 | 729 |
730 (defun ada-compile-mouse-goto-error () | 730 (defun ada-compile-mouse-goto-error () |
731 "Mouse interface for ada-compile-goto-error." | 731 "Mouse interface for `ada-compile-goto-error'." |
732 (interactive) | 732 (interactive) |
733 (mouse-set-point last-input-event) | 733 (mouse-set-point last-input-event) |
734 (ada-compile-goto-error (point)) | 734 (ada-compile-goto-error (point)) |
735 ) | 735 ) |
736 | 736 |
904 (delete-char (cadar change)) | 904 (delete-char (cadar change)) |
905 (insert (caddar change)) | 905 (insert (caddar change)) |
906 (setq change (cdr change))))))) | 906 (setq change (cdr change))))))) |
907 | 907 |
908 (defun ada-deactivate-properties () | 908 (defun ada-deactivate-properties () |
909 "Deactivate ada-mode's properties handling. | 909 "Deactivate Ada mode's properties handling. |
910 This would be a duplicate of font-lock if both are used at the same time." | 910 This would be a duplicate of font-lock if both are used at the same time." |
911 (remove-hook 'after-change-functions 'ada-after-change-function t)) | 911 (remove-hook 'after-change-functions 'ada-after-change-function t)) |
912 | 912 |
913 (defun ada-initialize-properties () | 913 (defun ada-initialize-properties () |
914 "Initialize some special text properties in the whole buffer. | 914 "Initialize some special text properties in the whole buffer. |
975 (or (ada-in-string-p parse-result) (ada-in-comment-p parse-result))) | 975 (or (ada-in-string-p parse-result) (ada-in-comment-p parse-result))) |
976 | 976 |
977 | 977 |
978 ;;------------------------------------------------------------------ | 978 ;;------------------------------------------------------------------ |
979 ;; Contextual menus | 979 ;; Contextual menus |
980 ;; The Ada-mode comes with contextual menus, bound by default to the right | 980 ;; The Ada mode comes with contextual menus, bound by default to the right |
981 ;; mouse button. | 981 ;; mouse button. |
982 ;; Add items to this menu by modifying `ada-contextual-menu'. Note that the | 982 ;; Add items to this menu by modifying `ada-contextual-menu'. Note that the |
983 ;; variable `ada-contextual-menu-on-identifier' is set automatically to t | 983 ;; variable `ada-contextual-menu-on-identifier' is set automatically to t |
984 ;; if the mouse button was pressed on an identifier. | 984 ;; if the mouse button was pressed on an identifier. |
985 ;;------------------------------------------------------------------ | 985 ;;------------------------------------------------------------------ |
1417 (symbol-value 'mark-active)))) | 1417 (symbol-value 'mark-active)))) |
1418 | 1418 |
1419 | 1419 |
1420 ;;----------------------------------------------------------------- | 1420 ;;----------------------------------------------------------------- |
1421 ;; auto-casing | 1421 ;; auto-casing |
1422 ;; Since Ada is case-insensitive, the Ada-mode provides an extensive set of | 1422 ;; Since Ada is case-insensitive, the Ada mode provides an extensive set of |
1423 ;; functions to auto-case identifiers, keywords, ... | 1423 ;; functions to auto-case identifiers, keywords, ... |
1424 ;; The basic rules for autocasing are defined through the variables | 1424 ;; The basic rules for autocasing are defined through the variables |
1425 ;; `ada-case-attribute', `ada-case-keyword' and `ada-case-identifier'. These | 1425 ;; `ada-case-attribute', `ada-case-keyword' and `ada-case-identifier'. These |
1426 ;; are references to the functions that will do the actual casing. | 1426 ;; are references to the functions that will do the actual casing. |
1427 ;; | 1427 ;; |
1764 (insert-char (upcase (following-char)) 1) | 1764 (insert-char (upcase (following-char)) 1) |
1765 (delete-char 1))))) | 1765 (delete-char 1))))) |
1766 | 1766 |
1767 (defun ada-no-auto-case (&optional arg) | 1767 (defun ada-no-auto-case (&optional arg) |
1768 "Do nothing. | 1768 "Do nothing. |
1769 This function can be used for the auto-casing variables in the ada-mode, to | 1769 This function can be used for the auto-casing variables in the Ada mode, to |
1770 adapt to unusal auto-casing schemes. Since it does nothing, you can for | 1770 adapt to unusal auto-casing schemes. Since it does nothing, you can for |
1771 instance use it for `ada-case-identifier' if you don't want any special | 1771 instance use it for `ada-case-identifier' if you don't want any special |
1772 auto-casing for identifiers, whereas keywords have to be lower-cased. | 1772 auto-casing for identifiers, whereas keywords have to be lower-cased. |
1773 See also `ada-auto-case' to disable auto casing altogether." | 1773 See also `ada-auto-case' to disable auto casing altogether." |
1774 ) | 1774 ) |
2120 ;; - position of reference in the buffer | 2120 ;; - position of reference in the buffer |
2121 ;; - offset to indent from this position (can also be a symbol or a list | 2121 ;; - offset to indent from this position (can also be a symbol or a list |
2122 ;; that are evaluated) | 2122 ;; that are evaluated) |
2123 ;; Thus the total indentation for a line is the column number of the reference | 2123 ;; Thus the total indentation for a line is the column number of the reference |
2124 ;; position plus whatever value the evaluation of the second element provides. | 2124 ;; position plus whatever value the evaluation of the second element provides. |
2125 ;; This mechanism is used so that the ada-mode can "explain" how the | 2125 ;; This mechanism is used so that the Ada mode can "explain" how the |
2126 ;; indentation was calculated, by showing which variables were used. | 2126 ;; indentation was calculated, by showing which variables were used. |
2127 ;; | 2127 ;; |
2128 ;; The indentation itself is done in only one pass: first we try to guess in | 2128 ;; The indentation itself is done in only one pass: first we try to guess in |
2129 ;; what context we are by looking at the following keyword or punctuation | 2129 ;; what context we are by looking at the following keyword or punctuation |
2130 ;; sign. If nothing remarkable is found, just try to guess the indentation | 2130 ;; sign. If nothing remarkable is found, just try to guess the indentation |
5266 (message | 5266 (message |
5267 "Use M-x widen to get back to full visibility in the buffer")))) | 5267 "Use M-x widen to get back to full visibility in the buffer")))) |
5268 | 5268 |
5269 ;; --------------------------------------------------------- | 5269 ;; --------------------------------------------------------- |
5270 ;; Automatic generation of code | 5270 ;; Automatic generation of code |
5271 ;; The Ada-mode has a set of function to automatically generate a subprogram | 5271 ;; The Ada mode has a set of function to automatically generate a subprogram |
5272 ;; or package body from its spec. | 5272 ;; or package body from its spec. |
5273 ;; These function only use a primary and basic algorithm, this could use a | 5273 ;; These function only use a primary and basic algorithm, this could use a |
5274 ;; lot of improvement. | 5274 ;; lot of improvement. |
5275 ;; When the user is using GNAT, we rather use gnatstub to generate an accurate | 5275 ;; When the user is using GNAT, we rather use gnatstub to generate an accurate |
5276 ;; body. | 5276 ;; body. |
5438 (ada-add-extensions ".ads.dg" ".adb.dg")) | 5438 (ada-add-extensions ".ads.dg" ".adb.dg")) |
5439 | 5439 |
5440 ;; Read the special cases for exceptions | 5440 ;; Read the special cases for exceptions |
5441 (ada-case-read-exceptions) | 5441 (ada-case-read-exceptions) |
5442 | 5442 |
5443 ;; Setup auto-loading of the other ada-mode files. | 5443 ;; Setup auto-loading of the other Ada mode files. |
5444 (if (equal ada-which-compiler 'gnat) | 5444 (if (equal ada-which-compiler 'gnat) |
5445 (progn | 5445 (progn |
5446 (autoload 'ada-change-prj "ada-xref" nil t) | 5446 (autoload 'ada-change-prj "ada-xref" nil t) |
5447 (autoload 'ada-check-current "ada-xref" nil t) | 5447 (autoload 'ada-check-current "ada-xref" nil t) |
5448 (autoload 'ada-compile-application "ada-xref" nil t) | 5448 (autoload 'ada-compile-application "ada-xref" nil t) |