1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-23 16:30:46 -08:00
Commit graph

37915 commits

Author SHA1 Message Date
Eli Zaretskii
2021680e9d ; Restore some of the recent deletions in fileio.c
* src/fileio.c (Finsert_file_contents, choose_write_coding_system):
Restore some of the recently deleted calls to CHECK_CODING_SYSTEM.
2015-10-04 12:23:45 +03:00
Andreas Schwab
9a05f0ac95 * src/coding.c (complement_process_encoding_system): Revert last
change.
2015-10-03 20:15:44 +02:00
Andreas Schwab
b235ceaaf6 More validatation of coding systems
* src/fileio.c (Finsert_file_contents): Remove redundant
coding-system check.
(choose_write_coding_system): Likewise.
* src/coding.c (complement_process_encoding_system): Check
argument for valid coding system.
2015-10-03 14:50:50 +02:00
Eli Zaretskii
272ca09635 Avoid crashes in coding_inherit_eol_type
* src/coding.c (coding_inherit_eol_type): Check the validity of
the arguments.  Suggested by Andreas Schwab <schwab@linux-m68k.org>.
(Bug#21602)
2015-10-03 15:39:17 +03:00
Eli Zaretskii
265d525a5e More validatation of coding system in 'write-region'
* src/coding.c (choose_write_coding_system): More validation of
coding-system from various sources.  Suggested by Andreas Schwab
<schwab@linux-m68k.org>.  (Bug#21602)
2015-10-03 14:49:16 +03:00
Eli Zaretskii
658f2c450d Avoid crashes due to invalid coding-system
* src/fileio.c (choose_write_coding_system)
(Finsert_file_contents): Check validity of coding-system-for-write
and coding-system-for-read bound by the caller.  (Bug#21602)
2015-10-03 13:44:44 +03:00
Tassilo Horn
de7fc458e9 Revert my two recent process.c changes
Revert "Improve last commit to process.c" and "Remove callback-handled
channels from Available set" because they did not fix bug#21313.

This reverts commits bfa1aa8e2b and
27f871907c..
2015-10-03 06:02:11 +02:00
Paul Eggert
355ccbcf33 Fix problems found by clang 3.5.0
* src/cmds.c (Fdelete_char): Don’t assume XINT returns int.
* src/font.c (font_parse_family_registry):
Use &"str"[X] instead of "str"+X, to pacify clang -Wstring-plus-int.
2015-10-02 08:34:50 -07:00
Eli Zaretskii
6083f333ed Revert "Attempt to fix slow redisplay caused by last changes"
* src/xdisp.c (try_window_id, try_window_reusing_current_matrix)
(try_cursor_movement): Don't relax requirements for redisplay
optimizations for the selected frame.  (Bug#21597)

This reverts commit c4c1fb9772.
2015-10-01 21:03:10 +03:00
Eli Zaretskii
511a18ded3 Fix slow redisplay when daemon frame exists
* src/xdisp.c (redisplay_internal): Don't consider daemon frames
when looking for frames that need to be redisplayed.  (Bug#21597)
2015-10-01 20:21:28 +03:00
Eli Zaretskii
c4c1fb9772 Attempt to fix slow redisplay caused by last changes
* src/xdisp.c (try_window_id, try_window_reusing_current_matrix)
(try_cursor_movement): Relax requirements for redisplay
optimizations for the selected frame.  (Bug#21597)
2015-10-01 19:56:46 +03:00
Stephen Leake
7a94cf9656 Improve doc strings in dired.c
* src/dired.c (Ffile_name_completion, Ffile_name_all_completions):
Improve doc string.
2015-10-01 09:34:00 -05:00
Eli Zaretskii
4a6780ea89 Avoid assertion violations in push_prefix_prop
* src/xdisp.c (push_prefix_prop): Avoid assertion violations when
a line that has a line-prefix defined starts with an image.  (Bug#21428)
2015-09-30 22:43:42 +03:00
Eli Zaretskii
5c9304ea86 Disable some display optimizations when frames need redisplay
These optimizations were previously disabled by the
windows_or_buffers_changed flag, which now is not set
when only some frames need to be redrawn.
* src/xdisp.c (redisplay_internal): Redisplay any frame whose
'redisplay' flag is set.
(try_window_reusing_current_matrix, try_window_id)
(try_cursor_movement): Disable these optimizations when the
frame's 'redisplay' flag is set.
2015-09-30 22:32:14 +03:00
Stefan Monnier
8b1df96013 Try to avoid redisplaying all frames when creating a new one
* src/xfns.c (x_set_menu_bar_lines, x_change_tool_bar_height):
* src/xfaces.c (Finternal_make_lisp_face, Finternal_copy_lisp_face)
(Finternal_set_lisp_face_attribute, update_face_from_frame_parameter):
* src/frame.c (x_set_screen_gamma): Set the specific frame's
`redisplay' bit rather than windows_or_buffers_changed.

* src/window.c (apply_window_adjustment): Remove redundant setting of
windows_or_buffers_changed.

* src/xdisp.c (redisplay_internal): Set the specific frame's
`redisplay' bit rather than update_mode_lines in response to
cursor_type_changed.
(syms_of_xdisp): Use hash-tables for redisplay_*_cause tables.
(AINC): Adjust accordingly.
2015-09-30 10:00:13 -04:00
Eli Zaretskii
44298d3cf8 ; Yet another tweak of pos-visible-in-window-p doc string 2015-09-30 16:51:48 +03:00
YAMAMOTO Mitsuharu
ecedfd66fc * src/macfont.m (mac_font_descriptor_supports_languages): Regard "zh" as synonym of "zh-Hans". 2015-09-30 19:05:27 +09:00
YAMAMOTO Mitsuharu
d22634e518 Work around crash when displaying etc/HELLO on OS X 10.11
* src/macfont.m (mac_font_get_weight)
(mac_font_descriptor_get_adjusted_weight): New functions.
(macfont_store_descriptor_attributes): Adjust weight.
2015-09-30 18:56:30 +09:00
Eli Zaretskii
1c6a58705b ; Clarify docs of pos-visible-in-window-p some more 2015-09-30 12:46:17 +03:00
YAMAMOTO Mitsuharu
ecbb6aeb5f * src/macfont.m: Fix compilation with USE_CT_GLYPH_INFO. 2015-09-30 18:43:25 +09:00
Eli Zaretskii
47089e0cc8 Clarify documentation of pos-visible-in-window-p
* src/window.c (Fpos_visible_in_window_p): Clarify the meaning of
t for POS.  See
http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg01040.html
for the original report.

* doc/lispref/windows.texi (Window Start and End): Clarify the
meaning of t for the POSITION argument of pos-visible-in-window-p.
2015-09-30 10:19:41 +03:00
Eli Zaretskii
3a0974d939 ; Remove unnecessary resetting of inhibit_free_realized_faces 2015-09-28 16:48:52 +03:00
Eli Zaretskii
85cd80bb16 ; Fix last commit 2015-09-28 16:00:13 +03:00
Eli Zaretskii
a11ae01df9 Another attempt to fix crashes due to prematurely freed faces
* src/xdisp.c (redisplay_internal): Inhibit freeing of realized
faces for as long as we might have desired matrices that reference
those faces.  (Bug#21428)
2015-09-28 15:50:29 +03:00
Anders Lindgren
e55460e53c Respect value of frame_resize_pixelwise when handling fullscreen state.
* src/nsterm.m (handleFS): Respect frame_resize_pixelwise when
setting size increments.
2015-09-28 08:11:14 +02:00
Michael Albinus
73b0901ce0 * src/gfilenotify.c (Fgfile_add_watch): Cleanup temporary variable. 2015-09-27 20:16:06 +02:00
Eli Zaretskii
e573d08ef1 Make face realization be more frame-specific
* src/frame.h (struct f): New flag face_change.
* src/xfaces.c (Finternal_make_lisp_face)
(Finternal_copy_lisp_face, Finternal_set_lisp_face_attribute)
(update_face_from_frame_parameter): Set the face_change flag only
for the frame whose faces are affected.
* src/xdisp.c (init_iterator): If a frame's face_change flag is
set, free faces only on that frame.
(redisplay_internal): Disable "display optimization 1" if the
frame's face_change flag is set.
(redisplay_window): Don't allow skipping a window's redisplay if
its frame's face_change flag is set.
* src/frame.c (x_set_screen_gamma): Instead of calling
Fclear_face_cache, call clear_face_cache and set
windows_or_buffers_changed to a non-zero value.  This avoids
setting the global face_change flag that triggers face realization
on all frames and thorough redisplay of all of them.

* lisp/term/tty-colors.el (tty-register-default-colors): Don't
clear face cache if the selected frame is a GUI frame.
2015-09-26 09:50:58 +03:00
Eli Zaretskii
00908ee96e Avoid non-ASCII decoding errors in C src files
* src/nsterm.m:
* src/lisp.h:
* src/editfns.c:
* src/doprnt.c: Add 'coding' cookies -- these files include
Unicode characters and should be decoded as UTF-8.
2015-09-25 20:29:27 +03:00
Eli Zaretskii
58ecdad0b0 Prevent timers from messing up TTY menus
* src/term.c (tty_menu_activate): Inhibit redisplay for as long as
the TTY menu is open.  (Bug#21530)
2015-09-24 21:04:42 +03:00
Stefan Monnier
8f88db1494 Fix recent bootstrap problems
* src/syntax.c (parse_sexp_propertize): Fix last fix.
* lisp/nxml/nxml-mode.el (nxml-comment-quote-nested): Fix paren typo.
* lisp/emacs-lisp/lisp-mode.el: Require cl-lib for cl-progv.
2015-09-24 08:54:39 -04:00
Michael Albinus
8c909d7512 * src/gfilenotify.c (Fgfile_add_watch): Decrease polling rate. 2015-09-24 09:36:12 +02:00
Paul Eggert
791355fd40 Prefer CALLN in a few more places
* src/macfont.m (macfont_set_family_cache):
* src/nsterm.m (append2):
* src/xterm.c (x_cr_export_frames):
Prefer CALLN to allocating the arg arrays by hand.
2015-09-23 14:44:35 -07:00
Michael Albinus
cad8aef324 Continue gfilenotify.c implementation of missing parts
* lisp/filenotify.el (file-notify-add-watch): Append `flags' to
`gfile-add-watch' call.
(file-notify-rm-watch): Modify `file-notify-descriptors' only
after calling the low level functions.

* src/gfilenotify.c (dir_monitor_callback): Check, whether
event_type is expected.
(Fgfile_add_watch): Allow also `change'and `attribute-change' for FLAGS.
(Fgfile_rm_watch): Fix typo.
(syms_of_gfilenotify): Declare Qchange and Qattribute_change.
2015-09-23 20:34:22 +02:00
Stefan Monnier
4c0fed13e5 * src/syntax.c: Handle spurious e_property_truncated flag
* src/syntax.c (parse_sexp_propertize): Handle spurious
e_property_truncated flag.
(update_syntax_table_forward): Remove invalid assertion.
2015-09-23 12:33:48 -04:00
Eli Zaretskii
aab67529d2 Support ':relative-width' space display spec on text-mode terminals
* src/xdisp.c (produce_stretch_glyph): Support ':relative-width'
space display spec on text-mode terminals, by calling
PRODUCE_GLYPHS instead of x_produce_glyphs.  Remove the HAVE_WINDOW_SYSTEM
guards from the supporting code, as well as the test for a GUI frame.
2015-09-23 16:20:10 +03:00
Eli Zaretskii
62831e7c3f Fix 'current-column' in presence of :relative-width
* src/indent.c (check_display_width): Support ':relative-width'
in a display spec that specifies a stretch glyph.  (Bug#21533)
2015-09-22 19:33:47 +03:00
Tassilo Horn
bfa1aa8e2b Improve last commit to process.c 2015-09-22 10:20:17 +02:00
Michael Albinus
170ed29b43 Implement gfile-valid-p
* lisp/filenotify.el (file-notify-callback): Fix typo.
(gfile-valid-p): Remove defalias.

* src/gfilenotify.c (dir_monitor_callback): Cancel the monitor if
the file or directory to be watched is deleted.
(Fgfile_add_watch): Make watch_object a triple.
(Fgfile_rm_watch): Check, whether watch is cancelled already.
(Fgfile_valid_p): New defun.
(syms_of_gfilenotify): Declare Sgfile_valid_p.
2015-09-22 08:40:08 +02:00
Tassilo Horn
27f871907c Remove callback-handled channels from Available set
* src/process.c (wait_reading_process_output): Remove channel from
Available set if it is handled by a callback, e.g., dbus or
inotify (bug#21313).
2015-09-22 07:43:39 +02:00
Paul Eggert
cf91ea794b Pacify GCC -Wmaybe-uninitialized in xdisp.c
* src/xdisp.c (face_before_or_after_it_pos): Use do-while rather
than while loop to avoid GCC -Wmaybe-uninitialized diagnostic with
charpos.  The loop should always execute at least once anyway.
2015-09-21 07:45:53 -07:00
Eli Zaretskii
e2f0dd2f49 Avoid infinite recursion while displaying box face
* src/xdisp.c (face_before_or_after_it_pos): Fix calculation of
the previous string/buffer character position under bidi
iteration.  (Bug#21428)
2015-09-21 12:35:26 +03:00
Anders Lindgren
18028318d8 Keep upper edge unchanged when changing size of NS frame (Bug#21415)
* src/nsterm.m (x_set_window_size): Keep upper frame edge unchanged
(Bug#21415).
2015-09-21 09:01:18 +02:00
Michael Albinus
8c8e6cd3dc ; Preserve formatting in docstring of dbusbind.c 2015-09-17 09:25:21 +02:00
Paul Eggert
032ce1c7d1 Omit unnecessary \ before paren in C docstrings
Although \( is needed in docstrings in Elisp code, it is not needed in
docstrings in C code, since C function definitiions do not start with
a parenthesis.  The backslashes made the docstrings a bit harder to
read and to format in columns.  Also, some C docstrings had ( in
column 1 and this did not appear to be causing any problems.  So,
simplify C docstrings by replacing \( with ( and \) with ).
2015-09-16 16:26:07 -07:00
Paul Eggert
8865587c55 Add -Wswitch to --enable-gcc-warnings
Make --enable-gcc-warnings a bit pickier, by also using -Wswitch.
* configure.ac (WERROR_CFLAGS): Don’t add -Wno-switch.
* lib-src/etags.c (main, consider_token, C_entries):
* src/coding.c (encode_invocation_designation):
* src/data.c (Ftype_of):
* src/eval.c (Fdefvaralias, default_toplevel_binding)
(Fbacktrace__locals, mark_specpdl):
* src/lisp.h (record_xmalloc):
* src/syntax.c (scan_lists, scan_sexps_forward):
* src/window.c (window_relative_x_coord):
* src/xdisp.c (push_it, pop_it):
* src/xterm.c (xg_scroll_callback, x_check_fullscreen):
Error out or do nothing (as appropriate) if a switch statement
with an enum value does not cover all of the enum.
* src/dispextern.h (struct iterator_stack_entry.u.comp):
Remove unused member discovered by using -Wswitch.
* src/lisp.h (record_xmalloc): Add a ‘+ 0’ to pacify -Wswitch.
* src/vm-limit.c (check_memory_limits):
Simplify warning-diagnostic computation by using a table.
2015-09-16 15:07:23 -07:00
Michael Albinus
c762d3305c Use common report_file_notify_error function
* src/fileio.c (report_file_notify_error): New function.

* src/inotify.c (report_inotify_error): Remove function.
(inotify_callback, symbol_to_inotifymask, Finotify_add_watch)
(Finotify_rm_watch): Use report_file_notify_error.

* src/lisp.h (report_file_notify_error): Declare external function.

* src/w32notify.c (report_w32notify_error): Remove function.
(Fw32notify_add_watch, Fw32notify_rm_watch):
Use report_file_notify_error.
2015-09-16 15:50:37 +02:00
Martin Rudalics
1636e8c75a Remove tool_bar_redisplayed_once and associated code.
* src/frame.h (tool_bar_redisplayed_once): Remove slot.
* src/frame.c (make_frame, x_set_font): Remove initialization of
f->tool_bar_redisplayed_once.
* src/w32fns.c (x_change_tool_bar_height):
* src/xfns.c (x_change_tool_bar_height): Don't check for
f->tool_bar_redisplayed_once.
* src/xdisp.c (redisplay_internal): Remove handling of
f->tool_bar_redisplayed_once.
2015-09-16 12:01:06 +02:00
Paul Eggert
7f6b6f1a16 Pacify --enable-gcc-warnings
* src/inotify.c (report_inotify_error): Declare it _Noreturn.
2015-09-15 07:29:20 -07:00
Michael Albinus
67e515d346 Improve error reports in inotify.c
* src/inotify.c (report_inotify_error): New function.  Clone of
report_w32notify_error.
(inotify_callback, symbol_to_inotifymask, Finotify_add_watch)
(Finotify_rm_watch): Use it.
2015-09-15 14:57:22 +02:00
Michael Albinus
67ddc7c55d Adaot file-notify-tests.el test cases
* lisp/filenotify.el (file-notify-rm-watch): Ignore `file-notify-error'.

* src/inotify.c (Finotify_valid_p): Adapt docstring.

* test/automated/file-notify-tests.el ()
(file-notify-test03-autorevert)
(file-notify-test04-file-validity)
(file-notify-test04-file-validity-remote)
(file-notify-test05-dir-validity)
(file-notify-test05-dir-validity-remote): Adapt docstring.
(file-notify-test04-file-validity): Let events arrive before
calling final `file-notify-valid-p'.  Do not ignore errors.
(file-notify-test05-dir-validity): Do not manipulate
`temporary-file-directory', it isn't necessary.  Let events arrive
before calling final `file-notify-valid-p'.  Do not ignore errors.
2015-09-14 22:15:20 +02:00