Mercurial > emacs
changeset 109643:50d12d998e76
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Mon, 02 Aug 2010 22:48:42 +0000 |
parents | 256d64c7ec3a (current diff) 87a4d6ee5443 (diff) |
children | 5644ada142e1 |
files | |
diffstat | 10 files changed, 108 insertions(+), 64 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Mon Aug 02 01:04:51 2010 +0000 +++ b/lisp/ChangeLog Mon Aug 02 22:48:42 2010 +0000 @@ -1,3 +1,14 @@ +2010-08-02 Stefan Monnier <monnier@iro.umontreal.ca> + + * frame.el (screen-height, screen-width, set-screen-width) + (set-screen-height): Remove ancient compatibility aliases. + + * textmodes/fill.el (justify-current-line): Don't add 1 to nspaces + when justifying. It seems useless and harmful for ncols=1 (bug#6738). + + * emacs-lisp/timer.el (timer-event-handler): Protect against timers + that change current buffer. + 2010-08-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> * mouse.el (mouse-fixup-help-message): Match "mouse-2" only at the @@ -9,13 +20,12 @@ 2010-08-01 Chong Yidong <cyd@stupidchicken.com> - * emacs-lisp/package.el (package--list-packages): Fix column - alignment. + * emacs-lisp/package.el (package--list-packages): Fix column alignment. (package--builtins): Tweak descriptions. - (package-print-package): Upcase descriptions if necessary. Show - all built-in packages in font-lock-builtin-face. - (package-list-packages-internal): Omit "emacs" package. Show - status of built-in packages as "built-in". + (package-print-package): Upcase descriptions if necessary. + Show all built-in packages in font-lock-builtin-face. + (package-list-packages-internal): Omit "emacs" package. + Show status of built-in packages as "built-in". 2010-07-31 Chong Yidong <cyd@stupidchicken.com> @@ -24,27 +34,22 @@ * term/x-win.el (x-select-text): Doc fix. -2010-07-31 Alan Mackenzie <acm@muc.de> - Enhanced Java Mode to handle Java 5.0 (Tiger) and Java 6 - (Mustang). Contributed by Nathaniel Flath. The following - functions were modified or created: +2010-07-31 Nathaniel Flath <flat0103@gmail.com> + + Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang). + The following functions were modified or created: * progmodes/cc-vars.el (c-offsets-alist, c-inside-block-syms) (objc-font-lock-extra-types): - * progmodes/cc-mode.el (c-basic-common-init): - * progmodes/cc-langs.el (c-make-mode-syntax-table) (c++-make-template-syntax-table) (c-identifier-syntax-modifications, c-symbol-start, c-operators) (c-<-op-cont-regexp, c->-op-cont-regexp, c-class-decl-kwds) (c-brace-list-decl-kwds, c-modifier-kwds, c-prefix-spec-kwds-re) (c-type-list-kwds, c-decl-prefix-re, c-opt-type-suffix-key): - - * progmodes/cc-fonts.el (c-make-inverse-face) (c-basic-matchers-after): - * progmodes/cc-engine.el (c-forward-keyword-clause) (c-forward-<>-arglist, c-forward-<>-arglist-recur) (c-forward-name, c-forward-type, c-forward-decl-or-cast-1) @@ -52,7 +57,7 @@ 2010-07-31 Jan Djärv <jan.h.d@swipnet.se> - * faces.el (face-all-attributes): Improved documentation (Bug#6767). + * faces.el (face-all-attributes): Improve documentation (Bug#6767). 2010-07-31 Eli Zaretskii <eliz@gnu.org> @@ -71,8 +76,8 @@ * menu-bar.el (menu-bar-showhide-tool-bar-menu-customize-enable-left) (menu-bar-showhide-tool-bar-menu-customize-disable) (menu-bar-showhide-tool-bar-menu-customize-enable-right) - (menu-bar-showhide-tool-bar-menu-customize-enable-top) - (menu-bar-showhide-tool-bar-menu-customize-enable-bottom): New functions + (menu-bar-showhide-tool-bar-menu-customize-enable-bottom) + (menu-bar-showhide-tool-bar-menu-customize-enable-top): New functions (menu-bar-showhide-tool-bar-menu): If tool bar is moveable, make a menu for Options => toolbar that can move it. @@ -112,8 +117,7 @@ * emacs-lisp/package.el (package-archive-base): Var deleted. (package-archives): New variable. (package-archive-contents): Doc fix. - (package-load-descriptor): Do nothing if descriptor file is - missing. + (package-load-descriptor): Do nothing if descriptor file is missing. (package--write-file-no-coding): New function. (package-unpack-single): Use it. (package-archive-id): New function. @@ -194,8 +198,7 @@ 2010-07-26 Daiki Ueno <ueno@unixuser.org> * epa-mail.el (epa-mail-mode-map): Add alternative key bindings - which consist of control chars only. Suggested by Richard - Stallman. + which consist of control chars only. Suggested by Richard Stallman. 2010-07-25 Daiki Ueno <ueno@unixuser.org>
--- a/lisp/emacs-lisp/timer.el Mon Aug 02 01:04:51 2010 +0000 +++ b/lisp/emacs-lisp/timer.el Mon Aug 02 22:48:42 2010 +0000 @@ -321,7 +321,11 @@ ;; We do this after rescheduling so that the handler function ;; can cancel its own timer successfully with cancel-timer. (condition-case nil - (apply (timer--function timer) (timer--args timer)) + ;; Timer functions should not change the current buffer. + ;; If they do, all kinds of nasty surprises can happen, + ;; and it can be hellish to track down their source. + (save-current-buffer + (apply (timer--function timer) (timer--args timer))) (error nil)) (if retrigger (setf (timer--triggered timer) nil)))
--- a/lisp/frame.el Mon Aug 02 01:04:51 2010 +0000 +++ b/lisp/frame.el Mon Aug 02 22:48:42 2010 +0000 @@ -1431,23 +1431,6 @@ the opposite frame edge from the edge indicated in the input spec." (cons (car spec) (frame-geom-value-cons (car spec) (cdr spec)))) -;;;; Aliases for backward compatibility with Emacs 18. -(define-obsolete-function-alias 'screen-height 'frame-height "19.7") -(define-obsolete-function-alias 'screen-width 'frame-width "19.7") - -(defun set-screen-width (cols &optional pretend) - "Change the size of the screen to COLS columns. -Optional second arg non-nil means that redisplay should use COLS columns -but that the idea of the actual width of the frame should not be changed. -This function is provided only for compatibility with Emacs 18." - (set-frame-width (selected-frame) cols pretend)) - -(defun set-screen-height (lines &optional pretend) - "Change the height of the screen to LINES lines. -Optional second arg non-nil means that redisplay should use LINES lines -but that the idea of the actual height of the screen should not be changed. -This function is provided only for compatibility with Emacs 18." - (set-frame-height (selected-frame) lines pretend)) (defun delete-other-frames (&optional frame) "Delete all frames except FRAME. @@ -1473,9 +1456,6 @@ (when (eq (frame-parameter frame 'minibuffer) 'only) (delete-frame frame))))) -(make-obsolete 'set-screen-width 'set-frame-width "19.7") -(make-obsolete 'set-screen-height 'set-frame-height "19.7") - ;; miscellaneous obsolescence declarations (define-obsolete-variable-alias 'delete-frame-hook 'delete-frame-functions "22.1")
--- a/lisp/textmodes/fill.el Mon Aug 02 01:04:51 2010 +0000 +++ b/lisp/textmodes/fill.el Mon Aug 02 22:48:42 2010 +0000 @@ -1289,18 +1289,16 @@ (skip-chars-backward " ")) (setq ncols (- fc endcol)) ;; Ncols is number of additional space chars needed - (if (and (> ncols 0) (> nspaces 0) (not eop)) - (progn - (setq curr-fracspace (+ ncols (/ (1+ nspaces) 2)) - count nspaces) - (while (> count 0) - (skip-chars-forward " ") - (insert-and-inherit - (make-string (/ curr-fracspace nspaces) ?\s)) - (search-forward " " nil t) - (setq count (1- count) - curr-fracspace - (+ (% curr-fracspace nspaces) ncols))))))) + (when (and (> ncols 0) (> nspaces 0) (not eop)) + (setq curr-fracspace (+ ncols (/ nspaces 2)) + count nspaces) + (while (> count 0) + (skip-chars-forward " ") + (insert-char ?\s (/ curr-fracspace nspaces) t) + (search-forward " " nil t) + (setq count (1- count) + curr-fracspace + (+ (% curr-fracspace nspaces) ncols)))))) (t (error "Unknown justification value")))) (goto-char pos) (move-marker pos nil)))
--- a/src/ChangeLog Mon Aug 02 01:04:51 2010 +0000 +++ b/src/ChangeLog Mon Aug 02 22:48:42 2010 +0000 @@ -1,3 +1,28 @@ +2010-08-02 Jan Djärv <jan.h.d@swipnet.se> + + * xterm.c (x_create_toolkit_scroll_bar): Only set XtNbeNiceToColormap + to TRUE if depth of screen is < 16. + + * gtkutil.c (hierarchy_ch_cb, qttip_cb): Do not define unless + USE_GTK_TOOLTIP. + (xg_prepare_tooltip): Return 0 unless USE_GTK_TOOLTIP + (xg_show_tooltip, xg_hide_tooltip): Do nothing unless + USE_GTK_TOOLTIP. + (xg_create_frame_widgets): Surround tooltip-related code with ifdef + USE_GTK_TOOLTIP. + (xg_free_frame_widgets): Don't delete ttip_* unless USE_GTK_TOOLTIP. + + * xterm.h (USE_GTK_TOOLTIP): New define. + (struct x_output): Put ttip_* inside ifdef USE_GTK_TOOLTIP. + + * sysdep.c (child_setup_tty): Enable ICANON in lflags and set VEOF + to Control-D (Bug#6771). + +2010-08-02 Juanma Barranquero <lekktu@gmail.com> + + * editfns.c (Fregion_beginning, Fregion_end): Doc fixes (bug#6493). + Wording by Drew Adams <drew.adams@oracle.com>. + 2010-08-01 Jan Djärv <jan.h.d@swipnet.se> * xterm.h (struct x_output): Add ttip_widget, ttip_window and
--- a/src/editfns.c Mon Aug 02 01:04:51 2010 +0000 +++ b/src/editfns.c Mon Aug 02 22:48:42 2010 +0000 @@ -336,14 +336,14 @@ } DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0, - doc: /* Return position of beginning of region, as an integer. */) + doc: /* Return the integer value of point or mark, whichever is smaller. */) (void) { return region_limit (1); } DEFUN ("region-end", Fregion_end, Sregion_end, 0, 0, 0, - doc: /* Return position of end of region, as an integer. */) + doc: /* Return the integer value of point or mark, whichever is larger. */) (void) { return region_limit (0);
--- a/src/gtkutil.c Mon Aug 02 01:04:51 2010 +0000 +++ b/src/gtkutil.c Mon Aug 02 22:48:42 2010 +0000 @@ -514,6 +514,8 @@ We use that to pop down the tooltip. This happens if Gtk+ for some reason wants to change or hide the tooltip. */ +#ifdef USE_GTK_TOOLTIP + static void hierarchy_ch_cb (GtkWidget *widget, GtkWidget *previous_toplevel, @@ -562,15 +564,20 @@ return FALSE; } +#endif /* USE_GTK_TOOLTIP */ + /* Prepare a tooltip to be shown, i.e. calculate WIDTH and HEIGHT. Return zero if no system tooltip available, non-zero otherwise. */ int xg_prepare_tooltip (FRAME_PTR f, - Lisp_Object string, - int *width, + Lisp_Object string, + int *width, int *height) { +#ifndef USE_GTK_TOOLTIP + return 0; +#else struct x_output *x = f->output_data.x; GtkWidget *widget; GdkWindow *gwin; @@ -614,6 +621,7 @@ UNBLOCK_INPUT; return 1; +#endif /* USE_GTK_TOOLTIP */ } /* Show the tooltip at ROOT_X and ROOT_Y. @@ -622,6 +630,7 @@ void xg_show_tooltip (FRAME_PTR f, int root_x, int root_y) { +#ifdef USE_GTK_TOOLTIP struct x_output *x = f->output_data.x; if (x->ttip_window) { @@ -630,6 +639,7 @@ gtk_widget_show_all (GTK_WIDGET (x->ttip_window)); UNBLOCK_INPUT; } +#endif } /* Hide tooltip if shown. Do nothing if not shown. @@ -640,6 +650,7 @@ xg_hide_tooltip (FRAME_PTR f) { int ret = 0; +#ifdef USE_GTK_TOOLTIP if (f->output_data.x->ttip_window) { GtkWindow *win = f->output_data.x->ttip_window; @@ -657,7 +668,7 @@ ret = 1; } - +#endif return ret; } @@ -1002,12 +1013,14 @@ style->bg_pixmap_name[GTK_STATE_NORMAL] = g_strdup ("<none>"); gtk_widget_modify_style (wfixed, style); +#ifdef USE_GTK_TOOLTIP /* Steal a tool tip window we can move ourselves. */ f->output_data.x->ttip_widget = 0; f->output_data.x->ttip_lbl = 0; f->output_data.x->ttip_window = 0; gtk_widget_set_tooltip_text (wtop, "Dummy text"); g_signal_connect (wtop, "query-tooltip", G_CALLBACK (qttip_cb), f); +#endif UNBLOCK_INPUT; @@ -1023,10 +1036,12 @@ gtk_widget_destroy (FRAME_GTK_OUTER_WIDGET (f)); FRAME_X_WINDOW (f) = 0; /* Set to avoid XDestroyWindow in xterm.c */ FRAME_GTK_OUTER_WIDGET (f) = 0; +#ifdef USE_GTK_TOOLTIP if (x->ttip_lbl) gtk_widget_destroy (x->ttip_lbl); if (x->ttip_widget) g_object_unref (G_OBJECT (x->ttip_widget)); +#endif } }
--- a/src/sysdep.c Mon Aug 02 01:04:51 2010 +0000 +++ b/src/sysdep.c Mon Aug 02 22:48:42 2010 +0000 @@ -511,7 +511,16 @@ process.c:send_process, and instead we disable ICANON by default, so if a subsprocess sets up ICANON, it's his problem (or the Elisp package that talks to it) to deal with lines that are too long. */ - s.main.c_lflag &= ~ICANON; /* Disable line editing and eof processing */ + /* There is no more "send eof to flush" going on (which is wrong and + unportable in itself), and disabling ICANON breaks a lot of stuff + and shows literal ^D in many cases. The correct way to handle too + much output is to buffer what could not be written and then write it + again when select returns ok for writing. This has it own set of + problems. Write is now asynchronous, is that a problem? + How much do we buffer, and what do we do when that limit is reached? */ + + s.main.c_lflag |= ICANON; /* Enable line editing and eof processing */ + s.main.c_cc[VEOF] = 'D'&037; /* Control-D */ s.main.c_cc[VMIN] = 1; s.main.c_cc[VTIME] = 0;
--- a/src/xterm.c Mon Aug 02 01:04:51 2010 +0000 +++ b/src/xterm.c Mon Aug 02 22:48:42 2010 +0000 @@ -4532,8 +4532,11 @@ || f->output_data.x->scroll_bar_bottom_shadow_pixel == -1) /* We tried to allocate a color for the top/bottom shadow, and failed, so tell Xaw3d to use dithering instead. */ - { - XtSetArg (av[ac], XtNbeNiceToColormap, True); + /* But only if we have a small colormap. Xaw3d can allocate nice + colors itself. */ + { + XtSetArg (av[ac], XtNbeNiceToColormap, + DefaultDepthOfScreen (FRAME_X_SCREEN (f)) < 16); ++ac; } else
--- a/src/xterm.h Mon Aug 02 01:04:51 2010 +0000 +++ b/src/xterm.h Mon Aug 02 22:48:42 2010 +0000 @@ -51,6 +51,10 @@ #define XSync(d, b) do { gdk_window_process_all_updates (); \ XSync (d, b); } while (0) +/* The GtkTooltip API came in 2.12, but gtk-enable-tooltips in 2.14. */ +#if GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION > 13 +#define USE_GTK_TOOLTIP +#endif #endif /* USE_GTK */ @@ -503,10 +507,13 @@ GdkGeometry size_hints; long hint_flags; +#ifdef USE_GTK_TOOLTIP GtkTooltip *ttip_widget; GtkWidget *ttip_lbl; GtkWindow *ttip_window; -#endif +#endif /* USE_GTK_TOOLTIP */ + +#endif /* USE_GTK */ /* If >=0, a bitmap index. The indicated bitmap is used for the icon. */