Paul Eggert [Sat, 24 Nov 2012 08:24:11 +0000 (00:24 -0800)]
Revert recent change for Bug#8855.
As reported by Harald Hanche-Olsen in
<http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00445.html>
the change introduces a further bug, of creating lots of zombie
processes in some cases. Further work is needed to come up with a
better fix for Bug#8855.
Chong Yidong [Sat, 24 Nov 2012 08:15:00 +0000 (16:15 +0800)]
Fix follow-mouse clicks on undraggable mode/header lines.
* mouse.el (mouse-drag-line): Even if the line is not draggable,
keep reading until we get the up-event anyway, in order to process
the up-event for mouse-1-click-follows-link.
Eli Zaretskii [Sat, 24 Nov 2012 07:25:52 +0000 (09:25 +0200)]
Fix assertion violations when clicking on Info bread-crumbs.
src/xdisp.c (draw_glyphs): Don't draw in mouse face if mouse
highlighting on the frame was cleared. Prevents assertion
violations when repeatedly clicking on the "Top" link of the
"bread-crumbs" in Info buffers.
Paul Eggert [Fri, 23 Nov 2012 22:20:31 +0000 (14:20 -0800)]
Fix a race condition with glib (Bug#8855).
This is a backport from the trunk, consisting of:
2012-11-17 Eli Zaretskii <eliz@gnu.org>
* nt/inc/sys/wait.h: New file, with prototype of waitpid and
definitions of macros it needs.
* nt/inc/ms-w32.h (wait): Don't define, 'wait' is not used anymore.
(sys_wait): Remove prototype.
* nt/config.nt (HAVE_SYS_WAIT_H): Define to 1.
* src/w32proc.c (create_child): Don't clip the PID of the child
process to fit into an Emacs integer, as this is no longer a
restriction.
(waitpid): Rename from sys_wait. Emulate a Posix 'waitpid' by
reaping only the process specified by PID argument, if that is
positive. Use PID instead of dead_child to know which process to
reap. Wait for the child to die only if WNOHANG is not in
OPTIONS.
(sys_select): Don't set dead_child.
* src/sysdep.c (wait_for_termination_1): Remove the WINDOWSNT portion,
as it is no longer needed.
* src/process.c (waitpid, WUNTRACED) [!WNOHANG]: Remove definitions,
no longer needed.
(record_child_status_change): Remove the setting of
record_at_most_one_child for the !WNOHANG case.
2012-11-03 Paul Eggert <eggert@cs.ucla.edu>
Fix a race condition that causes Emacs to mess up glib (Bug#8855).
This is a backport from the trunk.
The symptom is a diagnostic "GLib-WARNING **: In call to
g_spawn_sync(), exit status of a child process was requested but
SIGCHLD action was set to SIG_IGN and ECHILD was received by
waitpid(), so exit status can't be returned." The diagnostic
is partly wrong, as the SIGCHLD action is not set to SIG_IGN.
The real bug is a race condition between Emacs and glib: Emacs
does a waitpid (-1, ...) and reaps glib's subprocess by mistake,
so that glib can't find it. Work around the bug by invoking
waitpid only on subprocesses that Emacs itself creates.
* src/process.c (create_process, record_child_status_change):
Don't use special value -1 in pid field, as the caller now must
know the pid rather than having the callee infer it. The
inference was sometimes incorrect anyway, due to another race.
(create_process): Set new 'alive' member if child is created.
(process_status_retrieved): New function.
(record_child_status_change): Use it.
Accept negative 1st argument, which means to wait for the
processes that Emacs already knows about. Move special-case code
for DOS_NT (which lacks WNOHANG) here, from caller. Keep track of
processes that have already been waited for, by testing and
clearing new 'alive' member.
(CAN_HANDLE_MULTIPLE_CHILDREN): Remove, as record_child_status_change
now does this internally.
(handle_child_signal): Let record_child_status_change do all
the work, since we do not want to reap all exited child processes,
only the child processes that Emacs itself created.
* src/process.h (Lisp_Process): New boolean member 'alive'.
Eli Zaretskii [Fri, 23 Nov 2012 08:27:05 +0000 (10:27 +0200)]
Fix cursor display when several display strings follow each other.
src/xdisp.c (set_cursor_from_row): Skip step 2 only if point is not
between bpos_covered and bpos_max. This fixes cursor display when
several display strings follow each other.
Eli Zaretskii [Fri, 23 Nov 2012 07:54:33 +0000 (09:54 +0200)]
Fix pgx in .gdbinit when CHECK_LISP_OBJECT_TYPE is defined.
src/.gdbinit (pgx): If the glyph's object is a string, display the
pointer to string data, rather than the value of the string object
itself (which barfs under CHECK_LISP_OBJECT_TYPE).
Juri Linkov [Fri, 23 Nov 2012 07:28:37 +0000 (09:28 +0200)]
* lisp/wdired.el: Revert 2012-10-17 change partly and replace it with
Patch by Christopher Schmidt <christopher@ch.ristopher.com>.
(wdired-finish-edit): Add marks for new file names to
`wdired-old-marks'. Restore marks using `dired-mark-remembered'
after `revert-buffer'.
(wdired-do-renames): Remove calls to `dired-remove-file',
`dired-add-file', `dired-add-entry'.
Eli Zaretskii [Wed, 21 Nov 2012 19:28:14 +0000 (21:28 +0200)]
Fix bug #12930 with vertical-motion through a display string.
src/indent.c (Fvertical_motion): If the starting position is covered
by a display string, return to one position before that, to avoid
overshooting it inside move_it_to.
Glenn Morris [Wed, 21 Nov 2012 01:52:03 +0000 (20:52 -0500)]
Add a bit more about profiling to the lispref
* doc/lispref/debugging.texi (Profiling):
Add some basic information about the profile report buffer.
(Debugging): Mention profiling in the introduction.
Ken Brown [Tue, 20 Nov 2012 13:26:40 +0000 (08:26 -0500)]
Fix non-GTK builds on Cygwin
* src/emacs.c (main): Set the G_SLICE environment variable for all
Cygwin builds, not just GTK builds. See
https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00368.html.
Glenn Morris [Tue, 20 Nov 2012 08:02:54 +0000 (00:02 -0800)]
Make a start on a Profiling section in the lispref
* doc/lispref/debugging.texi (Profiling): New section, in progress.
* doc/lispref/tips.texi (Compilation Tips): Move profiling to separate section.
* doc/lispref/elisp.texi: Add Profiling to detailed menu.
Stefan Monnier [Mon, 19 Nov 2012 19:22:07 +0000 (14:22 -0500)]
* lisp/eshell/em-cmpl.el (eshell-pcomplete): Refine fix for bug#12838:
Fallback on completion-at-point rather than
pcomplete-expand-and-complete, and only if pcomplete actually failed.
(eshell-cmpl-initialize): Setup completion-at-point.
* lisp/pcomplete.el (pcomplete--entries): Obey pcomplete-ignore-case.
Paul Eggert [Sun, 18 Nov 2012 17:10:35 +0000 (09:10 -0800)]
More minor time fixes.
* calendar/time-date.el: Commentary fix.
* net/tramp-sh.el (tramp-do-file-attributes-with-ls): Undo last change;
too much other code depends on (0 0) time stamps.
* net/tramp.el (tramp-time-less-p, tramp-time-subtract):
Add a couple of FIXME comments.
Eli Zaretskii [Sun, 18 Nov 2012 16:43:36 +0000 (18:43 +0200)]
Prevent crashes on MS-Windows when w32-downcase-file-names is non-nil.
src/fileio.c (Fsubstitute_in_file_name, Ffile_name_directory)
(Fexpand_file_name) [DOS_NT]: Pass encoded file name to
dostounix_filename. Prevents crashes down the road, because
dostounix_filename assumes it gets a unibyte string. Reported by
Michel de Ruiter <michel@sentient.nl>, see
http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html
Paul Eggert [Sun, 18 Nov 2012 02:13:19 +0000 (18:13 -0800)]
Minor cleanup for times as lists of four integers.
* doc/lispref/os.texi (Time Parsing): Time values can now be four integers.
* lisp/files.el (dir-locals-directory-cache):
* lisp/ps-bdf.el (bdf-file-mod-time, bdf-read-font-info):
Doc fixes.
* lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls):
* lisp/ps-bdf.el (bdf-file-newer-than-time):
Process four-integers time stamps, not two. Doc fixes.
Eli Zaretskii [Sat, 17 Nov 2012 18:51:06 +0000 (20:51 +0200)]
Fix bug #12878 with compilation failure with Visual C++ 11.0.
src/w32select.c: Include w32common.h before w32term.h, so that
windows.h gets included before w32term.h uses some of its
features, see below.
src/w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]: New
typedefs.
(EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]: New
prototypes.
(EnumSystemLocales) [_MSC_VER]: Define if undefined.
Glenn Morris [Sat, 17 Nov 2012 01:29:24 +0000 (20:29 -0500)]
Use set-face-underline rather than the alias set-face-underline-p
* lisp/woman.el (woman-non-underline-faces):
* lisp/emacs-lisp/cl-lib.el (face-underline-p):
Use set-face-underline rather than the alias set-face-underline-p.
Martin Rudalics [Fri, 16 Nov 2012 10:29:48 +0000 (11:29 +0100)]
Fix some display-buffer related issues.
* window.el (enlarge-window, shrink-window): Don't mention return
value in doc-string (Bug#12896).
(window--display-buffer): Don't resize frames - it won't work
with all window managers and defeat pop-up-frame-alist.
(display-buffer-alist): In doc-string explain that CONDITION can
be a function and which arguments are passed to it (Bug#12854).
(display-buffer-assq-regexp): New argument ACTION. Handle lambda
expressions (Bug#12854).
(display-buffer): Pass ACTION argument to
display-buffer-assq-regexp.
* windows.texi (Choosing Window): Rewrite description of
display-buffer-alist (Bug#12167).
(Display Action Functions): Mention inhibit-switch-frame. Fix
description of display-buffer-below-selected. Reorder actions.
Add example (Bug#12848).
Glenn Morris [Thu, 15 Nov 2012 07:30:46 +0000 (23:30 -0800)]
Fixes related to face underlining
* lisp/faces.el (face-underline-p): Doc fix. Handle :underline being
things other than `t' (a string, a list).
(face-inverse-video-p): Doc fix.
(set-face-underline): Rename it back from set-face-underline-p.
Doc fix. Allow interactive input of values other than t.
(read-face-attribute): Apply formatting to :underline,
since like :box and :stipple it can take list values.
* doc/lispref/display.texi (Face Attributes): Fix :underline COLOR description.
(Attribute Functions): Update for set-face-underline rename.
Tweak descriptions of face-underline-p, face-inverse-video-p.
David Engster [Wed, 14 Nov 2012 20:20:20 +0000 (21:20 +0100)]
Merge bug fixes from CEDET upstream.
* semantic/symref/list.el (semantic-symref-symbol): Use
`semantic-complete-read-tag-project' instead of
`semantic-complete-read-tag-buffer-deep', since the latter is not
working correctly.
* semantic/symref.el (semantic-symref-result-get-tags): Use
`find-buffer-visiting' to follow symbolic links.
* semantic/fw.el (semantic-find-file-noselect): Always set
`enable-local-variables' to `:safe' when loading files.
Eli Zaretskii [Wed, 14 Nov 2012 16:41:43 +0000 (18:41 +0200)]
Clean up w32 timer thread code in the hope of solving bug #12832.
src/w32proc.c (timer_loop): Make sure SuspendThread and ResumeThread
use the same value of thread handle.
(start_timer_thread): If the timer thread exited (due to error),
clean up by closing the two handles it used. Duplicate the caller
thread's handle here, so it gets duplicated only once, when
launching the timer thread. Set priority of the timer thread, not
the caller thread.
(getitimer): Don't duplicate the caller thread's handle here.
Martin Rudalics [Tue, 13 Nov 2012 07:40:07 +0000 (08:40 +0100)]
Preserve window-point-insertion-type when copying window-point markers. (Bug#12588)
* window.el (record-window-buffer)
(display-buffer-record-window): When copying the markers to
window-point preserve window-point-insertion-type. (Bug#12588)
Glenn Morris [Tue, 13 Nov 2012 03:16:17 +0000 (19:16 -0800)]
Remove placeholder ses.el NEWS entry
Will move to trunk NEWS, since emacs-24 version is apparently
not-ready-for-use; ref
http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00221.html
Wolfgang Jenkner [Mon, 12 Nov 2012 17:12:33 +0000 (18:12 +0100)]
lisp/ansi-color.el (ansi-color-apply-sequence): Implement SGR codes 39 and 49.
This fixes bug#12792. Also, treat unimplemented parameters as 0,
thereby restoring the behavior of revisions prior to 2012-08-15T03:33:55Z!monnier@iro.umontreal.ca.