X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/afb5d709049eb40291fa0126d48efca2f7061a10..36045ff3301341130c1e2048a0fa73ec72fc68bf:/lisp/progmodes/ada-mode.el diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 6e7af70a68..95f9f6babf 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -257,7 +257,7 @@ Note that indentation is calculated only if `ada-indent-comment-as-code' is t. 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 @@ -1017,6 +1017,9 @@ If PARSE-RESULT is non-nil, use it instead of calling `parse-partial-sexp'." (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 @@ -1606,6 +1609,8 @@ If FORCE-IDENTIFIER is non-nil then also adjust keyword as identifier." (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) @@ -4163,8 +4168,7 @@ Return nil if the private is part of the package name, as in (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)