1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-31 09:20:54 -08:00
Commit graph

34699 commits

Author SHA1 Message Date
Paul Eggert
e560aba9d1 * frame.c (delete_frame): Avoid unnecessary 'this_f' test.
Fixes: debbugs:14970
2013-07-28 21:36:23 +02:00
Eli Zaretskii
2e5ce5ded7 Fix bug #14970 with crashes when deleting many frames on MS-Windows.
src/w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
 frame which got the message is still alive, before dereferencing
 its pointer.
 src/frame.c (delete_frame): Test "this" frame's minibuffer window to
 be a live window, before using it as such.
2013-07-28 18:22:27 +03:00
Paul Eggert
94fea300fd Spelling fixes. 2013-07-28 00:14:07 +02:00
Eli Zaretskii
e95da6d36c Fix focus-out events on MS-Windows.
src/w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
 w32_detect_focus_change instead of doing part of its job by hand.
 This fixes the problem whereby FOCUS_OUT events were not sent to
 the event queue.
2013-07-27 16:08:03 +03:00
Eli Zaretskii
fec9206062 Fix documentation of list-processes and process-list.
src/process.c (Fprocess_list): Doc fix.

 lisp/simple.el (list-processes): Doc fix.
2013-07-26 21:48:05 +03:00
Juanma Barranquero
a04689de43 Fix typos in ChangeLogs. 2013-07-26 19:02:22 +02:00
Eli Zaretskii
a8f9365172 Fix bug #14841 with invisible frames on MS-Windows.
src/w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
 being re-exposed only if it didn't ask to become visible.
 <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
 was previously iconified.
 (x_iconify_frame): Mark the frame iconified.
2013-07-26 12:59:59 +03:00
Paul Eggert
d5a7a9d94b Fix minor problems found by static checking.
* eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static.
(backtrace_eval_unrewind): ';' -> '{}' to pacify GCC.
2013-07-26 09:39:55 +01:00
Stefan Monnier
56ea72917a Add support for lexical variables to the debugger's `e' command.
* lisp/emacs-lisp/debug.el (debug): Don't let-bind the debugger-outer-*
vars, except for debugger-outer-match-data.
(debugger-frame-number): Move check for "on a function call" from
callers into it.  Add `skip-base' argument.
(debugger-frame, debugger-frame-clear): Simplify accordingly.
(debugger-env-macro): Only reset the state stored in non-variables,
i.e. current-buffer and match-data.
(debugger-eval-expression): Rewrite using backtrace-eval.
* lisp/subr.el (internal--called-interactively-p--get-frame): Remove.
(called-interactively-p):
* lisp/emacs-lisp/edebug.el (edebug--called-interactively-skip): Use the new
`base' arg of backtrace-frame instead.
* src/eval.c (set_specpdl_old_value): New function.
(unbind_to): Minor simplification.
(get_backtrace_frame): New function.
(Fbacktrace_frame): Use it.  Add `base' argument.
(backtrace_eval_unrewind, Fbacktrace_eval): New functions.
(syms_of_eval): Export backtrace-eval.
* src/xterm.c (x_focus_changed): Simplify.
2013-07-26 03:38:18 -04:00
Paul Eggert
b680602932 * fileio.c (Finsert_file_contents): Use a more-conservative fix.
Fixes: debbugs:14936
2013-07-25 09:07:47 +01:00
Paul Eggert
9d611ffe28 * fileio.c (Finsert_file_contents): Avoid double-close.
Fixes: debbugs:14936
2013-07-25 08:29:36 +01:00
Eli Zaretskii
999c74e390 Fix bug #14780 with unreachable lines near end of buffer.
src/xdisp.c (redisplay_window): Instead of moving point out of
 scroll margin, reject the force_start method, and try scrolling.
2013-07-24 20:36:42 +03:00
Ken Brown
198fa21756 * src/alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined (Bug#14944). 2013-07-24 11:11:30 -04:00
Paul Eggert
53840e556e * src/eval.c (Fprogn): Do not check that BODY is a proper list.
This undoes the previous change.  The check slows down the
interpreter, and is not needed to prevent a crash.  See
<http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
* doc/lispref/eval.texi (Special Forms): Mention 'lambda'.  Also, say that
non-well-formed expressions result in unspecified behavior, though
Emacs will not crash.
2013-07-24 07:21:07 +01:00
Glenn Morris
60967f56e7 No need for configure to create etc/ and lisp/ any more
* configure.ac (etc, lisp): No need to create specially.
Configure already creates lisp when generating lisp/Makefile;
src/Makefile now creates etc when needed.

* src/Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists.
2013-07-23 19:00:43 -04:00
Glenn Morris
bbece175c9 Use a @configure_input@ comment at the start of generated Makefiles 2013-07-23 18:57:17 -04:00
Paul Eggert
a29c3e6db0 Port to GNU/Linux systems with tinfo but not ncurses.
* configure.ac (USE_NCURSES): New symbol.
* src/dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX,
to decide whether ncurses is being used.  Without this change,
GCC complains about tgetent not being declared, on a system
that has tinfo installed but ncurses not installed.
2013-07-23 09:08:57 +01:00
Paul Eggert
f274311c2c * eval.c (Fprogn): Check that BODY is a proper list. 2013-07-23 08:22:16 +01:00
Paul Eggert
16b0520a9e Tune UNEVALLED functions by using XCAR instead of Fcar, etc.
* data.c (Fsetq_default):
* eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar)
(Fdefconst, FletX, Flet, Fwhile, Fcatch, Funwind_protect)
(Fcondition_case):
Tune by taking advantage of the fact that ARGS is always a list
when a function is declared to have UNEVALLED args.
2013-07-23 07:48:34 +01:00
Paul Eggert
9ca960e27a * emacsgtkfixed.c: Port to GCC 4.6.
GCC 4.6 complains about -Wunused-local-typedefs, introduced in 4.7.
2013-07-23 07:38:51 +01:00
Juanma Barranquero
afacaa1b18 src/callproc.c (child_setup): Silence compiler warnings. 2013-07-23 03:11:40 +02:00
Paul Eggert
368a85a4db * sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
from messing up Emacs's 'struct frame'.

Fixes: debbugs:14923
2013-07-22 16:30:54 +01:00
Paul Eggert
f4e891b5a8 * alloc.c (make_save_ptr_ptr): Define this function.
It was inadvertently omitted.  It's needed only if
HAVE_MENUS && ! (USE_X_TOOLKIT || USE_GTK).
2013-07-21 08:56:55 -07:00
Jan Djärv
96c8b65ebd * nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
frame have focus.

Fixes: debbugs:14895
2013-07-21 13:47:07 +02:00
Paul Eggert
ee01079735 Avoid vfork-related deadlock more cleanly.
* callproc.c (child_setup): When the child's exec fails, output
the program name, as that's more useful.  Use O_NONBLOCK to avoid
deadlock.
* process.c (create_process_1): Remove; no longer needed.
(create_process): Remove timer hack; no longer needed, now that
the child avoids deadlock.
2013-07-20 23:53:47 -07:00
Paul Eggert
02c66599e3 Spelling fixes. 2013-07-20 21:22:33 -07:00
Juanma Barranquero
763a086dc7 lisp/ChangeLog, src/ChangeLog: Fix typos. 2013-07-21 04:53:19 +02:00
Glenn Morris
f0398ec17f Merge from emacs-24; up to 2012-12-31T11:35:13Z!rudalics@gmx.at 2013-07-20 12:20:33 -07:00
Paul Eggert
6496aec9e9 Fix array bounds violation when pty allocation fails.
* configure.ac (PTY_TTY_NAME_SPRINTF): Use PTY_NAME_SIZE,
not sizeof pty_name, since pty_name is now a pointer to the array.
* src/process.c (PTY_NAME_SIZE): New constant.
(pty_name): Remove static variable; it's now auto.
(allocate_pty): Define even if !HAVE_PTYS; that's simpler.
Take pty_name as an arg rather than using a static variable.
All callers changed.
(create_process): Recover pty_flag from process, not from volatile local.
(create_pty): Stay inside array even when pty allocation fails.
(Fmake_serial_process): Omit unnecessary initializaiton of pty_flag.
2013-07-20 08:33:00 -07:00
Paul Eggert
b2a069c2f8 * lread.c (Fload): Avoid initialization only when lint checking.
Mention that it's needed only for older GCCs.
2013-07-20 07:21:25 -07:00
Kenichi Handa
7e67809332 merge trunk 2013-07-20 20:51:53 +09:00
Kenichi Handa
0efe47a860 coding.c (decode_coding_iso_2022): Fix previous change. 2013-07-20 20:45:50 +09:00
Andreas Schwab
6b1b199dc0 * lread.c (Fload): Avoid uninitialized warning. 2013-07-20 10:25:46 +02:00
Kenichi Handa
99107004b1 * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
(decode_coding_iso_2022): Check the single-shift area.  (Bug#8522)
2013-07-20 13:19:05 +09:00
Paul Eggert
3f5bef16fa Fix some minor file descriptor leaks and related glitches.
* filelock.c (create_lock_file) [!O_CLOEXEC]: Use fcntl with FD_CLOEXEC.
(create_lock_file): Use write, not emacs_write.
* image.c (slurp_file, png_load_body):
* process.c (Fnetwork_interface_list, Fnetwork_interface_info)
(server_accept_connection):
Don't leak an fd on memory allocation failure.
* image.c (slurp_file): Add a cheap heuristic for growing files.
* xfaces.c (Fx_load_color_file): Block input around the fopen too,
as that's what the other routines do.  Maybe input need not be
blocked at all, but it's better to be consistent.
Avoid undefined behavior when strlen is zero.
2013-07-19 11:09:23 -07:00
Paul Eggert
4195afc389 * alloc.c (staticpro): Avoid buffer overrun on repeated calls.
(NSTATICS): Now a constant; doesn't need to be a macro.
2013-07-19 10:54:26 -07:00
Richard M. Stallman
a1aeeffedd (decode_coding_utf_8): Add simple loop for fast processing of ASCII characters. 2013-07-19 12:15:51 -04:00
Paul Eggert
63b34baae6 * conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization. 2013-07-19 07:34:56 -07:00
Eli Zaretskii
621dd9ac0c Fix the fix for bug #14901.
src/keyboard.c (kbd_buffer_get_event): Use Display_Info instead of
 unportable 'struct x_display_info'.
 (DISPLAY_LIST_INFO): Delete macro: not needed, since Display_Info
 is a portable type.
2013-07-19 13:55:36 +03:00
Paul Eggert
ab9980cd3b * sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
(procfs_ttyname): Don't use uninitialized storage if emacs_fopen
or fscanf fails.
(system_process_attributes): Prefer plain char to unsigned char
when either will do.  Clean up properly if interrupted or if
memory allocations fail.  Don't assume sscanf succeeds.  Remove
no-longer-needed workaround to stop GCC from whining.  Read
command-line once, instead of multiple times.  Check read status a
bit more carefully.
2013-07-18 22:36:50 -07:00
Paul Eggert
1396ac86de Fix obscure porting bug with varargs functions.
The code assumed that int is treated like ptrdiff_t in a vararg
function, which is not a portable assumption.  There was a similar
-- though these days less likely -- porting problem with various
assumptions that pointers of different types all smell the same as
far as vararg functions is conserved.  To make this problem less
likely in the future, redo the API to use varargs functions.
* alloc.c (make_save_value): Remove this vararg function.
All uses changed to ...
(make_save_int_int_int, make_save_obj_obj_obj_obj)
(make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
New functions.
(make_save_ptr): Rename from make_save_pointer, for consistency with
the above.  Define only on platforms that need it.  All uses changed.
2013-07-18 18:24:35 -07:00
Juanma Barranquero
c7064f05d3 lisp/ChangeLog, src/ChangeLog: Fix typos. 2013-07-19 02:38:19 +02:00
Paul Eggert
4d19d19407 * keyboard.c: Try to fix typos in previous change.
(DISPLAY_LIST_INFO): New macro.
(kbd_buffer_get_event): Do not access members that are not present
in X11.  Revert nadvertent change of "!=" to "=".
2013-07-18 14:16:33 -07:00
Juanma Barranquero
945c5bb194 Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
* lisp/frame.el (blink-cursor-timer-function, blink-cursor-suspend):
  Add check for W32.
* src/keyboard.c (kbd_buffer_get_event):
* src/w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
2013-07-18 18:50:05 +02:00
Paul Eggert
5e679a2cfd * filelock.c: Fix unlikely file descriptor leaks.
(get_boot_time_1): Rework to avoid using emacs_open.
This doesn't actually fix a leak, but is better anyway.
(read_lock_data): Use read, not emacs_read.
2013-07-18 03:24:26 -07:00
Paul Eggert
a8cd483645 * doc.c: Fix minor memory and file descriptor leaks.
* doc.c (get_doc_string): Fix memory leak when doc file absent.
(get_doc_string, Fsnarf_documentation):
Fix file descriptor leak on error.
2013-07-18 02:55:00 -07:00
Paul Eggert
ef30e6382a * term.c: Fix minor fdopen-related file descriptor leaks.
* term.c (Fresume_tty) [!MSDOS]: Close fd if fdopen (fd) fails.
(init_tty) [!DOS_NT]: Likewise.  Also close fd if isatty (fd) fails.
2013-07-18 01:35:27 -07:00
Paul Eggert
f4b1eb3618 * charset.c: Fix file descriptor leaks and errno issues.
Include <errno.h>.
(load_charset_map_from_file): Don't leak file descriptor on error.
Use plain record_xmalloc since the allocation is larger than
MAX_ALLOCA; that's simpler here.  Simplify test for exhaustion
of entries.
* eval.c (record_unwind_protect_nothing):
* fileio.c (fclose_unwind):
New functions.
* lread.c (load_unwind): Remove.  All uses replaced by fclose_unwind.
The replacement doesn't block input, but that no longer seems
necessary.
2013-07-17 19:12:59 -07:00
Paul Eggert
a0931322f6 * lread.c: Fix file descriptor leaks and errno issues.
(Fload): Close some races that leaked fds or streams when 'load'
was interrupted.
(Fload, openp): Report error number of last nontrivial failure to open.
ENOENT counts as trivial.
* eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
New functions.
* fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
now that the function is always called with a nonnegative arg.
* lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
All uses replaced with ...
(clear_unwind_protect, set_unwind_protect_ptr): New decls.
2013-07-17 10:24:54 -07:00
Paul Eggert
b648c16370 A few more minor file errno-reporting bugs.
* callproc.c (Fcall_process):
* doc.c (Fsnarf_documentation):
* fileio.c (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
* process.c (set_socket_option):
Don't let a constructor trash errno.
* doc.c: Include <errno.h>.
2013-07-16 21:37:27 -07:00