Mercurial > emacs
changeset 109470:607d993e49dc
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Thu, 15 Jul 2010 22:44:54 +0000 |
parents | cb913a283247 (current diff) 0ed7d8444705 (diff) |
children | 1135ec86232d |
files | |
diffstat | 6 files changed, 69 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Jul 15 00:54:06 2010 +0000 +++ b/lisp/ChangeLog Thu Jul 15 22:44:54 2010 +0000 @@ -1,3 +1,15 @@ +2010-07-15 Simon South <ssouth@member.fsf.org> + + * progmodes/delphi.el (delphi-previous-indent-of): Indent case + blocks within record declarations (i.e. variant parts) correctly. + +2010-07-15 Simon South <ssouth@member.fsf.org> + + * progmodes/delphi.el (delphi-token-at): Give newlines precedence + over literal tokens when parsing so newlines aren't "absorbed" by + single-line comments. Corrects the indentation of case blocks + that have a comment on the first line. + 2010-07-14 Karl Fogel <kfogel@red-bean.com> * bookmark.el (bookmark-load-hook): Fix doc string as suggested
--- a/lisp/progmodes/delphi.el Thu Jul 15 00:54:06 2010 +0000 +++ b/lisp/progmodes/delphi.el Thu Jul 15 22:44:54 2010 +0000 @@ -628,7 +628,9 @@ (defun delphi-token-at (p) ;; Returns the token from parsing text at point p. (when (and (<= (point-min) p) (<= p (point-max))) - (cond ((delphi-literal-token-at p)) + (cond ((delphi-char-token-at p ?\n 'newline)) + + ((delphi-literal-token-at p)) ((delphi-space-token-at p)) @@ -638,7 +640,6 @@ ((delphi-char-token-at p ?\) 'close-group)) ((delphi-char-token-at p ?\[ 'open-group)) ((delphi-char-token-at p ?\] 'close-group)) - ((delphi-char-token-at p ?\n 'newline)) ((delphi-char-token-at p ?\; 'semicolon)) ((delphi-char-token-at p ?. 'dot)) ((delphi-char-token-at p ?, 'comma)) @@ -888,7 +889,24 @@ (setq token (delphi-block-start token))) ;; Regular block start found. - ((delphi-is token-kind delphi-block-statements) (throw 'done token)) + ((delphi-is token-kind delphi-block-statements) + (throw 'done + ;; As a special case, when a "case" block appears + ;; within a record declaration (to denote a variant + ;; part), the record declaration should be considered + ;; the enclosing block. + (if (eq 'case token-kind) + (let ((enclosing-token + (delphi-block-start token + 'stop-on-class))) + (if + (eq 'record + (delphi-token-kind enclosing-token)) + (if stop-on-class + enclosing-token + (delphi-previous-token enclosing-token)) + token)) + token))) ;; A class/record start also begins a block. ((delphi-composite-type-start token last-token) @@ -1058,6 +1076,7 @@ (token-kind nil) (from-kind (delphi-token-kind from-token)) (last-colon nil) + (last-of nil) (last-token nil)) (catch 'done (while token @@ -1101,9 +1120,17 @@ ;; Ignore whitespace. ((delphi-is token-kind delphi-whitespace)) - ;; Remember any ':' we encounter, since that affects how we indent to - ;; a case statement. - ((eq 'colon token-kind) (setq last-colon token)) + ;; Remember any "of" we encounter, since that affects how we + ;; indent to a case statement within a record declaration + ;; (i.e. a variant part). + ((eq 'of token-kind) + (setq last-of token)) + + ;; Remember any ':' we encounter (until we reach an "of"), + ;; since that affects how we indent to case statements in + ;; general. + ((eq 'colon token-kind) + (unless last-of (setq last-colon token))) ;; A case statement delimits a previous statement. We indent labels ;; specially.
--- a/src/ChangeLog Thu Jul 15 00:54:06 2010 +0000 +++ b/src/ChangeLog Thu Jul 15 22:44:54 2010 +0000 @@ -1,3 +1,16 @@ +2010-07-15 Andreas Schwab <schwab@linux-m68k.org> + + * xterm.c (x_fully_uncatch_errors, x_trace_wire, x_check_font): + Convert old-style definition. + + * xmenu.c (create_and_show_popup_menu, xmenu_show): Fix type of + timestamp argument. + +2010-07-15 Eli Zaretskii <eliz@gnu.org> + + * fringe.c (update_window_fringes): Restore mistakenly reverted + code from revno 99854.1.6 merged in revno 99950. + 2010-07-14 Jan Djärv <jan.h.d@swipnet.se> * xterm.c (xm_scroll_callback, x_process_timeouts): K&R => prototype.
--- a/src/fringe.c Thu Jul 15 00:54:06 2010 +0000 +++ b/src/fringe.c Thu Jul 15 22:44:54 2010 +0000 @@ -1196,7 +1196,8 @@ if (bot_ind_max_y >= 0) left_offset = bot_ind_max_y - (row->y + row->visible_height); } - else if (MATRIX_ROW_CONTINUATION_LINE_P (row)) + else if ((!row->reversed_p && MATRIX_ROW_CONTINUATION_LINE_P (row)) + || (row->reversed_p && row->continued_p)) left = LEFT_FRINGE (4, Qcontinuation, 0); else if (row->indicate_empty_line_p && EQ (empty_pos, Qleft)) left = LEFT_FRINGE (5, Qempty_line, 0); @@ -1240,7 +1241,8 @@ if (bot_ind_max_y >= 0) right_offset = bot_ind_max_y - (row->y + row->visible_height); } - else if (row->continued_p) + else if ((!row->reversed_p && row->continued_p) + || (row->reversed_p && MATRIX_ROW_CONTINUATION_LINE_P (row))) right = RIGHT_FRINGE (4, Qcontinuation, 0); else if (row->indicate_top_line_p && EQ (arrow_top, Qright)) {
--- a/src/xmenu.c Thu Jul 15 00:54:06 2010 +0000 +++ b/src/xmenu.c Thu Jul 15 22:44:54 2010 +0000 @@ -1562,7 +1562,8 @@ menu pops down. menu_item_selection will be set to the selection. */ static void -create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, int for_click, unsigned int timestamp) +create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, + int x, int y, int for_click, EMACS_UINT timestamp) { int i; Arg av[2]; @@ -2275,7 +2276,8 @@ Lisp_Object -xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, Lisp_Object title, char **error, unsigned int timestamp) +xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, + Lisp_Object title, char **error, EMACS_UINT timestamp) { Window root; XMenu *menu;
--- a/src/xterm.c Thu Jul 15 00:54:06 2010 +0000 +++ b/src/xterm.c Thu Jul 15 22:44:54 2010 +0000 @@ -7503,7 +7503,7 @@ /* Close off all unclosed x_catch_errors calls. */ void -x_fully_uncatch_errors () +x_fully_uncatch_errors (void) { while (x_error_message) x_uncatch_errors (); @@ -7520,7 +7520,7 @@ #if 0 static unsigned int x_wire_count; -x_trace_wire () +x_trace_wire (void) { fprintf (stderr, "Lib call: %d\n", ++x_wire_count); } @@ -9560,9 +9560,7 @@ font table. */ static void -x_check_font (f, font) - struct frame *f; - struct font *font; +x_check_font (struct frame *f, struct font *font) { Lisp_Object frame;