1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-18 10:16:51 +00:00
Commit Graph

107797 Commits

Author SHA1 Message Date
Glenn Morris
bcc0adbf3c * lisp/mail/emacsbug.el (report-emacs-bug): Include `lsb_release -d'. 2012-09-23 17:46:47 -07:00
Paul Eggert
afea8a8abd Move pid_t related decls out of lisp.h.
* lisp.h, syswait.h (record_child_status_change, wait_for_termination)
(interruptible_wait_for_termination):
Move these decls from lisp.h to syswait.h, since they use pid_t.
Needed on FreeBSD; see Herbert J. Skuhra in
<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
* callproc.c: Include syswait.h.
2012-09-23 15:25:22 -07:00
Paul Eggert
18e27ea822 gnutls.c, gtkutil.c: Use bool for boolean.
* gnutls.c (gnutls_global_initialized, init_gnutls_functions)
(emacs_gnutls_handle_error):
* gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
(xg_hide_tooltip, xg_create_frame_widgets)
(create_dialog, xg_uses_old_file_dialog)
(xg_get_file_with_chooser, xg_get_file_with_selection)
(xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
(xg_item_label_same_p, xg_update_menubar)
(xg_modify_menubar_widgets, xg_event_is_for_menubar)
(xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
(xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
(is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
(update_frame_tool_bar, free_frame_tool_bar):
* gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
* nsmenu.m (ns_update_menubar):
* nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
* xfns.c (Fx_show_tip) [USE_GTK]:
Use bool for boolean.
* gtkutil.c (xg_update_frame_menubar):
* xmenu.c (update_frame_menubar):
Return void, not int, since caller ignores return value.
* gtkutil.c (xg_change_toolbar_position):
Return void, not 1.
2012-09-23 12:36:31 -07:00
Glenn Morris
67d63151f2 Useless use of cat 2012-09-23 11:40:55 -07:00
Fabián Ezequiel Gallina
095bb82357 * progmodes/python.el (python-indent-line): More consistent cursor
movement behavior.
2012-09-23 15:21:33 -03:00
Juanma Barranquero
af0e9f75ea src/makefile.w32-in: Update dependencies. 2012-09-23 20:03:48 +02:00
Eli Zaretskii
5101529e98 Clean-up left-overs after 2012-09-23T08:44:20Z!eggert@cs.ucla.edu wrt signal handling.
src/.gdbinit: Set breakpoint on terminate_due_to_signal, not on
 fatal_error_backtrace.
 src/w32proc.c (sys_kill): Undo last change: don't do anything when
 invoked to deliver SIGABRT to our own process.  This is now
 handled by emacs_raise.

 nt/inc/ms-w32.h (emacs_raise): Redefine to invoke emacs_abort.

Fixes: debbugs:12471
2012-09-23 19:34:30 +02:00
Juanma Barranquero
2c3ee0ad12 src/w32term.c (w32_read_socket): Remove reference to deleted variable. 2012-09-23 19:33:16 +02:00
Paul Eggert
62a1d6614e Do not use SA_NODEFER.
Problem reported by Dani Moncayo in
<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
* alloc.c (die):
* sysdep.c (emacs_abort): Do not reset signal handler.
* emacs.c (terminate_due_to_signal): Reset signal handler here.
* sysdep.c (init_signals): Do not use SA_NODEFER.  It wasn't
wanted even on POSIXish hosts, and it doesn't work on Windows.
2012-09-23 10:05:14 -07:00
Stefan Merten
70efc5c91b * textmodes/rst.el: Fix compiler warning. 2012-09-23 16:50:02 +02:00
Roland Winkler
6d5842da83 etc/NEWS: clarify entry for proced-renice 2012-09-23 09:42:55 -05:00
Roland Winkler
2f43823976 lisp/textmodes/bibtex.el: minor bugfixes 2012-09-23 07:46:53 -05:00
Roland Winkler
936ad0418d Add ChangeLog entry for previous commit 2012-09-23 07:35:28 -05:00
Roland Winkler
bc7be45dbd lisp/proced.el: new command proced-renice 2012-09-23 07:34:23 -05:00
Roland Winkler
6fab02746b lisp/ibuf-ext.el (ibuffer-switch-to-saved-filter-groups): Shortcut completing-read if not needed 2012-09-23 06:54:50 -05:00
Chong Yidong
e109c4a651 Doc updates for read-only-mode.
* buffers.texi (Misc Buffer): Replace toggle-read-only with
read-only-mode.

* files.texi (Visiting): Likewise.

* backups.texi (Auto-Saving): Refer to Minor Mode Conventions for
calling conventions.

* buffers.texi (Read Only Buffers): Document read-only-mode.

* keymaps.texi (Alias Menu Items): Replace toggle-read-only with
read-only-mode.
2012-09-23 18:46:50 +08:00
Chong Yidong
9a93067632 Convert toggle-read-only calls to read-only-mode.
* bindings.el (mode-line-toggle-read-only):
* bs.el (bs-toggle-readonly):
* buff-menu.el (Buffer-menu-toggle-read-only):
* dired.el (dired-toggle-read-only):
* ibuffer.el (ibuffer-do-toggle-read-only): Use read-only-mode.
2012-09-23 18:21:34 +08:00
Jan Djärv
a0942b9a36 * xterm.c (x_term_init): Call fixup_locale before and after calling
gtk_init.

Fixes: debbugs:12392
2012-09-23 12:03:35 +02:00
Chong Yidong
218374939e Really fix last change. 2012-09-23 17:25:21 +08:00
Chong Yidong
641cfd145e Fix last change.
* image.c (valid_image_p, make_image): Fix caller to lookup_image_type.
2012-09-23 17:22:38 +08:00
Paul Eggert
c462dda8c8 * Makefile.in (bootstrap): Set MAKEFILE_NAME when building Makefile,
to avoid problems with recursion when using GNU make.
2012-09-23 02:18:24 -07:00
Chong Yidong
d07ff9db92 Remove LIBRARIES arg from w32_delayed_load and friends.
These always use Vdynamic_library_alist anyway.

* src/image.c (Finit_image_library, lookup_image_type)
(define_image_type): Remove now-unneeded second arg.
(init_xpm_functions, init_png_functions, init_jpeg_functions)
(init_tiff_functions, init_gif_functions, init_svg_functions):
Arglist and w32_delayed_load calling convention changed.
(gs_type): Remove init_gs_functions; there is no such function.

* src/gnutls.c (init_gnutls_functions): Caller changed; remove arg.
(Fgnutls_available_p): Caller changed.

* src/xml.c (init_libxml2_functions, Flibxml_parse_html_region)
(Flibxml_parse_xml_region): Likewise.

* src/dispextern.h (struct image_type): Remove arg from init function.

* src/w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
Vdynamic_library_alist.

* lisp/image.el (image-type-available-p): Change caller to
init-image-library.
2012-09-23 17:16:57 +08:00
Paul Eggert
4d7e6e51dd Simplify and avoid signal-handling races.
* nt/inc/ms-w32.h (emacs_raise): New macro.
* src/alloc.c (die):
* src/sysdep.c (emacs_abort) [HAVE_NTGUI]:
Avoid recursive loop if there's a fatal error in the function itself.
* src/atimer.c (pending_atimers):
* src/blockinput.h: Don't include "atimer.h"; no longer needed.
(interrupt_input_pending): Remove.  All uses removed.
pending_signals now counts both atimers and ordinary interrupts.
This is less racy than having three separate pending-signal flags.
(block_input, unblock_input, totally_unblock_input, unblock_input_to)
(input_blocked_p):
Rename from their upper-case counterparts BLOCK_INPUT,
UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
INPUT_BLOCKED_P, and turn into functions.  All uses changed.
This makes it easier to access volatile variables more accurately.
(BLOCK_INPUT_RESIGNAL): Remove.  All uses replaced by unblock_input ().
(input_blocked_p): Prefer this to 'interrupt_input_blocked', as
that's more reliable if the code is buggy and sets
interrupt_input_blocked to a negative value.  All uses changed.
* src/atimer.c (deliver_alarm_signal):
Remove.  No need to deliver this to the parent; any thread can
handle this signal now.  All uses replaced by underlying handler.
* src/atimer.c (turn_on_atimers):
* src/dispnew.c (handle_window_change_signal):
* src/emacs.c (handle_danger_signal):
* src/keyboard.c (kbd_buffer_get_event):
Don't reestablish signal handler; not needed with sigaction.
* src/blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
(UNBLOCK_INPUT_TO):
Rework to avoid unnecessary accesses to volatile variables.
(UNBLOCK_INPUT_TO): Now a function.
(totally_unblock_input, unblock_input): New decls.
* src/data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
(init_data): Remove.  Necessary stuff now done in init_signal.
* src/emacs.c, src/xdisp.c: Include "atimer.h", since we invoke atimer functions.
* src/emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
(fatal_error_code): Remove; no longer needed.
(terminate_due_to_signal): Rename from fatal_error_backtrace, since
it doesn't always backtrace.  All uses changed.  No need to reset
signal to default, since sigaction and/or die does that for us now.
Use emacs_raise (FOO), not kill (getpid (), FOO).
(main): Check more-accurately whether we're dumping.
Move fatal-error setup to sysdep.c
* src/floatfns.c: Do not include "syssignal.h"; no longer needed.
* src/gtkutil.c (xg_get_file_name, xg_get_font):
Remove no-longer-needed signal-mask manipulation.
* src/keyboard.c, src/process.c (POLL_FOR_INPUT):
Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
* src/keyboard.c (read_avail_input): Remove.
All uses replaced by gobble_input.
(Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
(kbd_buffer_store_event_hold, gobble_input):
(record_asynch_buffer_change) [USABLE_SIGIO]:
(store_user_signal_events):
No need to mess with signal mask.
(gobble_input): If blocking input and there are terminals, simply
set pending_signals to 1 and return.  All hooks changed to not
worry about whether input is blocked.
(process_pending_signals): Clear pending_signals before processing
them, in case a signal comes in while we're processing.
By convention callers now test pending_signals before calling us.
(UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
New functions, to support changes to blockinput.h.
(handle_input_available_signal): Now extern.
(reinvoke_input_signal): Remove.  All uses replaced by
handle_async_input.
(quit_count): Now volatile, since a signal handler uses it.
(handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.  All
callers changed.  Block SIGINT only if not already blocked.
Clear sigmask reliably, even if Fsignal returns, which it can.
Omit unnecessary accesses to volatile var.
(quit_throw_to_read_char): No need to restore sigmask.
* src/keyboard.c (gobble_input, handle_user_signal):
* src/process.c (wait_reading_process_output):
Call signal-handling code rather than killing ourselves.
* src/lisp.h: Include <float.h>, for...
(IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
(pending_signals): Now volatile.
(syms_of_data): Now const if IEEE floating point.
(handle_input_available_signal) [USABLE_SIGIO]:
(terminate_due_to_signal, record_child_status_change): New decls.
* src/process.c (create_process): Avoid disaster if memory is exhausted
while we're processing a vfork, by tightening the critical section
around the vfork.
(send_process_frame, process_sent_to, handle_pipe_signal)
(deliver_pipe_signal): Remove.  No longer needed, as Emacs now
ignores SIGPIPE.
(send_process): No need for setjmp/longjmp any more, since the
SIGPIPE stuff is now gone.  Instead, report an error if errno
is EPIPE.
(record_child_status_change): Now extern.  PID and W are now args.
Return void, not bool.  All callers changed.
* src/sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
Remove.  All uses removed.  This bug should be fixed now in a
different way.
(wait_for_termination_1): Use waitpid rather than sigsuspend,
and record the child status change directly.  This avoids the
need to futz with the signal mask.
(process_fatal_action): Move here from emacs.c.
(emacs_sigaction_flags): New function, containing
much of what used to be in emacs_sigaction_init.
(emacs_sigaction_init): Use it.  Block nonfatal system signals that are
caught by emacs, to make races less likely.
(deliver_process_signal): Rename from handle_on_main_thread.
All uses changed.
(BACKTRACE_LIMIT_MAX): Now at top level.
(thread_backtrace_buffer, threadback_backtrace_pointers):
New static vars.
(deliver_thread_signal, deliver_fatal_thread_signal):
New functions, for more-accurate delivery of thread-specific signals.
(handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
(deliver_arith_signal): Handle in this thread, not
in the main thread, since it's triggered by this thread.
(maybe_fatal_sig): New function.
(init_signals): New arg DUMPING so that we can be more accurate
about whether we're dumping.  Caller changed.
Treat thread-specific signals differently from process-general signals.
Block all signals while handling fatal error; that's safer.
xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
on IEEE hosts.
When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
Ignore SIGPIPE unless batch.
(emacs_backtrace): Output backtrace for the appropriate thread,
which is not necessarily the main thread.
* src/syssignal.h: Include <stdbool.h>.
(emacs_raise): New macro.
* src/xterm.c (x_connection_signal): Remove; no longer needed
now that we use sigaction.
(x_connection_closed): No need to mess with sigmask now.
(x_initialize): No need to reset SIGPIPE handler here, since
init_signals does this for us now.

Fixes: debbugs:12471
2012-09-23 01:44:20 -07:00
Jan Djärv
8f4635e97e * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
background rect may be larger.

Fixes: debbugs:12445
2012-09-23 10:28:12 +02:00
Chong Yidong
3296976de2 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence. 2012-09-23 16:24:44 +08:00
Juri Linkov
51c4474efc * lisp/dired.el (dired-mode-map): Add [remap read-only-mode] for
`dired-toggle-read-only'.

Fixes: debbugs:12462
2012-09-23 01:57:11 +03:00
Paul Eggert
d41e491e1b * .gdbinit: Just stop at fatal_error_backtrace.
See Stefan Monnier's request in
<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
Remove no-longer-used query of system type.
2012-09-22 13:35:46 -07:00
Paul Eggert
2e83df57be * trouble.texi (Crashing): Document ulimit -c. 2012-09-22 12:27:25 -07:00
Glenn Morris
bd909927ab ChangeLog typo fix
(not that I remember suggesting anything...)
2012-09-22 11:11:11 -07:00
Chong Yidong
f938eda9e3 Re-arrange and edit NEWS. 2012-09-23 01:19:28 +08:00
Martin Rudalics
43bf5e8e4d Implement temp-output-buffer-show in subr.el.
* subr.el (temp-output-buffer-show): New function.
(with-output-to-temp-buffer): Call temp-output-buffer-show
instead of internal-temp-output-buffer-show.
2012-09-22 18:28:46 +02:00
Chong Yidong
3171e30301 * simple.el (read-only-mode): Doc fix. 2012-09-22 23:46:57 +08:00
Chong Yidong
3df47cd5f6 * files.el (ctl-x-map): Bind C-x C-q to read-only-mode.
Fixes: debbugs:12462
2012-09-22 23:44:43 +08:00
Chong Yidong
c88b867fec Misc doc fixes.
* searching.texi (Replacing Match): Minor clarification.

* lisp/repeat.el (repeat): Doc fix.

* lisp/simple.el (shell-command-on-region): Doc fix.

* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix.

* cmds.c (Fforward_char, Fbackward_char): Doc fix.

* editfns.c (Fline_beginning_position): Doc fix.
(Fline_end_position): Doc fix.

* minibuf.c (Finternal_complete_buffer): Doc fix.

* search.c (Freplace_match): Doc fix.

Fixes: debbugs:12325 debbugs:12391 debbugs:12416 debbugs:12414 debbugs:10909 debbugs:12348
2012-09-22 23:24:26 +08:00
Chong Yidong
bb4d86b40c Refactor image-type loading.
* src/dispextern.h (struct image_type): Add new slot, storing a type
initialization function.

* src/image.c (define_image_type): Call the image initializer function
if it is defined.  Arguments and return value changed.
(valid_image_p, make_image): Callers changed.
(xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
(gif_type, imagemagick_type, svg_type, gs_type): Add
initialization functions.
(Finit_image_library): Call lookup_image_type.
(CHECK_LIB_AVAILABLE): Macro deleted.
(lookup_image_type): Call define_image_type here, rather than via
Finit_image_library, and without using CHECK_LIB_AVAILABLE.
(syms_of_image): Move define_image_type calls for xbm_type and
pbm_type to lookup_image_type.
2012-09-22 22:10:24 +08:00
Eli Zaretskii
287d74553b edebug.texi (Instrumenting): Improve indexing. 2012-09-22 16:24:58 +03:00
Eli Zaretskii
df9685f396 Fix bugs #12447 and #12326 with infloop causes by idle timers, update docs.
src/keyboard.c (timer_check_2): Move calculation of 'timers' and
 'idle_timers' from here ...
 (timer_check): ... to here.  Use Fcopy_sequence to copy the timer
 lists, to avoid infloops when the timer does something stupid,
 like reinvoke itself with the same or smaller time-out.

 lisp/emacs-lisp/timer.el (run-with-idle-timer)
 (timer-activate-when-idle): Warn against reinvoking an idle timer
 from within its own timer action.

 doc/lispref/os.texi (Idle Timers): Warn against reinvoking an idle timer
 from within its own timer action.
2012-09-22 16:16:03 +03:00
Martin Rudalics
8e17c9ba14 Make Temp Buffer Resize Mode less intrusive (Bug#1806).
* window.c (Fsplit_window_internal): Handle only Qt value of
Vwindow_combination_limit separately.
(Qtemp_buffer_resize): New symbol.
(Vwindow_combination_limit): New default value.  Rewrite
doc-string.
* cus-start.el (window-combination-limit): Add new optional
values.
* window.el (temp-buffer-window-show)
(window--try-to-split-window): Obey new values of
window-combination-limit.
(split-window): Test window-combination-limit for t instead of
non-nil.
(display-buffer-at-bottom): New buffer display action function.
* help.el (temp-buffer-resize-regexps): New option.
(temp-buffer-resize-mode): Rewrite doc-string.
(resize-temp-buffer-window): Obey temp-buffer-resize-regexps.
Don't resize reused window.  Suggested by Glen Morris.
2012-09-22 14:56:08 +02:00
Eli Zaretskii
aa1fe812d3 src/dispextern.h: Fix commentary for struct it's string_nchars member. 2012-09-22 15:49:25 +03:00
Eli Zaretskii
589bd69b63 Fix bug #10159 with crashes in auto-complete package.
src/xdisp.c (next_overlay_string): Initialize it->end_charpos for
 the new overlay string.  Otherwise, the call to composition_compute_stop_pos
 in compute_stop_pos uses a wrong it->end_charpos value, and crashes because
 it runs off the end of the overlay string.
2012-09-22 15:31:05 +03:00
Paul Eggert
bbe099e709 * Makefile.in (bootstrap): Simplify build procedure.
Suggested by Wolfgang Jenker in
<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00456.html>.
2012-09-22 03:59:13 -07:00
Glenn Morris
54afd49976 Auto-commit of generated files. 2012-09-22 06:17:30 -04:00
Paul Eggert
e41c05e55d Merge from gnulib. 2012-09-22 02:46:20 -07:00
Stefan Merten
48a24920cc * rst.el: Revamp section title faces.
(rst-official-version)
(rst-package-emacs-version-alist): Sync with official version
V1.4.0.
(rst-faces-defaults, rst-set-level-default)
(rst-level-face-max, rst-level-face-base-color)
(rst-level-face-base-light, rst-level-face-format-light)
(rst-level-face-step-light, rst-define-level-faces): Obsolete.
(rst-adornment-faces-alist): Match new setup.
(rst-level-1, rst-level-2, rst-level-3, rst-level-4)
(rst-level-5, rst-level-6): New faces.
2012-09-22 11:16:00 +02:00
Paul Eggert
703342f8d8 Do not truncate strsignal output. 2012-09-22 01:22:49 -07:00
Paul Eggert
01108e3f45 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
or that fprintf is async-signal-safe.  POSIX doesn't require
either assumption.
2012-09-22 00:34:52 -07:00
Chong Yidong
471333800d * frames.texi (Pop-Up Menus): Minor clarification for x-popup-menu.
Fixes: debbugs:11148
2012-09-22 11:29:37 +08:00
Chong Yidong
82f8cd940f Fix auto-save and locking for indirect buffers.
* lisp/simple.el (undo): Handle indirect buffers.

* buffer.c (Fset_buffer_modified_p): Handle indirect buffers.

Fixes: debbugs:8207
2012-09-22 11:07:39 +08:00
Kenichi Handa
fa42927fd0 merge trunk 2012-09-22 11:26:05 +09:00
Kenichi Handa
3cccbd8726 composite.c (composition_reseat_it): Handle the case that a grapheme cluster is not covered by a single font (Bug#12352). 2012-09-22 11:15:29 +09:00