1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 23:10:47 -08:00
Commit graph

37467 commits

Author SHA1 Message Date
Daniel Colascione
2cc23f170f Finalizer documentation, minor improvements
* doc/lispref/objects.texi (Finalizer Type): New section
(Type Predicates): Mention finalizers in `type-of' documentation.
* doc/lispref/elisp.texi (Top): Link to finalizer type.

* src/data.c (Ftype_of): Make `type-of' work with finalizers.
(syms_of_data): Register Qfinalizer.

* src/print.c (print_object): Print whether a finalizer has
been called.

* test/automated/finalizer-tests.el (finalizer-object-type): Test that
`type-of' works correctly for finalizers.
2015-03-02 19:08:06 -08:00
Daniel Colascione
9d8d065814 Add support for finalizers
+2015-03-02  Daniel Colascione  <dancol@dancol.org>
+
+	* NEWS: Mention finalizers.
+
 2015-02-09  Gareth Rees  <gdr@garethrees.org>  (tiny change)

 	* NEWS.24: Fix typo (bug#19820)
diff --git a/src/ChangeLog b/src/ChangeLog
index 4aa64c1..2f04d0b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,21 @@
+2015-03-02  Daniel Colascione  <dancol@dancol.org>
+
+	* print.c (print_object): Print finalizers.
+
+	* alloc.c:
+	(finalizers, doomed_finalizers): New variables.
+	(init_finalizer_list, finalizer_insert, unchain_finalizer)
+	(mark_finalizer_list, queue_doomed_finalizers)
+	(run_finalizer_handler, run_finalizer_function, run_finalizers):
+	New functions.
+	(garbage_collect_1, mark_object, sweep_misc)
+	(init_alloc_once, syms_of_alloc): Support finalizers.
+	(gc-precise-p): New Lisp variable.
+
+	* lisp.h (Lisp_Misc_Type): New value Lisp_Misc_Finalizer.
+	(FINALIZERP, XFINALIZER): New functions.
+	(Lisp_Finalizer): New structure.
+
 2015-02-28  Paul Eggert  <eggert@cs.ucla.edu>

 	* character.c (alphabeticp, decimalnump): Avoid undefined behavior
diff --git a/test/ChangeLog b/test/ChangeLog
index cf1b2c1..684e98f 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-02  Daniel Colascione  <dancol@dancol.org>
+
+	* automated/finalizer-tests.el (finalizer-basic)
+	(finalizer-circular-reference, finalizer-cross-reference)
+	(finalizer-error): New tests.
+
 2015-03-01  Michael Albinus  <michael.albinus@gmx.de>

 	* automated/vc-tests.el (vc-test--create-repo): Add check for
2015-03-02 15:39:01 -08:00
Paul Eggert
159e9f4b1c * character.c (alphabeticp, decimalnump): Avoid undefined behavior
if CATEGORY is not an integer, or is an integer out of
unicode_category_t range.
2015-02-28 13:20:51 -08:00
Martin Rudalics
5dd2272ef3 Set can_x_set_window_size and after_make_frame in terminal frames (Bug#19962)
* frame.c (make_initial_frame, Fmake_terminal_frame): Set
can_x_set_window_size and after_make_frame. (Bug#19962).
2015-02-28 19:40:31 +01:00
Eli Zaretskii
1a50945fa4 Improve [:alpha:] and [:alnum:] for multibyte characters (Bug#19878)
src/character.c (alphabeticp, decimalnump): New functions.
 src/character.h (alphabeticp, decimalnump): Add prototypes.
 src/regex.c (ISALNUM, ISALPHA): Check Unicode character properties
 for multibyte characters by calling alphabeticp and decimalnump.
 (BIT_ALPHA, BIT_ALNUM): New bit masks.
 (re_wctype_to_bit): Return them when the class is RECC_ALPHA or
 RECC_ALNUM.
 (re_match_2_internal): Call ISALPHA and ISALNUM when appropriate.

 doc/lispref/searching.texi (Char Classes): Update the documentation of
 [:alpha:] and [:alnum:].

 etc/NEWS: Mention the changes in [:alpha:] and [:alnum:].
2015-02-28 14:25:35 +02:00
Jan D
0537943561 Adjust offset and border calculations for X.
* xfns.c (x_real_pos_and_offsets): Take outer_border as arg also.
Initialize all args.  Get outer_border from window attributes.
Fix typo for top_offset_y.
(x_real_positions): Adjust for new arg to x_real_pos_and_offsets.
(Fx_frame_geometry): Get outer_border also.  Use attrs.width/height.

* xmenu.c (x_menu_show): Adjust for new arg to x_real_pos_and_offsets.

* xterm.h (x_real_pos_and_offsets): Take outer_border as arg also.
2015-02-27 18:46:26 +01:00
Mark Laws
805fe50708 Support daemon mode on MS-Windows (bug#19688)
src/emacs.c <w32_daemon_event> [WINDOWSNT]: New global var.
 (main) [WINDOWSNT]: Initialize it to NULL.  Create the event to
 signal clients we are ready for connections.
 (Fdaemon_initialized): Use DAEMON_RUNNING.
 [WINDOWSNT]: MS-Windows specific code to signal clients we are
 ready for connections.
 src/lisp.h (DAEMON_RUNNING): New macro, encapsulates Posix and
 MS-Windows conditions for running in daemon mode.
 src/minibuf.c (read_minibuf): Use DAEMON_RUNNING.
 src/keyboard.c (kbd_buffer_get_event): Use DAEMON_RUNNING.
 src/dispnew.c (init_display) [WINDOWSNT]: Initialize frames/terminal
 even in daemon mode.

 nt/inc/ms-w32.h (W32_DAEMON_EVENT): New macro.

 lib-src/emacsclient.c (decode_options) [WINDOWSNT]: Don't reject empty
 arguments for --alternate-editor.
 (print_help_and_exit) [WINDOWSNT]: Don't refrain from advertising
 empty arguments for --alternate-editor.
 (start_daemon_and_retry_set_socket) [WINDOWSNT]: MS-Windows
 specific code to start Emacs in daemon mode and wait for it to be
 ready for client connections.

 lisp/server.el (server-process-filter): Force GUI frames on
 MS-Windows in daemon mode, even if a TTY frame was requested.
 lisp/frameset.el (frameset-keep-original-display-p): Don't assume
 windows-nt cannot be in daemon mode.
 lisp/frame.el (window-system-for-display): Don't assume windows-nt
 cannot be in daemon mode.
2015-02-27 12:43:30 +02:00
Jan Djärv
5917b7907a Don't use OUTER_TO_INNER macros for plain X and lucid.
* xmenu.c (create_and_show_popup_menu): Call XTranslateCoordinates,
dont use OUTER_TO_INNER macros.
(x_menu_show): Call x_real_pos_and_offsets, don't use
OUTER_TO_INNER macros.
2015-02-26 16:42:03 +01:00
Paul Eggert
d8e9122115 Merge from origin/emacs-24
e726f20 Handle "#" operator properly inside macro.  Fix coding bug.
618931b Handle dead frame in menu-bar-non-minibuffer-window-p.  (Bug#19728)
017a03a Document MS-Windows file-name idiosyncrasies  (Bug#19463)
f3faf4f Fix description of Customize buffer in Emacs manual.
1c1d0b7 Fix a typo in the Emacs manual's Hungry Delete description.
be7fb82 src/dispextern.h (FACE_FOR_CHAR): Fix the commentary.
33c4409 Spelling fixes
6c8231e python.el: Handle tabs in python-indent-dedent-line.
41c3b92 * lisp/progmodes/python.el: Respect user indentation after comment.
868df45 Avoid compiler warnings in decode_env_path.
b28c979 Fix XEmacs version typo in comment and ChangeLog
989fb32 Improve solution of bug #19701
6310530 Fix refilling of list of language environments in User Manual
c4c447d Restore XEmacs compatibility

Conflicts:
	doc/emacs/ChangeLog
	lisp/ChangeLog
	src/ChangeLog
	test/ChangeLog
2015-02-25 22:53:56 -08:00
Paul Eggert
8ae2142555 * xfns.c (x_real_pos_and_offsets): Fix pointer signedness. 2015-02-25 20:43:38 -08:00
Jan D
719fd93346 Redo the whole window offsets and coordinate translation for X.
* frame.h (struct frame): Remove x_pixels_diff, y_pixels_diff.

* w32fns.c (x_real_positions): Remove setting of x_pixels_diff,
y_pixels_diff.

* xfns.c (x_real_pos_and_offsets): New function, basically the code
from x_real_positions.
(x_real_positions): Call x_real_pos_and_offsets.
(x_relative_mouse_position): Use XTranslateCoordinates instead of
OUTER_TO_INNER_DIFF macros.
(Fx_frame_geometry): Get offsets with x_real_pos_and_offsets,
border from window attributes.  Adjust tool bar and menu widths.

* xmenu.c (create_and_show_popup_menu): Use XTranslateCoordinates
instead of OUTER_TO_INNER_DIFF macros.

* xterm.h (struct x_output): Remove x_pixels_outer_diff,
y_pixels_outer_diff, FRAME_OUTER_TO_INNER_DIFF_X,
FRAME_OUTER_TO_INNER_DIFF_Y. Declare x_real_pos_and_offsets.
2015-02-25 20:16:44 +01:00
Paul Eggert
b74db6347c Backtrace after malloc arena is corrupted
Without this change, if the malloc arena is corrupted and then
'backtrace' is called, the backtrace can crash because 'backtrace'
calls 'malloc'.  For more, please see:
https://sourceware.org/ml/libc-alpha/2015-02/msg00678.html
* emacs.c (main): Initialize tables used by 'backtrace'.
* sysdep.c (emacs_backtrace): Document the newly used part of the API.
2015-02-24 16:35:03 -08:00
Jan D
9f5a24a6fd Implement x-frame-geometry for NS.
* src/nsfns.m (Fx_frame_geometry): New function.
(syms_of_nsfns): Defsubr Sx_frame_geometry.
2015-02-22 17:24:32 +01:00
Paul Eggert
14b4e657e2 Spelling fixes
* lisp/cedet/semantic/doc.el (semantic-documentation-comment-preceding-tag):
Rename from semantic-documentation-comment-preceeding-tag.  All
uses changed.  Leave an obsolete alias behind.
* src/lisp.h (DEFINE_NON_NIL_Q_SYMBOL_MACROS):
Rename from DEFINE_NONNIL_Q_SYMBOL_MACROS.  All uses changed.
2015-02-21 20:01:05 -08:00
Eli Zaretskii
9074a68499 Prefer 'Qfoo' to 'intern ("foo")' in w32 source files
src/w32term.c (queue_notifications):
 src/w32inevt.c (handle_file_notifications):
 src/w32font.c (w32_enumfont_pattern_entity): Prefer 'Qfoo' to
 'intern ("foo")'.
2015-02-21 14:54:08 +02:00
Paul Eggert
3ebf06300b Prefer 'Qfoo' to 'intern ("foo")'
* buffer.c (syms_of_buffer):
* bytecode.c (exec_byte_code):
* callint.c (Fcall_interactively):
* callproc.c (create_temp_file):
* charset.c (define_charset_internal):
* coding.c (syms_of_coding):
* editfns.c (syms_of_editfns):
* emacs.c (main):
* fns.c (syms_of_fns):
* frame.c (delete_frame, Fframe_parameters):
* keyboard.c (syms_of_keyboard):
* keymap.c (syms_of_keymap):
* minibuf.c (read_minibuf, syms_of_minibuf):
* nsfns.m (ns_cursor_type_to_lisp):
* textprop.c (syms_of_textprop):
* xdisp.c (Fformat_mode_line, syms_of_xdisp):
* xfns.c (x_create_tip_frame, Fx_select_font):
* xml.c (parse_region):
Prefer constants like 'Qfoo' to calls like 'intern ("foo")'.
* buffer.c (syms_of_buffer): OK to do (put 'erase-buffer 'disabled
t) here now ...
(keys_of_buffer): ... instead of here.
* ftfont.c (syms_of_ftfont): Move DEFSYM of Qmono from here ...
* xfns.c (syms_of_xfns): ... to here, since ftfont.c is more
optional than xfns.c.
2015-02-21 00:27:00 -08:00
Jan Djärv
51d475a8d8 Avoid endless loop when handling fatal signal.
* src/emacs.c (terminate_due_to_signal): Move totally_unblock_input after
setting fatal_error_in_progress, so gobble_input and *read_socket are
not read if there are pending_signals.
2015-02-20 08:46:38 +01:00
Paul Eggert
3bbf517072 Simplify binary I/O configuration
* lib-src/etags.c: Include <sysstdio.h> rather than <stdio.h>.
(process_file_name, analyze_regex): Use FOPEN_BINARY rather than
hard-coded "b".
* src/lread.c (Fload): Prefer FOPEN_TEXT and FOPEN_BINARY to
#ifdef DOS_NT.
* src/sysstdio.h: Add copyright notice.  Include <fcntl.h>.
(FOPEN_BINARY, FOPEN_TEXT): New macros.
* src/xfaces.c (Fx_load_color_file): Use FOPEN_TEXT, since POSIX
doesn't guarantee that "t" will work.
2015-02-19 19:21:32 -08:00
Eli Zaretskii
a2f904981d Avoid aborts when input-method-function changes this-command-keys (Bug#19774)
src/keyboard.c (read_char): Make sure this_single_command_key_start
 is in sync with this_command_key_count, around the call to
 input-method-function.
2015-02-19 18:48:39 +02:00
Fujii Hironori
37e3549055 Fix display of IME window on MS-Windows (Bug#11732)
src/w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Pass the
 message to DefWindowProc, after positioning the IME window, to
 trigger its display.

 Copyright-paperwork-exempt: yes
2015-02-19 13:40:48 +02:00
Eli Zaretskii
7932d062cf Fix exit code when stdin is at EOF (Bug#19897)
src/emacs.c (Fkill_emacs): Exit with specified exit code even if
 stdin is at EOF.
2015-02-18 23:14:31 +02:00
Oscar Fuentes
81d89d88ae Fixes display of prefix argument when input-method-function
* keyboard.c (read_char): When there is an input method function,
do not restore the echo area if a prefix argument is being
introduced.  (Bug#19875)
2015-02-18 05:09:12 +01:00
Kelly Dean
cec04fb220 * src/keyboard.c (timer_check_2): Fix incorrect comment 2015-02-17 22:08:51 -02:00
Martin Rudalics
ffec11d9b4 Fix doc-string of x_frame_normalize_before_maximize.
* xterm.c (x_frame_normalize_before_maximize): Fix doc-string.
Suggested by Alan Mackenzie <acm@muc.de>.
2015-02-14 18:50:37 +01:00
Eli Zaretskii
93888585de Fix assertion violations when popping menus on TTY (Bug#19862)
src/menu.c (Fx_popup_menu) [HAVE_X_WINDOWS]: Call
 x_relative_mouse_position only for X frames.
2015-02-14 15:11:30 +02:00
Paul Eggert
65563fd771 Better support for future plugins
See the thread containing:
http://lists.gnu.org/archive/html/emacs-devel/2015-02/msg00720.html
* lib-src/make-docfile.c (write_globals): Generate code that #defines
Qxxx macros other than Qnil only if DEFINE_NONNIL_Q_SYMBOL_MACROS.
Qnil is safe to define even in plugins, since it must be zero for
other reasons.
* src/lisp.h (DEFINE_LISP_SYMBOL): New macro, replacing and simplifying
DEFINE_LISP_SYMBOL_BEGIN / DEFINE_LISP_SYMBOL_END.  All uses changed.
(DEFINE_NONNIL_Q_SYMBOL_MACROS): New macro, defaulting to true.
2015-02-12 18:21:32 -08:00
Martin Rudalics
02138cb0b8 Improve toggling fullscreen state of frames.
* frame.el (toggle-frame-maximized, toggle-frame-fullscreen):
Rename frame parameter `maximized' to `fullscreen-restore'.
Restore fullwidth/-height after fullboth state.  Update
doc-strings.
* w32term.c (w32_read_socket): In SIZE_MAXIMIZED and
SIZE_RESTORED cases correctly handle `maximized' value for the
`fullscreen' parameter.  Don't use the 'maximized' parameter any
more.
(w32fullscreen_hook): Include menu bar height when calculating
new text height in FULLSCREEN_BOTH case.
* xterm.c (do_ewmh_fullscreen): Handle transition from
FULLSCREEN_BOTH to FULLSCREEN_MAXIMIZED when
x_frame_normalize_before_maximize is set.
* frames.texi (Size Parameters): Update description of
fullscreen frame parameter.
2015-02-11 09:07:24 +01:00
Paul Eggert
f0ed1d6336 Use bool for boolean in xdisp.c
* dispextern.h (display_prop_intangible_p, resize_mini_window)
(pixel_to_glyph_coords, mark_window_display_accurate)
(compute_display_string_pos, handle_tool_bar_click)
(x_intersect_rectangles, clear_mouse_face, display_tty_menu_item):
* lisp.h (setup_echo_area_for_printing, message_with_string)
(pos_visible_p): Use bool for boolean.
* xdisp.c: Use bool, true, false intstead of int, 1, 0.
Remove unnecessary forward decls.
(trace_move) [DEBUG_TRACE_MOVE]: Now static.
(CHECK_IT, CHECK_WINDOW_END):
Now an inline function that is always defined.
(check_it) [0]:
(check_window_end) [oGLYPH_DEBUG && ENABLE_CHECKING]:
Remove; no longer needed.
(handle_stop): Prefer (X && !Y) to (X ? !Y : 0).
(get_overlay_strings): Omit unnecessary casts.
(forward_to_next_line_start):
(Ftool_bar_height):
Prefer !BOOL to (BOOL ? 0 : 1).
(next_element_function): New typedef.
(get_next_element): Use it.  Now const.
(IT_POS_VALID_AFTER_MOVE_P): Prefer !X || Y==0 to (X ? Y==0 : 1).
(vmessage): Now ATTRIBUTE_FORMAT_PRINTF (1, 0), to pacify GCC 4.9.2
(display_echo_area): Prefer BOOLEXPR to BOOLEXPR ? 1 : 0.
(tool_bar_item_info): Simplify.
(invisible_prop): Rename from invisible_p, since it doesn't
return bool.  All callers changed.
(x_produce_glyphs): Simplify.
2015-02-09 23:50:18 -08:00
Paul Eggert
21d1f8b85e Check for some overflows in vertical-motion
* indent.c (window_column_x): New function.
(Fvertical_motion): Use it to protect against integer overflow
when computing column.  Prefer extract_float to doing things by hand.
Avoid unnecessary casts.
2015-02-09 11:26:33 -08:00
Paul Eggert
b7028f6736 * xfont.c: Minor style fixes
(xfont_list_pattern): Reindent to 80 cols and use Emacs-style comments.
Redo loop so that less indentation is needed.
2015-02-09 11:08:58 -08:00
Eli Zaretskii
403cb178c7 Speed up vertical-motion when screen coordinates are known
src/indent.c (Fvertical_motion): Accept an additional argument
 CUR-COL and use it as the starting screen coordinate.
 src/window.c (window_scroll_line_based, Fmove_to_window_line): All
 callers of vertical-motion changed.

 doc/lispref/positions.texi (Screen Lines): Update the documentation of
 vertical-motion to document the new additional argument.
2015-02-09 18:24:46 +02:00
Dima Kogan
af560cd6f1 Remove unused assignment.
* font.c (font_score): Remove unused variable assignment.
2015-02-09 15:56:38 +01:00
Dima Kogan
054dcbab24 Try non-scaled xld fonts first, and scaled if that failed.
Fixes: debbugs:19117

* xfaces.c (realize_basic_faces): Don't set Qscalable_fonts_allowed to
t.
* font.c (font_score): Try to find a font without scaling first,
and only accept scalable fonts if we did not get a match.
2015-02-09 15:52:48 +01:00
Stefan Monnier
83e5a17c34 * src/keyboard.c (syms_of_keyboard): Use non-nil default value. 2015-02-09 09:36:26 -05:00
Paul Eggert
2f70087153 Use C99's INFINITY and NAN macros
* lread.c: Include <math.h>.
(string_to_number): Use INFINITY and NAN rather than rolling our own.
This avoids some runtime diagnostics when building with
gcc -fsanitize=undefined.
2015-02-08 23:12:32 -08:00
Paul Eggert
2371717311 Fix bidi_explicit_dir_char undefined behavior
* bidi.c (bidi_explicit_dir_char): Avoid subscript error when
argument is BIDI_EOB.  This can happen in bidi_level_of_next_char.
2015-02-08 18:14:41 -08:00
Paul Eggert
fd6f7d1449 Better distinguish infinite from invalid times
* editfns.c (check_time_validity): New function.
(decode_time_components): Return int, not bool.
Return -1 (not 0) if the time is out of range.
All callers changed.
(lisp_time_struct, lisp_seconds_argument): Distinguish better
between time overflow and invalid time values.
2015-02-08 16:21:44 -08:00
Paul Eggert
61320cc95c Minor tweaks to frame_size_history_add
* frame.c (frame_size_history_add): Don't assume length fits in 'int'.
Prefer XCAR and XCDR to Fcar and Fcdr when the arg is a cons.
(Fframe_after_make_frame): Simplify.
* gtkutil.c: Remove commented-out code.
* xfns.c (Fx_create_frame): Fix indenting.
2015-02-08 10:52:37 -08:00
Eli Zaretskii
dd2aa937d6 Fix a thinko in frame-parameter (Bug#19802)
src/frame.c (Fframe_parameter): Don't replace a non-nil value of
 foreground-color or background-color parameters with a nil value.
2015-02-08 19:54:59 +02:00
Stefan Monnier
60f8214e97 * src/data.c (Findirect_function): Don't signal an error
* src/data.c (Findirect_function): Like `symbol-function', don't signal an
error for void functions any more.
* lisp/subr.el (indirect-function): Change advertised calling convention.
2015-02-08 08:51:10 -05:00
Martin Rudalics
d165578319 Try to improve handling of fullwidth/-height frames.
* frame.el (frame-notice-user-settings): Update
`frame-size-history'.
(make-frame): Update `frame-size-history'.  Call
`frame-after-make-frame'.
* faces.el (face-set-after-frame-default): Remove call to
frame-can-run-window-configuration-change-hook.
* frame.c (frame_size_history_add): New function.
(frame_inhibit_resize): Consider frame_inhibit_implied_resize
only after frame's after_make_frame slot is true.  Inhibit
resizing fullwidth-/height frames in one direction only.  Update
frame_size_history.
(adjust_frame_size): Call frame_size_history_add.
(make_frame): Initalize after_make_frame slot.
(Fmake_terminal_frame): Adjust adjust_frame_size call.
(Fcan_run_window_configuration_change_hook): Rename to
Fframe_after_make_frame.  Set after_make_frame slot.  Return
second argument.
(x_set_frame_parameters): Postpone handling fullscreen parameter
until after width and height parameters have been set.  Apply
width and height changes only if can_x_set_window_size is true.
Update frame_size_history.
(Qadjust_frame_size_1, Qadjust_frame_size_2)
(Qadjust_frame_size_3, QEmacsFrameResize, Qframe_inhibit_resize)
(Qx_set_fullscreen, Qx_check_fullscreen, Qx_set_window_size_1)
(Qxg_frame_resized, Qxg_frame_set_char_size_1)
(Qxg_frame_set_char_size_2, Qxg_frame_set_char_size_3)
(Qxg_change_toolbar_position, Qx_net_wm_state)
(Qx_handle_net_wm_state, Qtb_size_cb, Qupdate_frame_tool_bar)
(Qfree_frame_tool_bar): New symbol for updating
frame_size_history.
(Qtip_frame, Qterminal_frame): New symbols.
(Vframe_adjust_size_history): Rename to frame_size_history.
* frame.h (struct frame): Rename
can_run_window_configuration_change_hook slot to
after_make_frame.
(frame_size_history_add): Extern.
* gtkutil.c (xg_frame_resized): Call frame_size_history_add.
Don't set FRAME_PIXEL_WIDTH and FRAME_PIXEL_HEIGHT here.
(xg_frame_set_char_size): Try to preserve the status of
fullwidth/-height frames.  Call frame_size_history_add.
(tb_size_cb, update_frame_tool_bar, free_frame_tool_bar)
(xg_change_toolbar_position): Call frame_size_history_add.
* w32fns.c (x_change_tool_bar_height): Handle frame's fullscreen
status.
(Fx_create_frame): Process fullscreen parameter after frame has
been resized.
(x_create_tip_frame): Pass Qtip_frame to adjust_frame_size.
(Fx_frame_geometry): Don't pollute pure storage.
* w32term.c (w32_read_socket): For WM_WINDOWPOSCHANGED,
WM_ACTIVATE and WM_ACTIVATEAPP set frame's visibility before
calling w32fullscreen_hook.  For WM_DISPLAYCHANGE call
w32fullscreen_hook immediately.
(x_fullscreen_adjust, x_check_fullscreen): Remove.
(w32fullscreen_hook): Call change_frame_size just as with a
"normal" frame resize operation.  Call do_pending_window_change.
(x_set_window_size): Try to handle fullwidth and fullheight more
accurately.  Don't rely on w32_enable_frame_resize_hack.
(w32_enable_frame_resize_hack): Remove variable.
* widget.c (EmacsFrameResize): Remove dead code.  Call
frame_size_history_add
* window.c (run_window_configuration_change_hook): Check
f->after_make_frame instead of
f->can_run_window_configuration_change_hook.
* xfns.c (x_change_tool_bar_height): Handle frame's fullscreen status.
(Fx_create_frame): Process fullscreen parameter after frame has
been resized.
(Fx_frame_geometry): Don't pollute pure storage.
* xterm.c (x_net_wm_state, x_handle_net_wm_state): Call
frame_size_history_add.
(do_ewmh_fullscreen): Handle x_frame_normalize_before_maximize.
(x_check_fullscreen): Count in menubar when calling
XResizeWindow.  Wait for ConfigureNotify event.  Call
frame_size_history_add.
(x_set_window_size_1): Remove PIXELWISE argument.  Try to handle
changing a fullheight frame's width or a fullwidth frame's
height.  Call frame_size_history_add.
(x_set_window_size): Simplify xg_frame_set_char_size and
x_set_window_size_1 calls.
(x_frame_normalize_before_maximize): New variable.
2015-02-07 11:51:03 +01:00
Paul Eggert
cf498e5b9a Remove no-longer-used cursor_in_echo_area code
* dispnew.c (set_window_cursor_after_update, update_frame_1):
Remove checks for negative cursor_in_echo_area, since this var is
a boolean, and has been a boolean for some time.  Simplify.
* dispnew.c (init_display):
* xdisp.c (message3_nolog, vmessage): Use bool for boolean.
2015-02-06 19:28:56 -08:00
Stefan Monnier
ad5a7c86d0 Add (:documentation <form>) for dynamically-generated docstrings
* lisp/emacs-lisp/bytecomp.el:
(byte-compile-initial-macro-environment): Use macroexp-progn.
(byte-compile-cl-warn): Don't silence use of cl-macroexpand-all.
(byte-compile-file-form-defvar-function): Rename from
byte-compile-file-form-define-abbrev-table.
(defvaralias, byte-compile-file-form-custom-declare-variable): Use it.
(byte-compile): Use byte-compile-top-level rather than
byte-compile-lambda so we can compile non-values.
(byte-compile-form): Add warnings for failed uses of lexical vars via
quoted symbols.
(byte-compile-unfold-bcf): Improve message for failed inlining.
(byte-compile-make-closure): Handle new format of internal-make-closure
for dynamically-generated docstrings.

* lisp/emacs-lisp/cconv.el (cconv--convert-function):
Add `docstring' argument.
(cconv-convert): Use it to handle the new (:documentation ...) form.
(cconv-analyze-form): Handle the new (:documentation ...) form.

* src/eval.c (Ffunction): Handle the new (:documentation ...) form.
(syms_of_eval): Declare `:documentation'.
2015-02-05 14:28:16 -05:00
Martin Rudalics
49aa3a12cc Remove recently added BUFFER arg of `window-text-pixel-size'.
* xdisp.c (Fwindow_text_pixel_size): Remove optional BUFFER
argument added on 2015-02-01.
* display.texi (Size of Displayed Text): Remove description of
optional argument BUFFER of `window-text-pixel-size'.
2015-02-05 15:40:19 +01:00
Paul Eggert
ac27180cca Remove no-longer-used two_byte_p calculations
* dispextern.h (struct glyph_string): Remove member two_byte_p.
All uses removed.
* xdisp.c (get_glyph_face_and_encoding): Remove arg two_byte_p.
All callers changed.
2015-02-03 18:54:01 -08:00
Paul Eggert
1905cb7637 Omit unnecessary var if GTK or NS
* frame.c, frame.h (frame_default_tool_bar_height) [USE_GTK||HAVE_NS]:
Now a constant zero on these platforms.
2015-02-02 16:21:22 -08:00
Martin Rudalics
92a8dec54e Give `window-text-pixel-size' optional BUFFER argument.
[This reinstalls commit 1d1162479c,
which I mistakenly reverted.  --eggert]
* xdisp.c (Fwindow_text_pixel_size): Add optional argument BUFFER.
* display.texi (Size of Displayed Text): Describe optional
argument BUFFER of `window-text-pixel-size'.
2015-02-01 12:06:32 -08:00
Paul Eggert
241260cc28 Revert changes installed by xwidgets merge 2015-02-01 11:45:15 -08:00
Martin Rudalics
1d1162479c Give `window-text-pixel-size' optional BUFFER argument.
* xdisp.c (Fwindow_text_pixel_size): Add optional argument BUFFER.
* display.texi (Size of Displayed Text): Describe optional
argument BUFFER of `window-text-pixel-size'.
2015-02-01 16:49:46 +01:00
Joakim Verona
9fe732a02a Better changelog for xwidgets 2015-02-01 01:30:02 +01:00