changeset 107274:f401d10ebfb7

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Tue, 09 Feb 2010 00:01:14 +0000
parents d049b1b866d4 (current diff) e5188f4e7403 (diff)
children cf50b15a097b
files
diffstat 4 files changed, 21 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Feb 08 22:13:26 2010 +0000
+++ b/lisp/ChangeLog	Tue Feb 09 00:01:14 2010 +0000
@@ -1,3 +1,9 @@
+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
--- a/lisp/progmodes/ada-mode.el	Mon Feb 08 22:13:26 2010 +0000
+++ b/lisp/progmodes/ada-mode.el	Tue Feb 09 00:01:14 2010 +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)
--- a/src/ChangeLog	Mon Feb 08 22:13:26 2010 +0000
+++ b/src/ChangeLog	Tue Feb 09 00:01:14 2010 +0000
@@ -1,3 +1,8 @@
+2010-02-08  Francis Devereux  <francis@devrx.org>
+
+	* nsfont.m (nsfont_open): The system's value for the font descent
+	is negative, so round it down to avoid clipping.
+
 2010-02-06  Chong Yidong  <cyd@stupidchicken.com>
 
 	* charset.c (load_charset_map_from_file)
--- a/src/nsfont.m	Mon Feb 08 22:13:26 2010 +0000
+++ b/src/nsfont.m	Tue Feb 09 00:01:14 2010 +0000
@@ -844,8 +844,10 @@
     /* max bounds */
     font_info->max_bounds.ascent =
       lrint (hshrink * [sfont ascender] + expand * hd/2);
+    /* [sfont descender] is usually negative.  Use floor to avoid
+       clipping descenders. */
     font_info->max_bounds.descent =
-      -lrint (hshrink* [sfont descender] - expand*hd/2);
+      -lrint (floor(hshrink* [sfont descender] - expand*hd/2));
     font_info->height =
       font_info->max_bounds.ascent + font_info->max_bounds.descent;
     font_info->max_bounds.width = lrint (font_info->width);
@@ -880,8 +882,8 @@
 #endif
 
     /* set up metrics portion of font struct */
-    font->ascent = [sfont ascender];
-    font->descent = -[sfont descender];
+    font->ascent = lrint([sfont ascender]);
+    font->descent = -lrint(floor([sfont descender]));
     font->min_width = ns_char_width(sfont, '|');
     font->space_width = lrint (ns_char_width (sfont, ' '));
     font->average_width = lrint (font_info->width);