[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99471: Fix ada-mode handling of numb
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99471: Fix ada-mode handling of number literals. |
Date: |
Mon, 08 Feb 2010 18:27:29 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99471
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Mon 2010-02-08 18:27:29 -0500
message:
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.
modified:
lisp/ChangeLog
lisp/progmodes/ada-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-02-08 07:08:18 +0000
+++ b/lisp/ChangeLog 2010-02-08 23:27:29 +0000
@@ -1,3 +1,9 @@
+2010-02-08 Jose E. Marchesi <address@hidden>
+
+ * 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 <address@hidden>
* international/mule-util.el (with-coding-priority): Add autoload
=== modified file 'lisp/progmodes/ada-mode.el'
--- a/lisp/progmodes/ada-mode.el 2010-01-23 12:34:52 +0000
+++ b/lisp/progmodes/ada-mode.el 2010-02-08 23:27:29 +0000
@@ -1017,6 +1017,9 @@
(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 @@
(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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99471: Fix ada-mode handling of number literals.,
Chong Yidong <=