Commit f29fd869 authored by Chong Yidong's avatar Chong Yidong

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.
parent 64f3bde2
2010-02-08 Jose E. Marchesi <jemarch@gnu.org>
* progmodes/ada-mode.el (ada-in-numeric-literal-p): New function.
(ada-adjust-case): Don't adjust case in hexadecimal number
literals.
2010-02-08 Kenichi Handa <handa@m17n.org>
* international/mule-util.el (with-coding-priority): Add autoload
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment