Save region text prior to buffer modification.
Set window selection lazily, during `deactivate-mark' or after each
command when the region is temporarily active.
* lisp/cus-start.el: Add custom declaration for select-active-regions.
* lisp/mouse.el (mouse-drag-track): Remove hacks to deal with old
select-active-regions implementation.
(mouse-yank-at-click): Doc fix.
* lisp/simple.el (select-active-regions): Move to keyboard.c.
(deactivate-mark): Used saved-region-selection.
(select-active-region): Function removed.
(activate-mark, set-mark, push-mark-command)
(handle-shift-selection): Don't call it.
(keyboard-quit): Avoid adding the region to the window selection.
* src/insdel.c (prepare_to_modify_buffer): Save active region text to
Vsaved_region_selection.
* src/keyboard.c (Vselect_active_regions): Move from simple.el.
(Vsaved_region_selection, Qx_set_selection, QPRIMARY, Qlazy): New
vars.
(command_loop_1): Set window selection prior to deactivating the
mark.
* src/xselect.c (QPRIMARY): Move to keyboard.c.
property "vec".
(tramp-process-sentinel): Use it for flushing the cache. We
cannot do it via the process buffer, the buffer could be deleted
already when running the sentinel.
* lisp/cus-start.el (x-gtk-use-system-tooltips): New variable.
* src/gtkutil.c (hierarchy_ch_cb, qttip_cb, xg_prepare_tooltip)
(xg_show_tooltip, xg_hide_tooltip, xg_free_frame_widgets): New
functions.
(xg_create_frame_widgets): Set ttip_* to 0. Set a dummy tooltip
text so qttip_cb is called. Connect query-tooltip to qttip_cb.
Remove code that is commented out.
* src/gtkutil.h (xg_free_frame_widgets, xg_prepare_tooltip)
(xg_show_tooltip, xg_hide_tooltip): Declare.
* src/xfns.c (x_gtk_use_system_tooltips): New variable.
(Fx_show_tip): If USE_GTK and x_gtk_use_system_tooltips, call
new gtkutil tooltip functions to show the tooltip.
(Fx_hide_tip): Call xg_hide_tooltip.
(syms_of_xfns): Defvar x-gtk-use-system-tooltips.
* src/xterm.c (x_clear_frame): Check FRAME_GTK_WIDGET (f) before
calling gtk_widget_queue_draw.
(x_free_frame_resources): Call xg_free_frame_widgets.
* src/xterm.h (struct x_output): Add ttip_widget, ttip_window and
ttip_lbl.
* 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".
* lisp/mouse.el (mouse-save-then-kill): Doc fix. Deactivate mark
before killing to preserve the primary selection.
* lisp/term/x-win.el (x-select-text): Doc fix.
* src/xselect.c (x_own_selection): Use list4.
etc/tutorials/TUTORIAL.he: New file.
etc/tutorials/TUTORIAL.translators: Add TUTORIAL.he.
lisp/files.el (bidi-paragraph-direction): Define safe local values.
lisp/language/hebrew.el ("Hebrew"): Add TUTORIAL.he to
language-info-alist. Remove outdated FIXME in a comment.
* lisp/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): If tool bar is moveable,
make a menu for Options => toolbar that can move it.
* src/frame.c (Qtool_bar_position): New variable.
(make_frame): Set tool_bar_position to Qtop.
(frame_parms): Add tool-bar-position.
(x_report_frame_params): Store tool_bar_position.
(x_set_fringe_width): Reset wm size hint after fringe changes.
* src/frame.h (struct frame): Add tool_bar_position.
(Qbottom): Declare.
* src/gtkutil.c (FRAME_TOTAL_PIXEL_WIDTH): New macro.
(xg_frame_set_char_size): Add FRAME_TOOLBAR_WIDTH to pixelwidth.
(xg_height_or_width_changed): Use FRAME_TOTAL_PIXEL_WIDTH.
(xg_create_frame_widgets): Create a hobox for placing widgets
vertically. Use gtk_box_pack_start.
(xg_height_or_width_changed): Renamed from xg_height_changed.
(x_wm_set_size_hint): Add FRAME_TOOLBAR_WIDTH to base_width.
(xg_update_frame_menubar, free_frame_menubar): Change to
xg_height_or_width_changed.
(xg_tool_bar_detach_callback): Update left/right/top/bottom tool bar
size correctly. Remove hardcoded 4, instead use handlebox size -
toolbar size.
(xg_tool_bar_attach_callback): Update left/right/top/bottom tool bar
size correctly. Use handlebox size + toolbar size as additional
size.
(xg_pack_tool_bar): POS is a new parameter.
Set orientation of tool bar based on pos.
Only make handlebox_widget if NULL.
Check if tool bar goes to vbox or hbox depending on pos.
(xg_update_tool_bar_sizes): New function.
(update_frame_tool_bar): Remove old_req, new_req. Do not get tool bar
height, call xg_update_tool_bar_sizes instead.
(free_frame_tool_bar): Remove from hbox or vbox depending on
toolbar_in_hbox, Set all FRAME_TOOLBAR_*_(WIDTH|HEIGHT) to zero.
(xg_change_toolbar_position): New function.
* src/gtkutil.h (xg_change_toolbar_position): Declare.
* src/window.c (calc_absolute_offset): Check for FRAME_TOOLBAR_TOP_HEIGHT
and FRAME_TOOLBAR_LEFT_WIDTH.
* src/xfns.c (x_set_tool_bar_position): New function.
(xic_set_statusarea): Use FRAME_TOOLBAR_TOP_HEIGHT.
(x_frame_parm_handlers): Add x_set_tool_bar_position.
(syms_of_xfns): if USE_GTK, provide move-toolbar.
* src/xterm.c (x_set_window_size_1): Add FRAME_TOOLBAR_WIDTH to pixelwidth.
* src/xterm.h (struct x_output): Add toolbar_top_height,
toolbar_bottom_height, toolbar_left_width, toolbar_right_width. Remove
toolbar_height.
if USE_GTK: Add hbox_widget and toolbar_in_hbox.
(FRAME_TOOLBAR_TOP_HEIGHT, FRAME_TOOLBAR_BOTTOM_HEIGHT)
(FRAME_TOOLBAR_LEFT_WIDTH, FRAME_TOOLBAR_RIGHT_WIDTH): New macros.
(FRAME_TOOLBAR_HEIGHT): Is now TOP_HEIGHT + BOTTOM_HEIGHT.
`remote-tty' process property.
(tramp-open-shell): Don't check for tty.
(tramp-open-connection-setup-interactive-shell): Set `remote-tty'
process property.
* progmodes/gdb-mi.el (gdb-init-1): Check also for tty on a remote
host.
* lisp/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--write-file-no-coding): New function.
(package-unpack-single): Use it.
(package-archive-id): New function.
(package-download-single, package-download-tar)
(package-menu-view-commentary): Use it.
(package-installed-p): Make second argument optional.
(package-read-all-archive-contents): New function.
(package-initialize): Use it.
(package-read-archive-contents): Add ARCHIVE argument.
(package--add-to-archive-contents): New function.
(package-install): Don't call package-read-archive-contents.
(package--download-one-archive): Store archive file in a
subdirectory of package-user-dir.
(package-menu-execute): Remove spurious line movement.
* lisp/emacs-lisp/package.el (package-load-list, package-archives)
(package-archive-contents, package-user-dir)
(package-directory-list, package--builtins, package-alist)
(package-activated-list, package-obsolete-alist): Mark as risky.
(tetris-tty-colors, tetris-x-colors, tetris-blank):
Remove leading nil element, adjust values.
(tetris-shapes, tetris-shape-scores):
Change representation of shapes and remove some redundancy.
(tetris-get-shape-cell, tetris-shape-width, tetris-draw-next-shape)
(tetris-draw-shape, tetris-erase-shape, tetris-test-shape):
Adjust for working with new representation of shapes.
(tetris-shape-rotations): New function.
(tetris-move-bottom, tetris-move-left, tetris-move-right)
(tetris-rotate-prev, tetris-rotate-next):
Adjust for working with the new version of tetris-test-shape.
(ps-run-mode-map): Adapt for comint-mode; omit "\r", [return]..
(ps-mode-other-newline): Simplify.
(ps-run-mode): Derive from comint-mode instead of
fundamental-mode, yielding input history etc.
(ps-run-start, ps-run-quit, ps-run-clear, ps-run-region)
(ps-run-send-string): Adapt for comint-mode.
(ps-run-newline): Remove now unneeded function.
Fixes: debbugs:5954
* progmodes/sql.el: Version 2.4. Improved Login prompting.
(sql-login-params): New widget definition.
(sql-oracle-login-params, sql-mysql-login-params)
(sql-solid-login-params, sql-sybase-login-params)
(sql-informix-login-params, sql-ingres-login-params)
(sql-ms-login-params, sql-postgres-login-params)
(sql-interbase-login-params, sql-db2-login-params)
(sql-linter-login-params): Use it.
(sql-sqlite-login-params): Use it; Define "database" parameter as
a file name.
(sql-sqlite-program): Change to "sqlite3"
(sql-comint-sqlite): Make sure database name is complete.
(sql-for-each-login): New function.
(sql-connect, sql-save-connection): Use it.
(sql-get-login-ext): New function.
(sql-get-login): Use it.
(sql-make-alternate-buffer-name): Handle :file parameters.