For instance:
A := 1; -- A multi-line comment
- -- aligned if ada-indent-align-comments is t"
+ -- aligned if `ada-indent-align-comments' is t"
:type 'boolean :group 'ada)
(defcustom ada-indent-comment-as-code t
(line-beginning-position) (point))))
(or (ada-in-string-p parse-result) (ada-in-comment-p parse-result)))
+(defsubst ada-in-numeric-literal-p ()
+ "Return t if point is after a prefix of a numeric literal."
+ (looking-back "\\([0-9]+#[0-9a-fA-F_]+\\)"))
;;------------------------------------------------------------------
;; Contextual menus
(eq (char-syntax (char-before)) ?w)
;; if in a string or a comment
(not (ada-in-string-or-comment-p))
+ ;; if in a numeric literal
+ (not (ada-in-numeric-literal-p))
)
(if (save-excursion
(forward-word -1)
(defun ada-in-paramlist-p ()
- "Return t if point is inside the parameter-list of a declaration,
-but not a subprogram call or aggregate."
+ "Return t if point is inside the parameter-list of a declaration, but not a subprogram call or aggregate."
(save-excursion
(and
(ada-search-ignore-string-comment "(\\|)" t nil t)