* ffap.el (ffap-url-regexp): Don't require matching at front of string.
(ffap-url-p): If only a substring matches, return that.
(ffap-url-at-point): Use the return value of ffap-url-p.
(ffap-read-file-or-url, ffap-read-file-or-url-internal)
(find-file-at-point, dired-at-point, dired-at-point-prompter)
(ffap-guess-file-name-at-point): Likewise.
(ffap-replace-file-component): Fix typo.
Fixes: debbugs:4952
* lisp/info.el (info-display-manual): Add existing Info buffers, whose
files may not be in Info-directory-list, to the completion.
(info--manual-names): New helper function.
(hi-lock-auto-select-face-defaults): New buffer local variable.
(hi-lock-read-face-name): Honor `hi-lock-auto-select-face'.
(hi-lock-unface-buffer): Prompt user with useful defaults.
With prefix arg, unhighlight all hi-lock patterns in buffer.
Fixes: debbugs:11095
* Activate.c, AddPane.c, AddSel.c, ChgPane.c, ChgSel.c, Create.c:
* InsPane.c, InsSel.c, Internal.c, XMakeAssoc.c:
Do not include <config.h>, since XMenuInt.h does that now.
* XLookAssoc.c, XMenuInt.h: Include <config.h>.
This avoids a build failure when configuring on Fedora 17
--with-x-toolkit=no, reported by Dmitry Andropov in
<http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00078.html>.
Fixing this bug required some cleanup of the signal-handling code.
As a side effect, this change also fixes a longstanding rare race
condition whereby Emacs could mistakenly kill unrelated processes,
and it fixes a bug where a second C-g does not kill a recalcitrant
synchronous process in GNU/Linux and similar platforms.
The patch should also fix the last vestiges of Bug#9488,
a bug which has mostly been fixed on the trunk by other changes.
* callproc.c, process.h (synch_process_alive, synch_process_death)
(synch_process_termsig, sync_process_retcode):
Remove. All uses removed, to simplify analysis and so that
less consing is done inside critical sections.
* callproc.c (call_process_exited): Remove. All uses replaced
with !synch_process_pid.
* callproc.c (synch_process_pid, synch_process_fd): New static vars.
These take the role of what used to be in unwind-protect arg.
All uses changed.
(block_child_signal, unblock_child_signal):
New functions, to avoid races that could kill innocent-victim processes.
(call_process_kill, call_process_cleanup, Fcall_process): Use them.
(call_process_kill): Record killed processes as deleted, so that
zombies do not clutter up the system. Do this inside a critical
section, to avoid a race that would allow the clutter.
(call_process_cleanup): Fix code so that the second C-g works again
on common platforms such as GNU/Linux.
(Fcall_process): Create the child process in a critical section,
to fix a race condition. If creating an asynchronous process,
record it as deleted so that zombies do not clutter up the system.
Do unwind-protect for WINDOWSNT too, as that's simpler in the
light of these changes. Omit unnecessary call to emacs_close
before failure, as the unwind-protect code does that.
* callproc.c (call_process_cleanup):
* w32proc.c (waitpid): Simplify now that synch_process_alive is gone.
* process.c (record_deleted_pid): New function, containing
code refactored out of Fdelete_process.
(Fdelete_process): Use it.
(process_status_retrieved): Remove. All callers changed to use
child_status_change.
(record_child_status_change): Remove, folding its contents into ...
(handle_child_signal): ... this signal handler. Now, this
function is purely a handler for SIGCHLD, and is not called after
a synchronous waitpid returns; the synchronous code is moved to
wait_for_termination. There is no need to worry about reaping
more than one child now.
* sysdep.c (get_child_status, child_status_changed): New functions.
(wait_for_termination): Now takes int * status and bool
interruptible arguments, too. Do not record child status change;
that's now the caller's responsibility. All callers changed.
Reimplement in terms of get_child_status.
(wait_for_termination_1, interruptible_wait_for_termination):
Remove. All callers changed to use wait_for_termination.
* syswait.h: Include <stdbool.h>, for bool.
(record_child_status_change, interruptible_wait_for_termination):
Remove decls.
(record_deleted_pid, child_status_changed): New decls.
(wait_for_termination): Adjust to API changes noted above.
Fixes: debbugs:12980
(ispell-internal-change-dictionary):
Improve ispell process restart checks by using expanded values for ispell
personal dictionary and for related restart check.
(ispell-start-process):
* Remove apparently redundant code that seems better handled from
(ispell-internal-change-dictionary)
* No longer need to expand ispell personal dictionary, it is already
expanded.
Fixes: debbugs:13019
textmodes/ispell.el (ispell-init-process, ispell-start-process):
Make sure ispell personal dictionary name is expanded after initial
`default-directory' value (Bug#13019).
(modify_region_1): ...new prototype.
* textprop.c (modify_region): Now static. Adjust users.
* insdel.c (modify_region): Rename to...
(modify_region_1): ...new function to work with current buffer.
Adjust comment and users. Use true and false for boolean arg.
(safe_alloca_unwind): Use it.
* lisp.h (free_save_value): New prototype.
* editfns.c (save_excursion_save): Use Lisp_Misc_Save_Value.
Add comment.
(save_excursion_restore): Adjust to match saved data structure.
Use free_save_value to offload some work from GC. Drop obsolete
#if 0 code.
(math-date-to-iso-dt, math-parse-iso-date-validate)
(math-iso-dt-to-date): New functions.
(math-fd-iso-dt, math-fd-isoyear, math-fd-isoweek)
(math-fd-isoweekday): New variables.
(calc-date-notation, math-parse-standard-date, math-format-date)
(math-format-date-part): Add support for more formatting codes.
* alloc.c (xpalloc): Comment fix.
* charset.c (Fdefine_charset_internal): If xpalloc exhausts memory
and signals an error, do not clear charset_table_size, as
charset_table is still valid.
* doprnt.c (evxprintf): Clear *BUF after freeing it.
* callproc.c (Fcall_process):
* process.c (create_process):
Don't save and restore environ; no longer needed.
* callproc.c (child_setup):
Use execve, not execvp, to preserve environ.
Fixes: debbugs:13054
* doc/lispref/commands.texi (Using Interactive): Fix index entry.
* doc/lispref/customize.texi (Variable Definitions):
* doc/lispref/display.texi (Defining Faces):
* doc/lispref/sequences.texi (Char-Tables): Fix xref.
* doc/lispref/lists.texi (Property Lists): Move here from symbols.texi.
(Plist Access): Rename from Other Plists.
* doc/lispref/symbols.texi (Symbol Properties): New node.
(Symbol Plists): Make it a subsection under Symbol Properties.
(Standard Properties): New node.
* doc/emacs/custom.texi (Init Rebinding): kbd is now a function.
* doc/lispref/keymaps.texi (Key Sequences): kbd is now a function.
Fixes: debbugs:13052