diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2010-02-08 18:27:29 -0500 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2010-02-08 18:27:29 -0500 |
commit | f29fd8694cc85e5d6ba7adad3930c9cb27786d74 (patch) | |
tree | 63a6043a579b45ce5fcd95db48a4bc9cb0edf0ab /lisp/progmodes/ada-mode.el | |
parent | 64f3bde25718fd86a54ff3d1e357248ea0024b4a (diff) | |
download | emacs-f29fd8694cc85e5d6ba7adad3930c9cb27786d74.tar.gz |
Fix ada-mode handling of number literals.
* progmodes/ada-mode.el (ada-in-numeric-literal-p): New function.
(ada-adjust-case): Don't adjust case in hexadecimal number literals.
Diffstat (limited to 'lisp/progmodes/ada-mode.el')
-rw-r--r-- | lisp/progmodes/ada-mode.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index a08e31e2016..95f9f6babf3 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -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) |