aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorChong Yidong2010-02-08 18:27:29 -0500
committerChong Yidong2010-02-08 18:27:29 -0500
commitf29fd8694cc85e5d6ba7adad3930c9cb27786d74 (patch)
tree63a6043a579b45ce5fcd95db48a4bc9cb0edf0ab /lisp
parent64f3bde25718fd86a54ff3d1e357248ea0024b4a (diff)
downloademacs-f29fd8694cc85e5d6ba7adad3930c9cb27786d74.tar.gz
emacs-f29fd8694cc85e5d6ba7adad3930c9cb27786d74.zip
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')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/progmodes/ada-mode.el5
2 files changed, 11 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 95bed4244af..6d4c7062745 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12010-02-08 Jose E. Marchesi <jemarch@gnu.org>
2
3 * progmodes/ada-mode.el (ada-in-numeric-literal-p): New function.
4 (ada-adjust-case): Don't adjust case in hexadecimal number
5 literals.
6
12010-02-08 Kenichi Handa <handa@m17n.org> 72010-02-08 Kenichi Handa <handa@m17n.org>
2 8
3 * international/mule-util.el (with-coding-priority): Add autoload 9 * international/mule-util.el (with-coding-priority): Add autoload
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'."
1017 (line-beginning-position) (point)))) 1017 (line-beginning-position) (point))))
1018 (or (ada-in-string-p parse-result) (ada-in-comment-p parse-result))) 1018 (or (ada-in-string-p parse-result) (ada-in-comment-p parse-result)))
1019 1019
1020(defsubst ada-in-numeric-literal-p ()
1021 "Return t if point is after a prefix of a numeric literal."
1022 (looking-back "\\([0-9]+#[0-9a-fA-F_]+\\)"))
1020 1023
1021;;------------------------------------------------------------------ 1024;;------------------------------------------------------------------
1022;; Contextual menus 1025;; Contextual menus
@@ -1606,6 +1609,8 @@ If FORCE-IDENTIFIER is non-nil then also adjust keyword as identifier."
1606 (eq (char-syntax (char-before)) ?w) 1609 (eq (char-syntax (char-before)) ?w)
1607 ;; if in a string or a comment 1610 ;; if in a string or a comment
1608 (not (ada-in-string-or-comment-p)) 1611 (not (ada-in-string-or-comment-p))
1612 ;; if in a numeric literal
1613 (not (ada-in-numeric-literal-p))
1609 ) 1614 )
1610 (if (save-excursion 1615 (if (save-excursion
1611 (forward-word -1) 1616 (forward-word -1)