;; should be loaded before the ada-mode, which will then setup some variables
;; to improve the support for Ada code.
;; Here is the list of these modes:
-;; `which-function-mode': Display the name of the subprogram the cursor is
-;; in in the mode line.
+;; `which-function-mode': Display in the modeline the name of the subprogram
+;; the cursor is in.
;; `outline-mode': Provides the capability to collapse or expand the code
;; for specific language constructs, for instance if you want to hide the
;; code corresponding to a subprogram
;; to be considered as part of a word or not.
;; Some characters may have multiple meanings depending on the context:
;; - ' is either the beginning of a constant character or an attribute
-;; - # is either part of a based litteral or a gnatprep statement.
+;; - # is either part of a based literal or a gnatprep statement.
;; - " starts a string, but not if inside a constant character.
;; - ( and ) should be ignored if inside a constant character.
;; Thus their syntax property is changed automatically, and we can still use
(unless modified
(restore-buffer-modified-p nil))))
-(defun ada-after-change-function (beg end old-len)
+(defun ada-after-change-function (beg end _old-len)
"Called when the region between BEG and END was changed in the buffer.
OLD-LEN indicates what the length of the replaced text was."
(save-excursion
'( ?` ?_ ?# ?% ?& ?* ?( ?) ?- ?= ?+
?| ?\; ?: ?' ?\" ?< ?, ?. ?> ?/ ?\n 32 ?\r )))
-(defun ada-loose-case-word (&optional arg)
+(defun ada-loose-case-word (&optional _arg)
"Upcase first letter and letters following `_' in the following word.
No other letter is modified.
ARG is ignored, and is there for compatibility with `capitalize-word' only."
(insert-char (upcase (following-char)) 1)
(delete-char 1)))))
-(defun ada-no-auto-case (&optional arg)
+(defun ada-no-auto-case (&optional _arg)
"Do nothing. ARG is ignored.
This function can be used for the auto-casing variables in Ada mode, to
-adapt to unusal auto-casing schemes. Since it does nothing, you can for
+adapt to unusual auto-casing schemes. Since it does nothing, you can for
instance use it for `ada-case-identifier' if you don't want any special
auto-casing for identifiers, whereas keywords have to be lower-cased.
See also `ada-auto-case' to disable auto casing altogether."
nil)
-(defun ada-capitalize-word (&optional arg)
+(defun ada-capitalize-word (&optional _arg)
"Upcase first letter and letters following '_', lower case other letters.
ARG is ignored, and is there for compatibility with `capitalize-word' only."
(interactive)
((eq ada-tab-policy 'always-tab) (error "Not implemented"))
))
-(defun ada-untab (arg)
+(defun ada-untab (_arg)
"Delete leading indenting according to `ada-tab-policy'."
;; FIXME: ARG is ignored
(interactive "P")
;; Support for narrow-to-region
;; ---------------------------------------------------------
-(defun ada-narrow-to-defun (&optional arg)
+(defun ada-narrow-to-defun (&optional _arg)
"Make text outside current subprogram invisible.
The subprogram visible is the one that contains or follow point.
Optional ARG is ignored.