1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00
Commit graph

35658 commits

Author SHA1 Message Date
Juanma Barranquero
b6d8543cd5 src/buffer.c (Fset_buffer): Document return value (bug#17015). 2014-03-15 12:16:12 +01:00
Martin Rudalics
cfd5e825ae Document pixelwise frame resizing and fix related bug on Windows.
* w32term.c (x_set_window_size): When frame-resize-pixelwise is
nil, always resize character wise to avoid potential loss of the
mode line (Bug#16923 related).
* display.texi (Temporary Displays): Say that
with-temp-buffer-window makes its buffer current.
* frames.texi (Size and Position): Describe new option
`frame-resize-pixelwise'.  Rewrite descriptions of
`set-frame-size', `set-frame-height' and `set-frame-width'.
2014-03-14 11:38:46 +01:00
Martin Rudalics
8960529e6b Two adjustments in window/frame resizing.
* frame.c (x_set_frame_parameters): Always calculate new sizes
pixelwise to avoid potential loss when rounding.
* window.el (fit-frame-to-buffer): Get maximum width from
display's width instead of height.
2014-03-12 08:28:23 +01:00
Martin Rudalics
3d8bb58a99 Add comment for 2014-03-10T10:31:13Z!rudalics@gmx.at and 2014-03-10T18:53:39Z!rudalics@gmx.at. 2014-03-11 08:20:49 +01:00
Dmitry Antipov
b0b486db04 * xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor.
* xterm.c (x_free_frame_resources): Free all allocated cursors.
2014-03-11 10:50:01 +04:00
Martin Rudalics
f38145ba81 Revert last change to w32_read_socket. 2014-03-10 19:53:39 +01:00
Eli Zaretskii
316d9327d7 src/w32.c (stat_worker): Fix commentary. 2014-03-10 19:31:17 +02:00
Eli Zaretskii
70db0db7bf Fix an obscure bug in fstatat on Windows 9X.
src/w32.c (fstatat): Don't add an extra slash if the argument ends
 with a slash: this fails the subsequent call to stat_worker on
 Windows 9X.  Reported by oslsachem <oslsachem@gmail.com>.
2014-03-10 19:26:45 +02:00
Martin Rudalics
d988d8a475 Unconditionally set visibility to 1 when restoring frame size (Bug#16967).
* w32term.c (w32_read_socket): In SIZE_RESTORED case
unconditionally set visibility of frame to 1.
2014-03-10 11:31:13 +01:00
Martin Rudalics
7e940b6546 Update docs for window dividers and `window-text-pixel-size'.
* xdisp.c (Fwindow_text_pixel_size): Adjust doc-string.
* elisp.texi (Top): Rename section "Width" to "Size of Displayed
Text".
* text.texi (Primitive Indent):
* strings.texi (String Basics):
* sequences.texi (Sequence Functions): Update references
accordingly.
* display.texi (Size of Displayed Text): Rename section from
"Width".  Add description for `window-text-pixel-size'.
(Window Dividers): Reword description of window dividers.
* frames.texi (Layout Parameters): Improve description of window
divider parameters.
* windows.texi (Window Sizes): Add descriptions of
`window-mode-line-height' and `window-header-line-height'.
(Coordinates and Windows): Mention window dividers.
2014-03-09 12:36:51 +01:00
Jan Djärv
e61a31bf99 * nsterm.h (MAC_OS_X_VERSION_10_9): Add.
* nsterm.m (constrainFrameRect:toScreen:): Constrain normally when frame
is only on one screen.

Fixes: debbugs:14713
2014-03-08 16:49:59 +01:00
Eli Zaretskii
281ae1808d src/xdisp.c (Fmove_point_visually): Fix previous change.
Fixes: debbugs:16961
2014-03-08 15:18:43 +02:00
Eli Zaretskii
2c65ad215a Fix more failures of visual-order cursor movement under word-wrap (bug#16961).
src/xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and
 there's a valid wrap point in the display line, the last glyph
 cannot "just barely fit" on this row, because display_line doesn't
 let it.  Instead, proceed as if the last glyph didn't fit, so that
 we eventually back up the iterator to the wrap point.  This avoids
 delusional behavior of move_it_to, whereby it proceeds to the next
 display line, but sets current_x to zero for all the glyphs that
 without word-wrap would fit on the previous display line.  One
 result was that visual-order cursor movement behaved erratically
 under word-wrap.
 (Fmove_point_visually): Add code to find the x coordinate of the
 last character before wrap point, under word-wrap on a TTY.
2014-03-08 12:54:43 +02:00
Eli Zaretskii
b646ea12bd Fix bug #16961 with visual-order cursor movement and word-wrap.
src/xdisp.c (Fmove_point_visually): When under word-wrap, accept
 also return value of MOVE_POS_MATCH_OR_ZV from
 move_it_in_display_line_to, when moving from beginning of line to
 point's position.
2014-03-07 22:00:33 +02:00
Martin Rudalics
2c6053e838 Update docs for select-window and buffer-list-update-hook.
* buffer.c (Vbuffer_list_update_hook): Doc-string fix.
* window.c (Fselect_window): Explain NORECORD and
`buffer-list-update-hook' in doc-string.
* buffers.texi (The Buffer List): Rename node to Buffer List.
Describe `buffer-list-update-hook'.
* elisp.texi (Top): "The Buffer List" renamed to "Buffer List".
Add node for Window Dividers.
* hooks.texi (Standard Hooks): Add reference to
`buffer-list-update-hook'.
* windows.texi (Selecting Windows): Update description of
`select-window'.
2014-03-07 16:11:12 +01:00
Martin Rudalics
cac0a1d67e More window code related fixes and documentation changes.
* window.c (Fother_window_for_scrolling): Check that
Vother_window_scroll_buffer is a buffer.
* window.el (fit-frame-to-buffer, fit-frame-to-buffer-margins):
Fix doc-strings.
(fit-frame-to-buffer): New argument ONLY.  Remove dependency on
fit-frame-to-buffer variable.  Fix doc-string.
(fit-window-to-buffer): Set ONLY argument in call of
fit-frame-to-buffer.  Fix doc-string.
* frames.texi (Size and Position): Rewrite entries for
`fit-frame-to-buffer' and `fit-frame-to-buffer-margins'.  Add
description for `fit-frame-to-buffer-sizes'.
* windows.texi (Resizing Windows): Add descriptions for
pixelwise resizing.  Add entries for `window-resize-pixelwise'
and `fit-window-to-buffer-horizontally'.  Rewrite
`fit-window-to-buffer' entry.
2014-03-06 14:41:58 +01:00
Dmitry Antipov
12e852a208 * xterm.c (xim_initialize): Always pass a copy of resource name
to XRegisterIMInstantiateCallback and eassert whether return
value is True.  Passing copy is important because Xlib doesn't
make its own copy and resource name argument usually points to
SSDATA (Vx_resource_name), which may be changed from Lisp.
(xim_close_display): For XUnregisterIMInstantiateCallback,
always eassert return value and pass exactly the same values
as were used for XRegisterIMInstantiateCallback.  Otherwise
XUnregisterIMInstantiateCallback will always fail.  See Xlib
sources to check why if you are interested.
2014-03-06 15:18:22 +04:00
Martin Rudalics
e1a2cb1ce5 Various window code related fixes and documentation changes.
* dispnew.c (change_frame_size_1): Add new_lines instead of
new_height, the latter may be still zero if passed as such.
* window.c (Fwindow_pixel_height): Mention bottom divider in
doc-string.
* window.el (window-min-height, window-min-width): Rewrite
doc-strings.
(window-body-size): Add PIXELWISE argument to make it consistent
with its callees.
* display.texi (Window Dividers): New section.
* frames.texi (Layout Parameters): Add right-divider-width and
bottom-divider-width.
* windows.texi (Window Sizes): Redraw schematic and rewrite its
description.  Rewrite descriptions of `window-total-height',
`window-total-width', `window-total-size', `window-body-height',
`window-body-width' and `window-size-fixed'.  Add descriptions
for `window-pixel-height', `window-pixel-width',
`window-min-height' and `window-min-width'.  Remove description
of `window-size-fixed-p' moving part of it to that of
`window-size-fixed'.
(Resizing Windows): Mention dividers when talking about minimum
sizes.
2014-03-05 14:50:48 +01:00
Paul Eggert
e6e8a5eb4d Fix "resource temporarily unavailable" with xgselect.
* xgselect.c: Include <stdbool.h>.
(xg_select) [!USE_GTK]: Don't lose track of errno.

Fixes: debbugs:16925
2014-03-04 22:31:57 -08:00
Paul Eggert
d2f720acf5 Fix minor --enable-gcc-warnings issues.
* widget.c (update_various_frame_slots, EmacsFrameResize):
Avoid unused locals.  Prefer 'if' to '#if' when either will do.
2014-03-04 22:28:20 -08:00
Ken Brown
94a089b5f8 Further follow-up to last change in gmalloc.c.
* src/gmalloc.c (aligned_alloc): Clarify the code by making `adj'
represent the actual adjustment needed for alignment.
2014-03-04 14:02:49 -05:00
Eli Zaretskii
201572eca8 Follow-up improvements for last change in gmalloc.c.
src/gmalloc.c (aligned_alloc): Don't allocate more memory than
 needed, and don't reallocate if the initial allocation already
 fits the bill.  Suggested by Ken Brown <kbrown@cornell.edu>.

Fixes: debbugs:16901
2014-03-04 19:35:15 +02:00
YAMAMOTO Mitsuharu
a55130ca10 * xterm.c (x_draw_stretch_glyph_string): Reset clipping. (Bug#16932) 2014-03-04 20:02:36 +09:00
Michal Nazarewicz
5b87d0d9cd * binding.el: Add comment describing why C-d binds to `delete-char'.
* lisp/simple.el (delete-forward-char): Mark as interactive-only.
* src/cmds.c (delete-char): Update docstring pointing out that the
function ignores `delete-active-region' and `overwrite-mode'.
2014-03-03 22:14:11 -05:00
Eli Zaretskii
757c70af04 Fix bug #16930 with broken build --without-x.
src/font.c (Fframe_font_cache): Fix last change.
2014-03-03 21:58:20 +02:00
Eli Zaretskii
bd650c2420 Fix crashes in lisp_align_free in a build with GC_MCHECK.
src/gmalloc.c (aligned_alloc): Fix adjustment of size of the
 allocated buffer due to alignment.
 (freehook): If the block to be freed was allocated by
 'aligned_alloc', find its real pointer before calling 'free'.
 (mabort) [emacs]: Call 'emacs_abort', not 'abort', to provide a
 backtrace.

Fixes: debbugs:16901
2014-03-03 18:46:36 +02:00
Dmitry Antipov
19dae293f9 Avoid crashes when X fonts are erroneously freed on reused X
'Display *' connection data (Bug#16069).  Note that X font
resources still may be leaked, but currently there is no way
to completely avoid it.
* xterm.h (struct x_display_info): New member x_id.  Add comments.
* xterm.c (x_display_id): New variable.
(x_term_init): Assign identifier to each opened X connection.
* xfont.c (struct xfont): New member x_display_id.
(xfont_open): Initialize it with frame's display id.
(xfont_close): Check whether font's display id matches the one
recorded for the given display.  Adjust comment.
* xftfont.c (struct xftfont_info):
(xftfont_open, xftfont_close): Exactly as above with xfont stuff.
2014-03-03 12:27:58 +04:00
Dmitry Antipov
8c1c761122 * font.c (toplevel): Adjust comment about font cache layout.
(font_clear_cache): Fix to match real font cache layout.
Suggested by <namespace_collision@yahoo.com> in Bug#16069.
(Fframe_font_cache) [FONT_DEBUG]: New function.
(syms_of_font) [FONT_DEBUG]: Defsubr it.
2014-03-03 11:46:08 +04:00
Juanma Barranquero
35e951cd4b */ChangeLog: Trivial fixes. 2014-03-03 05:57:26 +01:00
Martin Rudalics
2907acd464 Consider Vother_window_scroll_buffer valid iff it's a live buffer.
* window.c (Fother_window_for_scrolling): Don't try to scroll a
killed Vother_window_scroll_buffer.
(Vother_window_scroll_buffer): Fix doc-string accordingly.
2014-03-01 20:15:29 +01:00
Eli Zaretskii
cb8b26b4ba Fix bug #16751 with crashes in expand-file-name on Windows.
src/fileio.c (Fexpand_file_name) [WINDOWSNT]: Don't treat file names
 that start with more than 2 slashes as UNCs.
2014-03-01 13:51:02 +02:00
Paul Eggert
8268febfe0 Fix a few crashes and leaks when cloning C strings.
* alloc.c, lisp.h (dupstring): New function.
* gtkutil.c (xg_get_font):
* term.c (tty_default_color_capabilities):
* xsettings.c (store_monospaced_changed)
(store_font_name_changed, parse_settings)
(read_and_apply_settings, init_gsettings, init_gconf): Use it.
This avoids some unlikely crashes due to accessing freed storage,
and avoids some minor memory leaks in the more-typical case.
2014-02-28 13:45:34 -08:00
Martin Rudalics
5c80919598 Don't show drag cursor when modeline can't be dragged (Bug#16647).
* xdisp.c (note_mode_line_or_margin_highlight): Don't show drag
cursor when modeline can't be dragged (Bug#16647).
2014-02-28 11:32:11 +01:00
Glenn Morris
2241d76e83 * src/doc.c (Fsnarf_documentation): Snarf not-yet-bound variables
from custom-delayed-init-variables.

Fixes: debbugs:11565
2014-02-27 21:00:17 -05:00
Martin Rudalics
653b6ea317 More fixes for mouse glyph calculations (Bug#16647).
More fixes for mouse glyph calculations (Bug#16647).
* window.c (coordinates_in_window): In intersection of
horizontal and vertical window dividers prefer the horizontal
one.  Add some extra parens to last fix.
(window_relative_x_coord): Return x-coordinate for header and
mode line too.
* xdisp.c (remember_mouse_glyph): In text area don't extend
glyph into mode line to show the vertical drag cursor there
immediately.  Subdivide mouse glyphs in right fringes to show a
horizontal drag cursor as soon as we enter the "grabbable width"
portion.  Handle vertical border case separately.  Do not
subdivide window divider areas.
(note_mouse_highlight): On bottom divider of bottommost windows
show vertical drag cursor only when the minibuffer window can be
resized.
2014-02-27 20:22:10 +01:00
Eli Zaretskii
11de63ede0 Fix bug #16870 with 'box' face in display strings.
src/xdisp.c (pop_it): Restore the it->face_box_p flag which could be
 reset by the face of the object just displayed.  See also bug#76.
 (get_next_display_element): If the string came from a display
 property, examine the box face attribute at it->position, not at
 it->current.pos, since the latter was not updated yet.
 (handle_face_prop): Improve commentary.
2014-02-27 19:42:00 +02:00
Michael Albinus
d8c25f59d6 * dbusbind.c (Fdbus__init_bus, Qdbus__init_bus, Sdbus__init_bus):
Rename from Fdbus_init_bus_1, Qdbus_init_bus_1, Sdbus_init_bus_1.
2014-02-27 16:36:14 +01:00
Martin Rudalics
aea124c47d Fixes around Bug#16647.
* xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and
ON_BOTTOM_DIVIDER cases.
* window.c (coordinates_in_window): Return ON_VERTICAL_BORDER
only if the window has no right divider.
(Fcoordinates_in_window_p): Fix doc-string.
2014-02-26 09:07:34 +01:00
Juanma Barranquero
0e46275b4d src/lread.c (Funintern): Fix doc to match advertised calling convention. 2014-02-25 23:51:34 +01:00
Glenn Morris
7231101775 Add some Authors: headers based on authors.el. 2014-02-25 13:32:52 -05:00
Daniel Colascione
7c56ecf5f5 Fix event race 2014-02-24 06:27:37 -08:00
Glenn Morris
ca58fa737d Misc small frame/window doc
* src/frame.c (frame-alpha-lower-limit, frame-resize-pixelwise):
* src/window.c (window-resize-pixelwise): Doc fixes.

* etc/NEWS: Related edits.
This including unmarking some items marked as ---, where it it not
clear to me that no doc updates are needed.
2014-02-22 13:49:10 -08:00
Glenn Morris
f33095ed6b Bit more doc for process filter and sentinel changes
* src/process.c (Finternal_default_process_filter)
(Finternal_default_process_sentinel): Doc tweaks.

* doc/lispref/processes.texi: Typo fixes.

* etc/NEWS: Related markup.
2014-02-22 13:08:22 -08:00
Glenn Morris
458e643be8 Some doc updates for default process sentinels and filters not being nil
* doc/lispref/internals.texi (Process Internals):
* doc/lispref/processes.texi (Deleting Processes, Output from Processes)
(Process Buffers, Filter Functions, Accepting Output, Sentinels)
(Network, Network Servers, Network Processes, Serial Ports):
Filters and sentinels can no longer be nil.

* doc/lispref/elisp.texi (Top): Menu update.

* doc/misc/flymake.texi (Starting the syntax check process): Grammar fix.

* doc/misc/tramp.texi (External packages): Grammar fix.
Reword for default sentinel not being nil any more.

* src/process.c (Fprocess_buffer, Faccept_process_output)
(Finternal_default_process_filter, Finternal_default_process_sentinel):
Doc fixes.
2014-02-21 00:04:15 -08:00
Martin Rudalics
8dd3e94fb6 Fix handling of window-min-height/-width (Bug#16738).
* window.el (window--dump-window, window--dump-frame): New
functions.
(window--min-size-1): Account for window dividers.  When
window-resize-pixelwise is nil, delay rounding till after the
sum of the window components has been calculated.
(window--min-delta-1, window--max-delta-1): When PIXELWISE is
nil make sure at least one text line and two text columns remain
fully visible.
(window-resize): Signal an error when window-resize-apply fails.
(window--resize-child-windows): Fix calculation of by how many
pixels a window can still be shrunk via window-new-normal.
(adjust-window-trailing-edge): Call window--resizable with
correct TRAIL argument.
2014-02-21 09:02:05 +01:00
Paul Eggert
9901fa1abc Pacify GCC when configuring with --enable-gcc-warnings.
* xdisp.c (move_it_in_display_line_to) [lint]:
Initialize recently-added local.
2014-02-20 23:42:42 -08:00
Daniel Colascione
4819842050 Improve dbus error handling; detect bus failure 2014-02-20 20:32:31 -08:00
Eli Zaretskii
679f782755 Fix excessive calls to bidi_shelve_cache reported in bug #15555.
src/xdisp.c (move_it_in_display_line_to): Save the iterator state in ppos_it
 only once per call.  Reimplement the method used to return to the
 best candidate position if all the positions found in display line
 are beyond TO_CHARPOS.  This cuts down the number of calls to
 bidi_shelve_cache, which moves a lot of stuff when lines are long
 and include bidirectional text.
2014-02-20 19:40:56 +02:00
Eli Zaretskii
dba8296c00 Fix assertion violation in redisplay.
src/xdisp.c (try_cursor_movement): Don't use cursor position if
 set_cursor_from_row failed to compute it.  This avoids assertion
 violations in MATRIX_ROW.
2014-02-20 19:17:54 +02:00
Eli Zaretskii
44a2be2d66 Fix bug #16819 with dereferencing invalid face pointer.
src/xdisp.c (init_iterator): Don't dereference a bogus face
 pointer.
2014-02-20 19:13:55 +02:00