changeset 108850:7cd8ffa6f7db

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Thu, 27 May 2010 22:44:41 +0000
parents 84f3cdac426c (current diff) 78199a49c4bf (diff)
children cb093dac3d58
files
diffstat 6 files changed, 49 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu May 27 06:41:59 2010 +0000
+++ b/lisp/ChangeLog	Thu May 27 22:44:41 2010 +0000
@@ -1,3 +1,18 @@
+2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
+
+	* progmodes/verilog-mode.el (verilog-type-font-keywords): Use
+	font-lock-constant-face, not obsolete font-lock-reference-face.
+
+2010-05-27  Masatake YAMATO  <yamato@redhat.com>
+
+	* htmlfontify.el (hfy-face-resolve-face): New function.
+	(hfy-face-to-style): Use it (Bug#6279).
+
+2010-05-27  Kenichi Handa  <handa@m17n.org>
+
+	* language/hebrew.el (hebrew-shape-gstring): Check if a glyph
+	element of GSTRING is nil.
+
 2010-05-27  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* emacs-lisp/smie.el (smie-forward-token-function)
--- a/lisp/htmlfontify.el	Thu May 27 06:41:59 2010 +0000
+++ b/lisp/htmlfontify.el	Thu May 27 22:44:41 2010 +0000
@@ -1026,14 +1026,25 @@
     (setq  n (apply '* m))
     (nconc r (hfy-size (if x (round n) (* n 1.0)))) ))
 
+(defun hfy-face-resolve-face (fn)
+  (cond
+   ((facep fn)
+    (hfy-face-attr-for-class fn hfy-display-class))
+   ((and (symbolp fn)
+	 (facep (symbol-value fn)))
+    ;; Obsolete faces like `font-lock-reference-face' are defined as
+    ;; aliases for another face.
+    (hfy-face-attr-for-class (symbol-value fn) hfy-display-class))
+   (t nil)))
+
+
 (defun hfy-face-to-style (fn)
   "Take FN, a font or `defface' style font specification,
 \(as returned by `face-attr-construct' or `hfy-face-attr-for-class')
 and return a `hfy-style-assoc'.\n
 See also `hfy-face-to-style-i', `hfy-flatten-style'."
   ;;(message "hfy-face-to-style");;DBUG
-  (let ((face-def (if (facep fn)
-                      (hfy-face-attr-for-class fn hfy-display-class) fn))
+  (let ((face-def (hfy-face-resolve-face fn))
         (final-style nil))
 
     (setq final-style (hfy-flatten-style (hfy-face-to-style-i face-def)))
--- a/lisp/language/hebrew.el	Thu May 27 06:41:59 2010 +0000
+++ b/lisp/language/hebrew.el	Thu May 27 22:44:41 2010 +0000
@@ -92,6 +92,9 @@
 	(nchars (lgstring-char-len gstring))
 	(nglyphs (lgstring-glyph-len gstring))
 	(base-width (lglyph-width (lgstring-glyph gstring 0))))
+    (while (and (> nglyphs 1)
+		(not (lgstring-glyph gstring (1- nglyphs))))
+      (setq nglyphs (1- nglyphs)))
     (while (> nglyphs 1)
       (setq nglyphs (1- nglyphs))
       (let* ((glyph (lgstring-glyph gstring nglyphs))
--- a/lisp/progmodes/verilog-mode.el	Thu May 27 06:41:59 2010 +0000
+++ b/lisp/progmodes/verilog-mode.el	Thu May 27 22:44:41 2010 +0000
@@ -2446,12 +2446,12 @@
 		 (list
 		  (concat "\\<function\\>\\s-+\\(integer\\|real\\(time\\)?\\|time\\)\\s-+\\(\\sw+\\)" )
 		       '(1 font-lock-keyword-face)
-		       '(3 font-lock-reference-face prepend))
+		       '(3 font-lock-constant-face prepend))
 		 '("\\<function\\>\\s-+\\(\\[[^]]+\\]\\)\\s-+\\(\\sw+\\)"
 		   (1 font-lock-keyword-face)
-		   (2 font-lock-reference-face append))
+		   (2 font-lock-constant-face append))
 		 '("\\<function\\>\\s-+\\(\\sw+\\)"
-		   1 'font-lock-reference-face append))))
+		   1 'font-lock-constant-face append))))
 
   (setq verilog-font-lock-keywords-2
 	(append verilog-font-lock-keywords-1
--- a/src/ChangeLog	Thu May 27 06:41:59 2010 +0000
+++ b/src/ChangeLog	Thu May 27 22:44:41 2010 +0000
@@ -1,3 +1,8 @@
+2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
+
+	* xdisp.c (redisplay_window): After redisplay, check if point is
+	still valid before setting it (Bug#6177).
+
 2010-05-27  Glenn Morris  <rgm@gnu.org>
 
 	* Makefile.in, autodeps.mk, deps.mk, ns.mk:
--- a/src/xdisp.c	Thu May 27 06:41:59 2010 +0000
+++ b/src/xdisp.c	Thu May 27 22:44:41 2010 +0000
@@ -14788,8 +14788,16 @@
         (*FRAME_TERMINAL (f)->redeem_scroll_bar_hook) (w);
     }
 
-  /* Restore current_buffer and value of point in it.  */
-  TEMP_SET_PT_BOTH (CHARPOS (opoint), BYTEPOS (opoint));
+  /* Restore current_buffer and value of point in it.  The window
+     update may have changed the buffer, so first make sure `opoint'
+     is still valid (Bug#6177).  */
+  if (CHARPOS (opoint) < BEGV)
+    TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE);
+  else if (CHARPOS (opoint) > ZV)
+    TEMP_SET_PT_BOTH (Z, Z_BYTE);
+  else
+    TEMP_SET_PT_BOTH (CHARPOS (opoint), BYTEPOS (opoint));
+
   set_buffer_internal_1 (old);
   /* Avoid an abort in TEMP_SET_PT_BOTH if the buffer has become
      shorter.  This can be caused by log truncation in *Messages*. */