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

112096 commits

Author SHA1 Message Date
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
Glenn Morris
75bdb32ae3 Auto-commit of generated files. 2013-07-21 06:19:07 -04: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
Juanma Barranquero
728dc3cc60 lisp/desktop.el: Correctly restore iconified frames.
(desktop--filter-iconified-position): New function.
(desktop-filter-parameters-alist): Add entries for `top' and `left'.
2013-07-21 04:42:11 +02:00
Glenn Morris
d828e5f942 image-dired.el: use with-current-buffer
* lisp/image-dired.el (image-dired-track-original-file):
Use with-current-buffer.
(image-dired-track-thumbnail): Use with-current-buffer.
Avoid changing point of wrong window.
2013-07-20 12:29:02 -07:00
Glenn Morris
c4074c9f63 Tweak some message calls in gdb-mi.el
* lisp/progmodes/gdb-mi.el (gdb-delete-handler, gdb-stopped):
Let `message' do the formatting.
(def-gdb-preempt-display-buffer): Add explicit format.
2013-07-20 12:25:05 -07: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
Glenn Morris
862f1c9c3a * lisp/image-dired.el (image-dired-track-original-file):
Avoid changing point of wrong window.

Fixes: debbugs:14909
2013-07-20 12:17:32 -07:00
Andreas Schwab
1451928fff * international/mule.el (coding-system-iso-2022-flags): Fix last
change.
2013-07-20 17:41:38 +02: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
Kenichi Handa
1145cc5221 mule.el (coding-system-iso-2022-flags): Change 8-bit-level-4' 2013-07-20 20:22:56 +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
Kenichi Handa
eaaa8f3ea1 * mule.el (coding-system-iso-2022-flags): Add `level-4'. (Bug#8522) 2013-07-20 13:15:37 +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
Lars Magne Ingebrigtsen
8ba8eec59b * net/shr.el (shr-mouse-browse-url): New command and keystroke.
Fixes: debbugs:14815
2013-07-19 16:57:28 +02:00
Gnus developers
47cc115603 Merge Changes made in Gnus master
2013-07-19 Geoff Kuenning <geoff@cs.hmc.edu> (tiny change)
 * gnus.texi (Customizing Articles): Document function predicates.

2013-07-19 Geoff Kuenning <geoff@cs.hmc.edu> (tiny change)
 * gnus-art.el (gnus-treat-predicate): Allow functions as predicates (bug#13384).

2013-07-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
 * gnus-start.el (gnus-clean-old-newsrc): Remove the newsrc cleanups
 that were only relevant in a development version a long time ago.
2013-07-19 14:50:21 +00:00
Lars Magne Ingebrigtsen
dfbc66e3e4 eww textarea input fixup
* net/eww.el (eww-process-text-input): Allow inputting when the
point is at the start of the line, as the properties aren't
front-sticky.
2013-07-19 16:44:16 +02:00
Paul Eggert
63b34baae6 * conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization. 2013-07-19 07:34:56 -07:00
Lars Magne Ingebrigtsen
48494e063a (shr-make-table-1): Ensure that we don't infloop on degenerate widths. 2013-07-19 16:07:43 +02:00
Richard M. Stallman
aec7da77ec * epa.el (epa-popup-info-window): Doc fix. 2013-07-19 09:30:58 -04:00
Richard M. Stallman
a10b2d0377 Add a comment. 2013-07-19 09:09:03 -04:00
Richard M. Stallman
77c92cb94d split-string takes a new arg TRIM that's a regexp
saying what to trim from the start and end of each substring.

* subr.el (split-string): New arg TRIM.
2013-07-19 08:18:16 -04: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
Xue Fuqiao
ac446ed806 * doc/lispref/windows.texi (Display Action Functions): Mention next-window. 2013-07-19 14:31:17 +08: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
Richard Copley
188c1ae603 * gdb-mi.el (gdb-done-or-error): Guard against "%" in gdb output (tiny change)
Fixes: debbugs:14127
2013-07-18 12:56:08 -04: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
Katsumi Yamaoka
abd2f2a44e gnus-art.el (gnus-shr-put-image): Make it work as well for shr.el's that the old Emacs 24s bundle 2013-07-18 11:26:04 +00: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
Michael Albinus
e06ec67f56 * filenotify.el (file-notify--library): Renamed from
`file-notify-support'.  Do not autoload.  Adapt all uses.
(file-notify-supported-p): New defun.

* autorevert.el (auto-revert-use-notify): Use
`file-notify-supported-p' instead of `file-notify-support'.  Adapt
docstring.
(auto-revert-notify-add-watch): Use `file-notify-supported-p'.

* net/tramp.el (tramp-file-name-for-operation):
Add `file-notify-supported-p'.

* net/tramp-sh.el (tramp-sh-handle-file-notify-supported-p):
New defun.
(tramp-sh-file-name-handler-alist): Add it as handler for
`file-notify-supported-p '.

* net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Add `ignore' as handler for `file-notify-*' functions.
2013-07-18 12:03:49 +02: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
Eli Zaretskii
5dc8a62987 Fix bug #14881 with scrolling images smaller than the window height.
lisp/simple.el (line-move-partial, line-move): Don't start vscroll or
 scroll-up if the current line is not taller than the window.
2013-07-17 19:47:49 +03: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
Juanma Barranquero
b1dc408426 src/w32fns.c (unwind_create_tip_frame): Fix declaration. 2013-07-17 01:29:05 +02:00
Paul Eggert
50a30ccec8 Fix w32 bug with call-process-region.
* callproc.c (Fcall_process_region): Pass nil, not "/dev/null",
to Fcall_process when the input is empty.  This simplifies the
code a bit.  It makes no difference on POSIXish platforms but
apparently it fixes a bug on w32.

Fixes: debbugs:14885
2013-07-16 15:40:17 -07:00