# HG changeset patch # User Katsumi Yamaoka # Date 1275000281 0 # Node ID 7cd8ffa6f7db4d0d18b9c598424070f8de52da2a # Parent 84f3cdac426c22daa28640efd650e2fa070bcc7c# Parent 78199a49c4bf1d50ce6ee9ba2b873205e06b5cb8 Merge from mainline. diff -r 84f3cdac426c -r 7cd8ffa6f7db lisp/ChangeLog --- 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 + + * progmodes/verilog-mode.el (verilog-type-font-keywords): Use + font-lock-constant-face, not obsolete font-lock-reference-face. + +2010-05-27 Masatake YAMATO + + * htmlfontify.el (hfy-face-resolve-face): New function. + (hfy-face-to-style): Use it (Bug#6279). + +2010-05-27 Kenichi Handa + + * language/hebrew.el (hebrew-shape-gstring): Check if a glyph + element of GSTRING is nil. + 2010-05-27 Stefan Monnier * emacs-lisp/smie.el (smie-forward-token-function) diff -r 84f3cdac426c -r 7cd8ffa6f7db lisp/htmlfontify.el --- 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))) diff -r 84f3cdac426c -r 7cd8ffa6f7db lisp/language/hebrew.el --- 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)) diff -r 84f3cdac426c -r 7cd8ffa6f7db lisp/progmodes/verilog-mode.el --- 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 "\\\\s-+\\(integer\\|real\\(time\\)?\\|time\\)\\s-+\\(\\sw+\\)" ) '(1 font-lock-keyword-face) - '(3 font-lock-reference-face prepend)) + '(3 font-lock-constant-face prepend)) '("\\\\s-+\\(\\[[^]]+\\]\\)\\s-+\\(\\sw+\\)" (1 font-lock-keyword-face) - (2 font-lock-reference-face append)) + (2 font-lock-constant-face append)) '("\\\\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 diff -r 84f3cdac426c -r 7cd8ffa6f7db src/ChangeLog --- 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 + + * xdisp.c (redisplay_window): After redisplay, check if point is + still valid before setting it (Bug#6177). + 2010-05-27 Glenn Morris * Makefile.in, autodeps.mk, deps.mk, ns.mk: diff -r 84f3cdac426c -r 7cd8ffa6f7db src/xdisp.c --- 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*. */