1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 15:52:00 -08:00
Commit graph

36482 commits

Author SHA1 Message Date
Eli Zaretskii
614beeecf2 Ignore BUFFER_SWITCH_EVENT events for the purposes of input-pending-p.
src/keyboard.c (readable_events): When FLAGS include
 READABLE_EVENTS_FILTER_EVENTS, ignore BUFFER_SWITCH_EVENT events.
 This avoids returning non-nil from input-pending-p when only such
 events are in the queue.

Fixes: debbugs:18856
2014-11-01 16:22:32 +02:00
Jan Djärv
711066c8c1 nsselect.m cleanup, remove unused, declare vars static.
* nsselect.m (QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME)
(NXPrimaryPboard, NXSecondaryPboard): Declare static.
(Qforeign_selection): Remove.
(ns_get_local_selection): Identation fix.
(syms_of_nsselect): Remove Qforeign_selection, ns-lost-selection-hooks
2014-11-01 12:41:50 +01:00
Jan Djärv
722afcab51 * lisp/select.el (gui-get-selection): Comment: data-type ignored on NS.
* src/nsselect.m (ns_get_local_selection): Remove calling of
functions in Vselection_converter_alist.
(syms_of_nsselect): Remove Vselection_converter_alist.

Fixes: debbugs:18911
2014-11-01 12:37:14 +01:00
Dmitry Antipov
b645a03e5c * font.c (copy_font_spec): Redesign to avoid Fcopy_alist
and unnecessary initialization.  Adjust comments.
2014-10-31 14:09:00 +03:00
Eli Zaretskii
b6a7474272 Minor fix in bidi.c:bidi_cache_reset_to.
src/bidi.c (bidi_cache_reset_to): Invalidate bidi_cache_last_idx by
 setting it to -1.
 (bidi_find_bracket_pairs): Pass to bidi_cache_reset_to a relative
 index, not an absolute one, as that's what the function expects.
2014-10-30 18:51:53 +02:00
Dmitry Antipov
ff7ec46d34 * fontset.c (toplevel): Adjust comment to match 2014-06-19 change. 2014-10-30 14:12:21 +03:00
Dmitry Antipov
66e773e997 * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to realize
font on an initial frame when running as a daemon (Bug#18869).
2014-10-30 12:37:08 +03:00
Glenn Morris
52b410c60a Merge from emacs-24; up to 117634 2014-10-29 22:15:28 -07:00
Ulf Jasper
45f0de5a71 xml.c:parse_region: Do not forget the first document child.
* src/xml.c (parse_region): Do not forget the first document child.

* test/automated/libxml-tests.el: New file.
2014-10-28 21:33:12 +01:00
Eli Zaretskii
205be0810a Fix bug #18873 with non-ASCII characters in user's HOME directory.
src/fileio.c (Fexpand_file_name): Use make_unibyte_string, not
 build_string, when importing a home directory.
2014-10-28 19:48:21 +02:00
Eli Zaretskii
475e766a94 Fix bug #18839 with incorrect image size returned by posn-at-point.
src/dispnew.c (buffer_posn_from_coords): Use
 WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to
 account for the header-line height.
2014-10-26 17:42:08 +02:00
Jan Djärv
3abb316834 * nsselect.m: pasteboard_changecount is new.
(ns_store_pb_change_count, ns_get_pb_change_count)
(ns_get_our_change_count_for): New functions.
(ns_string_to_pasteboard_internal): Correct comment.
type => gtype in eassert, Call ns_store_pb_change_count.
(Fns_own_selection_internal): Remove data, use value.
(Fns_disown_selection_internal, Fns_selection_owner_p): Replace
Vselection_alist check, with change count check.
(Fns_get_selection): Initialize val to Qnil.  Only get local
selection if change counts match (Bug#18799).
(nxatoms_of_nsselect): Initialize pasteboard_changecount.
2014-10-25 15:56:22 +02:00
Noam Postavsky
a91ff4f4b1 Fix bug #18745 with invoking Windows batch files with embedded whitespace.
src/w32proc.c (create_child): If calling a quoted batch file,
 pass NULL for exe.

 nt/cmdproxy.c (batch_file_p): New function.
 (spawn): If calling a quoted batch file pass NULL for progname.

 test/automated/process-tests.el (process-test-quoted-batfile): New test.
2014-10-25 12:12:01 +03:00
Eli Zaretskii
7026b4d8ee A possible fix for bug #18815 with assertion violations in bidi.c.
src/bidi.c (bidi_resolve_explicit, bidi_find_bracket_pairs)
 (bidi_resolve_brackets): Use end of string position rather than ZV
 when iterating over a string.
2014-10-24 16:19:21 +03:00
Martin Rudalics
3110159d1f Improve mouse dragging of frame edges.
* keyboard.c (make_lispy_position): Return coordinates also when
on scroll bars, fringes, margins or not in a window.
* xdisp.c (show_mouse_face): Don't change cursor face during
mouse tracking.
* mouse.el (mouse-drag-line): Don't use mouse-pixel-position.
Calculate increment from last position instead of window edge.
Add right- and bottom-divider bindings to transient map.
2014-10-24 11:58:43 +02:00
Martin Rudalics
f43d61f556 Fix some doc-strings in frame.c (Bug#18789).
* frame.c (Fset_frame_height, Fset_frame_width, Fset_frame_size)
(frame_resize_pixelwise, frame_inhibit_implied_resize): Fix
doc-strings (Bug#18789).
2014-10-23 15:21:07 +02:00
Paul Eggert
285ac87022 * Makefile.in (ACLOCAL_INPUTS): Omit unnecessary use of 'wildcard'. 2014-10-22 23:31:48 -07:00
Eli Zaretskii
6a7884caf2 Fix bug #18778 with slow redisplay of bracketed L2R text with long lines.
src/bidi.c (bidi_cache_reset_to): New function.
 (bidi_cache_reset): Call it.
 (bidi_init_it, bidi_line_init): Initialize the bracket_pairing_pos
 member to -1.
 (bidi_resolve_explicit): Reset bracket_pairing_pos and
 bracket_enclosed_type only if bracket_pairing_pos's value is not
 ZV.
 (MAX_BPA_STACK): Make sure the value is signed.
 (PUSH_BPA_STACK): If the BPA stack overflows, don't bail out, but
 stop pushing values onto the stack.
 (bidi_find_bracket_pairs): If the bracketed text is only on the
 base embedding level, remove all the states cached by this
 function from the cache, and return zero, so that the brackets in
 this segment of text are processed as normal neutrals.
 (bidi_resolve_brackets): Detect the brackets that are to be
 processed as neutrals, and don't call bidi_find_bracket_pairs on
 them.
2014-10-22 19:09:57 +03:00
YAMAMOTO Mitsuharu
1a7aa3ce7f * xdisp.c (erase_phys_cursor): Fix confusion between window-relative and text area-relative x-coordinates. [Backport] 2014-10-22 10:39:48 +09:00
YAMAMOTO Mitsuharu
2498362599 * xdisp.c (draw_glyphs): Set clipping to highlight boundaries. [Backport] 2014-10-22 10:31:37 +09:00
Stefan Monnier
a046b8dd48 Get rid of backend-dependent selection-handling functions for kill/yank
and make it generic instead by relying on the lower-level selection
management functions.

* select.el (select-enable-clipboard): Rename from
gui-select-enable-clipboard.
(select-enable-primary): Move from x-win.el and rename from
x-select-enable-primary.
(gui-last-selected-text): Remove.
(gui--last-selected-text-clipboard, gui--last-selected-text-primary):
New vars.
(gui-select-text): Rewrite, based on x-win.el's old x-select-text.
(gui-select-text-alist, gui-selection-value-alist): Remove.
(x-select-request-type): Move from x-win.el.
(gui--selection-value-internal): New function, taken from x-win's
x-selection-value-internal.
(gui-selection-value): Rewrite, based on x-win.el's old x-selection-value.
(gui-set-selection-alist): Rename from gui-own-selection-alist and
extend it to handle a nil value as a "disown" request.
(gui-disown-selection-alist): Remove.
(xselect-convert-to-delete): Adjust accordingly.
(gui-set-selection): Simplify accordingly as well.  Use dotimes.

* lisp/frame.el (gui-method): Use window-system rather than framep.
(gui-method-declare): The tty case is now nil rather than t.
(make-frame): Adjust accordingly.

* lisp/term/x-win.el (x-last-selected-text-primary)
(x-select-enable-primary): Remove (moved to select.el).
(x-select-request-type): Move to select.el.
(x-selection-value-internal, x--selection-value): Remove functions.
(gui-selection-value, gui-select-text): Remove moethods.
(gui-set-selection): Merge own and disown methods.

* lisp/startup.el (command-line): Adjust now that `gui-method' expects nil
for ttys.

* lisp/term/ns-win.el (ns-get-pasteboard, ns-set-pasteboard)
(ns-selection-value): Remove functions.
(gui-select-text, gui-selection-value): Don't define method any more.
(gui-set-selection): Merge the old own and disown methods.
(gui-selection-exists-p, gui-get-selection): Adjust to new name of
underlying C primitive.

* lisp/term/pc-win.el (w16-get-selection-value): Add dummy argument and drop
test of gui-select-enable-clipboard, to make it usable as
a gui-get-selection method.
(gui-selection-exists-p): Adjust to new name of C primitive.
(gui-set-selection): Merge own and disown methods.
(gui-select-text, gui-selection-value): Delete methods.
(w16--select-text): Delete function.

* lisp/term/w32-win.el (w32--select-text, w32--get-selection-value):
Delete function (move functionality into w32--set-selection and
w32--get-selection).
(gui-select-text, gui-selection-value): Don't define methods.
(w32--set-selection, w32--get-selection, w32--selection-owner-p):
New functions.
(gui-get-selection, gui-selection-owner-p, gui-selection-exists-p):
Use them.
(gui-selection-exists-p): Adjust to new name of C primitive.

* src/nsselect.m (ns_get_local_selection): Signal error rather than `quit'.
(Fns_own_selection_internal): Tighten scoping.
(Fns_selection_exists_p): Rename from Fx_selection_exists_p.
(Fns_get_selection): Rename from Fx_get_selection_internal.
(Fns_get_selection_internal, Fns_store_selection_internal):
Remove functions.
(syms_of_nsselect): Adjust accordingly.

* src/w16select.c (Fw16_selection_exists_p): Rename from
Fx_selection_exists_p.
(syms_of_win16select): Adjust accordingly.

* src/w32select.c (Fw32_selection_exists_p): Rename from
Fx_selection_exists_p.
(syms_of_w32select): Adjust accordingly.
2014-10-21 11:27:18 -04:00
Martin Rudalics
e5b3b7d3f3 Handle wrapped menu bar lines when resizing frames with Windows API.
* w32fns.c (Fw32_frame_menu_bar_size): New function.
* w32term.c (x_set_window_size): Account for wrapped menu bar
lines when setting up frame height (Bug#15174 and Bug#18720).
(w32_add_wrapped_menu_bar_lines): New variable.
2014-10-21 08:57:28 +02:00
Stefan Monnier
eed18bf1fd Merge from emacs-24 2014-10-20 21:17:06 -04:00
Glenn Morris
d9a72916e5 * src/minibuf.c (history-length): Increase default from 30 to 100.
* lisp/cus-start.el (history-length): Bump :version.  [Backport]
2014-10-20 18:02:40 -04:00
Stefan Monnier
290d4b570f * src/xdisp.c (redisplay_window): Re-run pre-redisplay-function after we
move point.
2014-10-20 17:48:58 -04:00
Glenn Morris
8a85c254de Merge from emacs-24; up to 2014-07-28T06:28:15Z!dmantipov@yandex.ru 2014-10-20 20:59:41 +01:00
Glenn Morris
83bad90efe Add 24.4 release ChangeLog entries 2014-10-20 20:21:15 +01:00
Paul Eggert
57fe1632f0 Spelling and grammar fixes in comments. 2014-10-20 09:00:35 -07:00
Eli Zaretskii
a7bbb82d88 src/ChangeLog: Remove stray duplicate entry. 2014-10-19 22:13:29 +03:00
Jan Djärv
b9bdab7aca * gtkutil.c (create_dialog): Don't use gtk_dialog_get_action_area on
Gt+ >= 3.12, or gtk_misc_set_alignment on Gtk+ >= 3.14.
(make_widget_for_menu_item): Don't use gtk_misc_set_alignment on
Gtk+ >= 3.14 (Bug#18674).
(update_frame_tool_bar): Don't use  gtk_misc_set_padding on
Gtk+ >= 3.14 (Bug#18674).

* gtkutil.c (xg_update_menubar, xg_update_menu_item): Only call
g_object_notify for label if Gtk+ >= 2.16 (Bug#16522).
2014-10-19 19:27:53 +02:00
Jan Djärv
5e3344686a * src/xterm.c (handle_one_xevent): Check return value from
x_handle_net_wm_state, remove net_wm_state_hidden_seen.
(get_current_wm_state): Remove net_wm_state_hidden_seen setting.

* src/xterm.h (x_output): Remove net_wm_state_hidden_seen.

Fixes: debbugs:18722
2014-10-19 19:07:54 +02:00
Jan Djärv
58af643d69 * gtkutil.c (create_dialog): Don't use gtk_dialog_get_action_area on
Gt+ >= 3.12, or gtk_misc_set_alignment on Gtk+ >= 3.14.
(make_widget_for_menu_item): Don't use gtk_misc_set_alignment on
Gtk+ >= 3.14 (Bug#18674).
(update_frame_tool_bar): Don't use  gtk_misc_set_padding on
Gtk+ >= 3.14 (Bug#18674).
2014-10-19 18:28:49 +02:00
Paul Eggert
4e94689452 * gtkutil.c: Remove no-longer-used code.
(xg_update_menubar): Remove unused local and unnecessary call to
gtk_menu_item_get_submenu.
(XG_TOOL_BAR_PROXY_BUTTON, xg_tool_bar_proxy_callback)
(xg_get_tool_bar_widgets, xg_tool_bar_proxy_help_callback)
(TOOLBAR_TOP_WIDGET): Remove; no longer used.
2014-10-18 12:07:17 -07:00
Jan Djärv
ac225d22f6 * xfns.c (syms_of_xfns): Remove x-gtk-whole-detached-tool-bar. 2014-10-18 18:25:24 +02:00
Jan Djärv
3f4c6d52d3 Handle deprecated Gtk+ stuff for version <= 3.10
* lisp/term/x-win.el (x-gtk-stock-map): Add icon names suggested as
replacements to stock names before stock names in a list.
Cdr may be a list, each name is tried in turn until one is found.

* src/gtkutil.c (XG_TEXT_CANCEL, XG_TEXT_OPEN, XG_TEXT_OK): New defines
to handle Gtk versions.
(xg_get_file_with_chooser): Use them.
(xg_have_tear_offs, tearoff_remove, tearoff_activate): Remove
(create_menus): Remove teroff argument and code.
Remove call to gtk_menu_set_title.
(xg_update_menubar, xg_update_submenu): Remove tearoff code.  Adjust
args to create_menus.
(xg_tool_bar_menu_proxy, xg_tool_bar_detach_callback)
(xg_tool_bar_attach_callback, TOOLBAR_TOP_WIDGET): Remove.
(xg_pack_tool_bar): Replace TOOLBAR_TOP_WIDGET, remove detach code.
(xg_make_tool_item): Remove detach code.
(xg_update_tool_bar_sizes): Replace TOOLBAR_TOP_WIDGET.
(find_icon_from_name): New function.
(update_frame_tool_bar): Remove GtkStockItem code, move to
find_icon_from_name.  Let stock be a list of icon names to try.
Only use gtk_image_new_from_stock on Gtk+ < 3.10.
Replace TOOLBAR_TOP_WIDGET.
(free_frame_tool_bar, xg_change_toolbar_position ): Replace
TOOLBAR_TOP_WIDGET.
(xg_initialize): Remove tearoff code.

* src/gtkutil.h (xg_have_tear_offs): Remove declaration.

* src/xmenu.c (set_frame_menubar): Remove GTK block that calls
xg_have_tear_offs.

* src/xterm.h (handlebox_widget): Remove.
2014-10-18 18:19:53 +02:00
Eli Zaretskii
a4c80e35cc A better fix for drawing hollow cursor on X on 1-pixel thin space characters.
src/xterm.c (x_draw_bar_cursor, x_draw_hollow_cursor): Subtract 1
 pixel from the window's cursor glyph width, since X renders hollow
 blocks 1 pixel wider than the 'width' parameter.
 src/xdisp.c (get_phys_cursor_geometry): Don't subtract 1 pixel from
 glyph->pixel_width; this is now done in xterm.c.
2014-10-18 16:09:18 +03:00
Eli Zaretskii
6b247d2873 Fix bidi reordering of bracket characters in isolates.
src/bidi.c (bidi_cache_find): Rename the argument NEUTRALS_OK to
 RESOLVED_ONLY; when non-zero, return from the cache only fully
 resolved states.  All callers changed.
 (CANONICAL_EQU): New macro.
 (PUSH_BPA_STACK): Use it to push onto the BPA stack the canonical
 equivalent of the paired closing bracket character.
 (bidi_find_bracket_pairs): Set the bracket_pairing_pos member to
 the default non-negative value, to be checked later in
 bidi_resolve_brackets.  Use CANONICAL_EQU to test candidate
 characters against those pushed onto the BPA stack.
 (bidi_record_type_for_neutral): New function.
 (bidi_resolve_brackets): Record next_for_neutral and
 prev_for_neutral when embedding level gets pushed.  Force
 resolution of bracket pairs when entering a level run that was not
 yet BPA-resolved.
 (bidi_resolve_neutral): Add assertions before calling
 bidi_resolve_neutral_1.
 (bidi_level_of_next_char): Remove the code that attempted to
 resolve unresolved neutrals; that is now done by
 bidi_resolve_neutral.
2014-10-18 15:47:57 +03:00
Eli Zaretskii
b5e71861a3 Add support for canonically equivalent bracket characters. 2014-10-18 14:07:44 +03:00
Eli Zaretskii
1c39638499 Move cache retrieval on forwards scans to bidi_resolve_brackets. 2014-10-18 13:23:29 +03:00
Eli Zaretskii
022309033e Fix processing of brackets in isolates and crash in w32select.c. 2014-10-18 10:10:38 +03:00
Eli Zaretskii
4b6d6e6909 Ensure 8-byte stack alignment in w32select's callback.
src/w32select.c (owner_callback): Mark with ALIGN_STACK attribute.
2014-10-18 09:40:04 +03:00
Glenn Morris
1a1f8804c8 Merge from emacs-24; up to 2014-07-28T02:47:29Z!fgallina@gnu.org 2014-10-17 09:14:37 -07:00
Eli Zaretskii
cacd5c3580 Fix display on X of 1-pixel R2L characters.
src/xterm.c (x_draw_hollow_cursor): Fix display of hollow cursor on
 1-pixel R2L characters.
 Reported by Dmitry Antipov <dmantipov@yandex.ru>, see
 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00518.html.
2014-10-17 09:43:36 +03:00
Eli Zaretskii
19068c105a Fix a typo in a comment. 2014-10-16 17:56:57 +03:00
Eli Zaretskii
e23e97d504 Cherry-pick a fix from trunk; fix level handling in bidi_resolve_brackets. 2014-10-16 16:18:00 +03:00
Eli Zaretskii
40018ffb38 src/bidi.c (bidi_find_bracket_pairs): Avoid a loop that does nothing useful. 2014-10-16 09:55:34 +03:00
Glenn Morris
10471ae361 Merge from emacs-24; up to 2014-07-27T18:05:37Z!eliz@gnu.org 2014-10-15 21:49:34 -04:00
Glenn Morris
affeda3b11 Tabify recent ChangeLog change 2014-10-15 21:47:10 -04:00
Paul Eggert
efd91b5847 * bidi.c (bidi_find_bracket_pairs): Initialize local var.
This pacifies GCC 4.9.1 with --enable-gcc-warnings.
It's not clear to me whether the initialization is needed,
but it can't hurt so I played it safe.
2014-10-15 10:53:04 -07:00
Stefan Monnier
dcdf2bd8d6 * lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Enable by default.
Remove incorrect handling of eldoc-print-after-edit.
(eldoc-message-commands, eldoc-last-data): Use defvar.
* lisp/loadup.el (emacs-lisp/eldoc): Load it.
* src/lisp.mk (lisp): Add emacs-lisp/eldoc.elc.
2014-10-15 13:32:41 -04:00