]> code.delx.au - gnu-emacs/log
gnu-emacs
11 years agoMerge from trunk; up to 2012-12-09T01:04:43Z!rgm@gnu.org.
Bill Wohler [Sun, 9 Dec 2012 01:19:00 +0000 (17:19 -0800)]
Merge from trunk; up to 2012-12-09T01:04:43Z!rgm@gnu.org.

11 years agoMake eval-defun on a pre-defined defcustom call any :set function
Glenn Morris [Sun, 9 Dec 2012 01:04:43 +0000 (17:04 -0800)]
Make eval-defun on a pre-defined defcustom call any :set function

* lisp/emacs-lisp/lisp-mode.el (eval-defun-1): Doc fix.
Respect a defcustom's :set function, if appropriate.
(eval-defun): Doc fix.

* doc/lispref/customize.texi (Variable Definitions): Mention eval-defun
on a defcustom calls the :set function when appropriate.

* etc/NEWS: Mention this.

Fixes: debbugs:109
11 years ago* lisp/info.el (Info-copy-current-node-name, Info-breadcrumbs)
Juri Linkov [Sat, 8 Dec 2012 23:12:08 +0000 (01:12 +0200)]
* lisp/info.el (Info-copy-current-node-name, Info-breadcrumbs)
(Info-fontify-node, Info-bookmark-make-record): Remove the
file extension from Info-current-file.

Fixes: debbugs:13016
11 years ago* mh-comp.el: Insure that mail-header-separator is set before
Jeffrey C Honig [Sat, 8 Dec 2012 21:48:20 +0000 (16:48 -0500)]
* mh-comp.el: Insure that mail-header-separator is set before
invoking any mml functions.  (closes SF #270).

11 years agoFix putenv and unsetenv on MS-Windows.
Eli Zaretskii [Sat, 8 Dec 2012 18:27:37 +0000 (20:27 +0200)]
Fix putenv and unsetenv on MS-Windows.

 src/w32.c (unsetenv): Return 0 if the input string is too long.

 nt/inc/ms-w32.h (sys_putenv): Add prototype.

Fixes: debbugs:13070
11 years agoUse putenv+unsetenv instead of modifying environ directly.
Paul Eggert [Sat, 8 Dec 2012 17:19:51 +0000 (09:19 -0800)]
Use putenv+unsetenv instead of modifying environ directly.

* admin/merge-gnulib (GNULIB_MODULES): Add putenv, unsetenv.
* lib/putenv.c, lib/unsetenv.c, m4/putenv.m4, m4/setenv.m4:
New files, copied automatically from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* src/alloc.c (xputenv): New function.
* src/dbusbind.c (Fdbus_init_bus):
* src/emacs.c (main):
* src/xterm.c (x_term_init):
Use xputenv instead of setenv or putenv, to detect memory exhaustion.
* src/editfns.c (initial_tz): Move static var decl up.
(tzvalbuf_in_environ): New static var.
(init_editfns): Initialize these two static vars.
(Fencode_time): Don't assume arbitrary limit on EMACS_INT width.
Save old TZ value on stack, if it's small.
(Fencode_time, set_time_zone_rule): Don't modify 'environ' directly;
instead, use xputenv+unsetenv to set and restore TZ.
(environbuf): Remove static var.  All uses removed.
(Fset_time_zone_rule): Do not save TZ and environ;
no longer needed here.
(set_time_zone_rule_tz1, set_time_zone_rule_tz2) [LOCALTIME_CACHE]:
Move to inside set_time_zone_rule; they don't need file scope any more.
(set_time_zone_rule): Maintain the TZ=value string separately.
(syms_of_editfns): Don't initialize initial_tz;
init_editfns now does it.
* src/emacs.c (dump_tz) [HAVE_TZSET]: Now const.
* src/lisp.h (xputenv): New decl.

Fixes: debbugs:13070
11 years agow32fns.c (emacs_abort): Don't do arithmetics on void pointers.
Fabrice Popineau [Sat, 8 Dec 2012 12:11:29 +0000 (14:11 +0200)]
w32fns.c (emacs_abort): Don't do arithmetics on void pointers.

11 years agoProvide unsetenv for MS-Windows and make putenv Posix-compatible.
Eli Zaretskii [Sat, 8 Dec 2012 11:32:10 +0000 (13:32 +0200)]
Provide unsetenv for MS-Windows and make putenv Posix-compatible.

 src/w32.c (unsetenv, sys_putenv): New functions.

 nt/inc/ms-w32.h (putenv): Redirect to sys_putenv.
 nt/config.nt (HAVE_UNSETENV): Define to 1.

Fixes: debbugs:13070
11 years agoAuto-commit of generated files.
Glenn Morris [Sat, 8 Dec 2012 11:17:32 +0000 (06:17 -0500)]
Auto-commit of generated files.

11 years ago* src/editfns.c (Finsert_char): Make the error message more informative.
Chong Yidong [Sat, 8 Dec 2012 11:05:39 +0000 (19:05 +0800)]
* src/editfns.c (Finsert_char): Make the error message more informative.

Fixes: debbugs:12992
11 years agoWindows followup to 2012-12-08T02:30:51Z!eggert@cs.ucla.edu.
Eli Zaretskii [Sat, 8 Dec 2012 09:57:43 +0000 (11:57 +0200)]
Windows followup to 2012-12-08T02:30:51Z!eggert@cs.ucla.edu.

 lib/makefile.w32-in ($(BLD)/sig2str.$(O)): New dependency.
 Remove a stray character at the beginning of the file.

Fixes: debbugs:13026
11 years agoSimplify get_lim_data.
Paul Eggert [Sat, 8 Dec 2012 06:56:26 +0000 (22:56 -0800)]
Simplify get_lim_data.

* admin/CPP-DEFINES (ULIMIT_BREAK_VALUE): Remove.
* configure.ac (ULIMIT_BREAK_VALUE): Remove.
* src/vm-limit.c (get_lim_data): Combine RLIMIT_AS and RLIMIT_DATA methods.
Remove USG and vlimit methods; no longer used these days.
Add #error catchall just in case.

11 years agoAssume POSIX 1003.1-1988 or later for signal.h.
Paul Eggert [Sat, 8 Dec 2012 02:30:51 +0000 (18:30 -0800)]
Assume POSIX 1003.1-1988 or later for signal.h.

Exceptions: do not assume SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN,
SIGTTOU, SIGUSR1, SIGUSR2, as Microsoft platforms lack these.
* admin/CPP-DEFINES (SIGALRM, SIGCHLD, SIGHUP, SIGKILL, SIGPIPE, SIGQUIT):
Remove.
(SIGTRAP): Remove this one too, as config.h no longer defines it.
* admin/merge-gnulib (GNULIB_MODULES): Add sig2str.
* configure.ac (PTY_OPEN, PTY_TTY_NAME_SPRINTF):
Use SIGCHLD rather than SIGCLD.
* lib/sig2str.c, lib/sig2str.h, m4/sig2str.m4: New files, from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/makefile.w32-in (GNULIBOBJS): Add $(BUILD)/sig2str.$(O).
* src/process.c [subprocesses]: Include <c-ctype.h>, <sig2str.h>.
(deleted_pid_list, Fdelete_process, create_process)
(record_child_status_change, handle_child_signal, deliver_child_signal)
(init_process_emacs, syms_of_process):
Assume SIGCHLD is defined.
(parse_signal): Remove.  All uses removed.
(abbr_to_signal): New static function.
(Fsignal_process): Use it to convert signal names to ints.
* src/sysdep.c (sys_suspend) [!DOS_NT]: Use kill (0, ...) rather than
kill (getpgrp (), ...).
(emacs_sigaction_init): Assume SIGCHLD is defined.
(init_signals): Assume SIGALRM, SIGCHLD, SIGHUP, SIGKILL,
SIGPIPE, and SIGQUIT are defined.  Do not worry about SIGCLD any more.
* src/syssignal.h (EMACS_KILLPG): Remove.
All uses replaced by 'kill' with a negative pid.
(SIGCHLD): Remove definition, as we now assume SIGCHLD.
* src/w32proc.c (sys_kill): Support negative pids compatibly with POSIX.

Fixes: debbugs:13026
11 years ago* sysdep.c (get_child_status): Abort on internal error (Bug#13086).
Paul Eggert [Fri, 7 Dec 2012 17:53:17 +0000 (09:53 -0800)]
* sysdep.c (get_child_status): Abort on internal error (Bug#13086).

This will cause a production Emacs to dump core instead of
infinite-looping.

11 years ago* lisp/hi-lock.el (hi-lock-unface-buffer): If there's no matching regexp at
Stefan Monnier [Fri, 7 Dec 2012 16:48:42 +0000 (11:48 -0500)]
* lisp/hi-lock.el (hi-lock-unface-buffer): If there's no matching regexp at
point, still provide some default.
(hi-lock--regexps-at-point): Don't enforce a "hi-lock-" prefix on face
names, since we don't use it right now.  Actually return the list.
(hi-lock-file-patterns, hi-lock-interactive-patterns): Use defvar-local.

11 years ago* novice.el (disabled-command-function): Remove a spurious help xref.
Chong Yidong [Fri, 7 Dec 2012 16:34:01 +0000 (00:34 +0800)]
* novice.el (disabled-command-function): Remove a spurious help xref.
Suggested by Kelly Dean.

Fixes: debbugs:13043
11 years ago* subr.el (text-clone-maintain): Fix clone overlay deletion
Chong Yidong [Fri, 7 Dec 2012 16:25:28 +0000 (00:25 +0800)]
* subr.el (text-clone-maintain): Fix clone overlay deletion
when a syntax is specified.

Fixes: debbugs:13025
11 years ago* info.el (Info-set-mode-line): Remove file extension from Info-current-file
Chong Yidong [Fri, 7 Dec 2012 15:31:43 +0000 (23:31 +0800)]
* info.el (Info-set-mode-line): Remove file extension from Info-current-file
if there is one.

Fixes: debbugs:13016
11 years agoAuto-commit of loaddefs files.
Glenn Morris [Fri, 7 Dec 2012 11:19:45 +0000 (06:19 -0500)]
Auto-commit of loaddefs files.

11 years agormail-cease-edit fixes related to "^From " escaping
Glenn Morris [Fri, 7 Dec 2012 08:59:14 +0000 (00:59 -0800)]
rmail-cease-edit fixes related to "^From " escaping

* mail/rmail.el (rmail-mime-decoded): New permanent local.
(rmail-show-message-1): Set rmail-mime-decoded when appropriate.
* mail/rmailedit.el (rmail-cease-edit): Respect rmail-mbox-format
and rmail-mime-decoded.

Fixes: debbugs:9841
11 years ago* frame.c (make_frame): Do not set window's buffer to t.
Dmitry Antipov [Fri, 7 Dec 2012 08:13:49 +0000 (12:13 +0400)]
* frame.c (make_frame): Do not set window's buffer to t.
* window.c (Fsplit_window_internal): Likewise.  Previously it was
used to indicate that the window is being set up.  Now we use
set_window_buffer for all new windows, so the condition in ...
(Fset_window_buffer): ... is always true and can be removed.

11 years agoConvenient macro to check whether the buffer is hidden.
Dmitry Antipov [Fri, 7 Dec 2012 07:16:32 +0000 (11:16 +0400)]
Convenient macro to check whether the buffer is hidden.
* buffer.h (BUFFER_HIDDEN_P): New macro.
* frame.c (make_frame): Use it.  Adjust comment.
* buffer.c (candidate_buffer): New function.
(Fother_buffer, other_buffer_safely): Use it.

11 years agoFix :type in previous (un)rmail change, use a better :group
Glenn Morris [Fri, 7 Dec 2012 04:57:43 +0000 (20:57 -0800)]
Fix :type in previous (un)rmail change, use a better :group

11 years agoDefault to mboxrd in Rmail, allow mboxo as an option
Glenn Morris [Fri, 7 Dec 2012 04:37:14 +0000 (20:37 -0800)]
Default to mboxrd in Rmail, allow mboxo as an option

* lisp/mail/unrmail.el (unrmail-mbox-format): New option.
(batch-unrmail, unrmail): Doc fixes.
(unrmail): Respect unrmail-mbox-format.
* lisp/mail/rmail.el (rmail-mbox-format): New option.
(rmail-show-message-1): Respect rmail-mbox-format.

* etc/NEWS: Related edits.

Fixes: debbugs:6574
11 years ago* lisp/emacs-lisp/cl-macs.el (cl-tagbody): New macro.
Stefan Monnier [Fri, 7 Dec 2012 03:56:57 +0000 (22:56 -0500)]
* lisp/emacs-lisp/cl-macs.el (cl-tagbody): New macro.

11 years agoSpelling fixes.
Paul Eggert [Fri, 7 Dec 2012 02:37:20 +0000 (18:37 -0800)]
Spelling fixes.

11 years ago* doc/lispref/internals.texi: Fix minor whitespace problems.
Paul Eggert [Fri, 7 Dec 2012 01:47:14 +0000 (17:47 -0800)]
* doc/lispref/internals.texi: Fix minor whitespace problems.

Fixes: debbugs:12973
11 years ago* themes/leuven-theme.el: Convert to Unix format.
Andreas Schwab [Thu, 6 Dec 2012 22:44:05 +0000 (23:44 +0100)]
* themes/leuven-theme.el: Convert to Unix format.

11 years agoFurther cleanup of the "cl-" namespace. Fit CL in 80 columns.
Stefan Monnier [Thu, 6 Dec 2012 21:29:29 +0000 (16:29 -0500)]
Further cleanup of the "cl-" namespace.  Fit CL in 80 columns.
* lisp/emacs-lisp/cl-macs.el (cl--pop2, cl--optimize-safety)
(cl--optimize-speed, cl--not-toplevel, cl--parse-loop-clause)
(cl--expand-do-loop, cl--proclaim-history, cl--declare-stack)
(cl--do-proclaim, cl--proclaims-deferred): Rename from the "cl-" prefix.
(cl-progv): Don't rely on dynamic scoping to find the body.
* lisp/emacs-lisp/cl-lib.el (cl--optimize-speed, cl--optimize-safety)
(cl--proclaims-deferred): Rename from the "cl-" prefix.
(cl-declaim): Use backquotes.
* lisp/emacs-lisp/cl-extra.el (cl-make-random-state, cl-random-state-p):
Use "cl--" prefix for the object's tag.

11 years ago* lisp/ses.el: Use advice-add/remove.
Stefan Monnier [Thu, 6 Dec 2012 20:16:38 +0000 (15:16 -0500)]
* lisp/ses.el: Use advice-add/remove.
(ses--advice-copy-region-as-kill, ses--advice-yank): New functions.
(copy-region-as-kill, yank): Use advice-add.
(ses-unload-function): Use advice-remove.

11 years ago* lisp/button.el: Make them work in header-lines.
Jonas Bernoulli [Thu, 6 Dec 2012 20:10:36 +0000 (15:10 -0500)]
* lisp/button.el: Make them work in header-lines.
(button-map): Add bindings for header-line and mode-line use.
(button-get, button-put, button-label): `button' may now be a string.
(button-activate): Don't make it a defsubst.
(button--area-button-p, button--area-button-string): New functions.
(make-text-button): Fix the return value when `beg' was a string.
(push-button): Handle the mode-line case.

Fixes: debbugs:12817
11 years agoAvoid busy-waiting for child processes on Windows. (Bug#13086)
Eli Zaretskii [Thu, 6 Dec 2012 18:36:22 +0000 (20:36 +0200)]
Avoid busy-waiting for child processes on Windows.  (Bug#13086)

 src/w32proc.c (waitpid): Avoid busy-waiting when called with WNOHANG
 if the child process is still running.  Instead, exit the wait
 loop and return zero.

11 years ago* lisp/gnus/gnus-start.el (gnus-before-resume-hook): Add.
Sam Steingold [Thu, 6 Dec 2012 18:30:38 +0000 (13:30 -0500)]
* lisp/gnus/gnus-start.el (gnus-before-resume-hook): Add.
(gnus-1): Run it when Gnus is alive.

11 years ago* lisp/progmodes/sql.el: Use cl-lib and lexical-binding; various cleanup.
Stefan Monnier [Thu, 6 Dec 2012 17:29:30 +0000 (12:29 -0500)]
* lisp/progmodes/sql.el: Use cl-lib and lexical-binding; various cleanup.
(sql-signum): Remove.  Use `cl-signum' instead.
(sql-read-passwd): Remove; use read-passwd instread.
(sql-get-login-ext): Use read-string.
(sql-get-login): Use dolist and pcase.
(sql--completion-table): Rename from sql-try-completion.
Use complete-with-action.
(sql-mode): Don't change abbrev-all-caps globally.
(sql-connect): Don't rely on dynamic scoping for `new-name'.
(sql-postgres-completion-object): Initialize vars in their `let'.
(sql-comint-sybase, sql-comint-sqlite, sql-comint-mysql)
(sql-comint-solid, sql-comint-ms, sql-comint-postgres)
(sql-comint-interbase): Use a single append, without setq.
(sql-comint-linter): Same, and unwind-protect the LINTER_MBX var.

11 years ago* lisp/hi-lock.el: Rework the default face and the serialize regexp code.
Stefan Monnier [Thu, 6 Dec 2012 16:17:11 +0000 (11:17 -0500)]
* lisp/hi-lock.el: Rework the default face and the serialize regexp code.
(hi-lock--auto-select-face-defaults): Remove.
(hi-lock-string-serialize-serial): Remove.
(hi-lock--hashcons-hash): Rename from hi-lock-string-serialize-hash;
make weak.
(hi-lock--hashcons): Rename from hi-lock-string-serialize, return an
equal string.
(hi-lock-set-pattern): Adjust accordingly.
(hi-lock--regexps-at-point): Simplify accordingly.
(hi-lock--auto-select-face-defaults): Remove.
(hi-lock--last-face): New var to replace it.
(hi-lock-read-face-name): Rewrite.
(hi-lock-unface-buffer): Arrange for the face to be the next default.

Fixes: debbugs:11095
11 years ago* frame.h (x_char_width, x_char_height): Remove prototypes.
Dmitry Antipov [Thu, 6 Dec 2012 13:48:11 +0000 (17:48 +0400)]
* frame.h (x_char_width, x_char_height): Remove prototypes.
* w32term.h (x_char_width, x_char_height): Likewise.
* xfns.c (x_char_width, x_char_height): Remove.
* w32fns.c (x_char_width, x_char_height): Likewise.
* nsfns.c (x_char_width, x_char_height): Likewise.
* frame.c (Fframe_char_width): Use FRAME_COLUMN_WIDTH for
all window frames.
(Fframe_char_height): Likewise with FRAME_LINE_HEIGHT.
* keyboard.c (command_loop_1): Remove prototype.
(command_loop_2, top_level_1): Add static to match prototype.

11 years agoAuto-commit of loaddefs files.
Glenn Morris [Thu, 6 Dec 2012 11:21:08 +0000 (06:21 -0500)]
Auto-commit of loaddefs files.

11 years agoAuto-commit of generated files.
Glenn Morris [Thu, 6 Dec 2012 11:17:45 +0000 (06:17 -0500)]
Auto-commit of generated files.

11 years ago* net/tramp.el (tramp-replace-environment-variables): Hide
Michael Albinus [Thu, 6 Dec 2012 09:15:27 +0000 (10:15 +0100)]
* net/tramp.el (tramp-replace-environment-variables): Hide
compiler warning.
(tramp-file-name-for-operation): Remove `executable-find',
`start-process', `call-process' and `call-process-region'.

* net/tramp-compat.el (top): Don't require 'tramp-util and 'tramp-vc.

* net/tramp-gvfs.el (tramp-gvfs-dbus-event-error): Ensure backward
compatibility.

* net/tramp-sh.el (top): Remove `tramp-sh-handle-call-process-region'.

11 years agoUpdate licenses to latest version from FSF.
Paul Eggert [Thu, 6 Dec 2012 08:33:32 +0000 (00:33 -0800)]
Update licenses to latest version from FSF.

These are just minor editorial changes.

11 years agoConvert consecutive copyright years to range
Glenn Morris [Thu, 6 Dec 2012 07:33:20 +0000 (23:33 -0800)]
Convert consecutive copyright years to range

11 years agoFix a recently-introduced delete-process race condition.
Paul Eggert [Thu, 6 Dec 2012 07:31:58 +0000 (23:31 -0800)]
Fix a recently-introduced delete-process race condition.

* callproc.c, process.h (record_kill_process):
New function, containing part of the old call_process_kill.
(call_process_kill): Use it.
This does not change call_process_kill's behavior.
* process.c (Fdelete_process): Use record_kill_process to fix a
race condition that could cause Emacs to lose track of a child.

11 years agoAvoid code duplication between prev_frame and next_frame.
Dmitry Antipov [Thu, 6 Dec 2012 06:23:51 +0000 (10:23 +0400)]
Avoid code duplication between prev_frame and next_frame.
* frame.c (candidate_frame): New function.  Add comment.
(prev_frame, next_frame): Use it.  Adjust comment.

11 years agoMerge from emacs-24; up to 2012-11-24T16:58:43Z!cyd@gnu.org
Glenn Morris [Thu, 6 Dec 2012 06:17:10 +0000 (22:17 -0800)]
Merge from emacs-24; up to 2012-11-24T16:58:43Z!cyd@gnu.org

11 years agospam.el: Fix last change
Katsumi Yamaoka [Thu, 6 Dec 2012 04:37:54 +0000 (04:37 +0000)]
spam.el: Fix last change

11 years agogmm-utils.el (gmm-called-interactively-p): Restore as a macro.
Katsumi Yamaoka [Thu, 6 Dec 2012 04:28:00 +0000 (04:28 +0000)]
gmm-utils.el (gmm-called-interactively-p): Restore as a macro.
gnus-art.el (article-unsplit-urls)
gnus-bookmark.el (gnus-bookmark-bmenu-list)
gnus-registry.el (gnus-registry-get-article-marks)
message.el (message-goto-body): Use it.
  (message-called-interactively-p): Remove.

spam-stat.el (spam-stat-called-interactively-p): New macro.
  (spam-stat-score-buffer): Use it.

spam.el: Silence the warnings against BBDB functions when compiling.

gnus-score.el (gnus-score-decode-text-parts):
  Use append+mapcar instead of the cl function mapcan.

11 years agoAvoid letf macro use from Gnus
Katsumi Yamaoka [Thu, 6 Dec 2012 03:30:23 +0000 (03:30 +0000)]
Avoid letf macro use from Gnus

gnus/gmm-utils.el (gmm-flet): Remove.
gnus/gnus-sync.el (gnus-sync-lesync-call): Avoid overriding json-alist-p.
gnus/message.el (message-read-from-minibuffer): Avoid overriding mail-abbrev-in-expansion-header-p.
mail/mailabbrev.el (mail-abbrev-expand-wrapper): Work in minibuffer so as to enable message-read-from-minibuffer to expand mail aliases.

11 years ago* ffap.el (ffap-replace-file-component): Fix typo.
Chong Yidong [Thu, 6 Dec 2012 03:04:21 +0000 (11:04 +0800)]
* ffap.el (ffap-replace-file-component): Fix typo.

11 years agoFix copyright header in last commit.
Chong Yidong [Thu, 6 Dec 2012 02:57:59 +0000 (10:57 +0800)]
Fix copyright header in last commit.

Note that Fabrice Niessen is listed in the copyright.list file under a
pseudonym (Sébastien Vauban).

11 years ago* themes/leuven-theme.el: New theme.
Fabrice Niessen [Thu, 6 Dec 2012 02:52:22 +0000 (10:52 +0800)]
* themes/leuven-theme.el: New theme.

11 years ago* lisp/minibuf-eldef.el (minibuf-eldef-update-minibuffer): Don't mess with
Stefan Monnier [Thu, 6 Dec 2012 01:39:03 +0000 (20:39 -0500)]
* lisp/minibuf-eldef.el (minibuf-eldef-update-minibuffer): Don't mess with
the `intangible' property.
Suggested by Christopher Schmidt <christopher@ch.ristopher.com>

11 years agoFix minor whitespace issues after "." in manual.
Paul Eggert [Wed, 5 Dec 2012 22:27:56 +0000 (14:27 -0800)]
Fix minor whitespace issues after "." in manual.

Be more systematic about using "@." (not ".") at end of sentence that
ends in a capital letter, and about appending "@:" after non-ends of
sentences that end in a lower case letter followed by "." followed by
whitespace.  Omit unnecessary use of "@:" and "@.".  Similarly for "?"
and "!".  Be more consistent about putting a comma after "i.e." and
"e.g."; this is the typical American style and it's easier to code in
Texinfo.

Fixes: debbugs:12973
11 years agoMinor call-process cleanups.
Paul Eggert [Wed, 5 Dec 2012 18:29:52 +0000 (10:29 -0800)]
Minor call-process cleanups.

* callproc.c (Fcall_process): Do record-unwind-protect on MSDOS
at the same time as other platforms, to simplify analysis.
No need for fd0_volatile since we have synch_process_fd.
Avoid needless emacs_close; arg is always negative.

11 years ago* lisp/gnus/gnus.el (gnus-delete-gnus-frame): Extract from `gnus-other-frame'.
Sam Steingold [Wed, 5 Dec 2012 18:13:38 +0000 (13:13 -0500)]
* lisp/gnus/gnus.el (gnus-delete-gnus-frame): Extract from `gnus-other-frame'.
(gnus-other-frame): Add `gnus-delete-gnus-frame' to
`gnus-suspend-gnus-hook' in addition to `gnus-exit-gnus-hook'.

11 years agoDon't pass un-encoded file name to mkstemp.
Eli Zaretskii [Wed, 5 Dec 2012 17:39:39 +0000 (19:39 +0200)]
Don't pass un-encoded file name to mkstemp.

 src/callproc.c (Fcall_process_region): Encode expanded temp file
 pattern before passing it to mkstemp or mktemp.

11 years agoFix one part of bug #13079 with temporary files in call-process-region.
Eli Zaretskii [Wed, 5 Dec 2012 17:10:00 +0000 (19:10 +0200)]
Fix one part of bug #13079 with temporary files in call-process-region.

 src/callproc.c (Fcall_process_region) [!HAVE_MKSTEMP]: If mktemp
 fails, signal an error instead of continuing with an empty
 string.

11 years ago* lisp/net/rcirc.el (rcirc-urls): Update documentation.
Deniz Dogan [Wed, 5 Dec 2012 16:45:37 +0000 (17:45 +0100)]
* lisp/net/rcirc.el (rcirc-urls): Update documentation.
(rcirc-condition-filter): New function.
(rcirc-browse-url, rcirc-markup-urls): Use only URLs before point
and exclude consecutive duplicate URLs.

Fixes: debbugs:6082
11 years ago* tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Check error
Michael Albinus [Wed, 5 Dec 2012 15:50:32 +0000 (16:50 +0100)]
* tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Check error
code also on MS-Windows machines.

11 years ago* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Michael Albinus [Wed, 5 Dec 2012 14:06:06 +0000 (15:06 +0100)]
* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Check return code of copy command.

11 years agoAuto-commit of loaddefs files.
Glenn Morris [Wed, 5 Dec 2012 12:20:55 +0000 (07:20 -0500)]
Auto-commit of loaddefs files.

11 years agoAuto-commit of generated files.
Glenn Morris [Wed, 5 Dec 2012 12:17:30 +0000 (07:17 -0500)]
Auto-commit of generated files.

11 years agolisp/gnus/ChangeLog: Fix typo
Katsumi Yamaoka [Wed, 5 Dec 2012 10:29:31 +0000 (10:29 +0000)]
lisp/gnus/ChangeLog: Fix typo

11 years agogmm-utils.el (gmm-called-interactively-p): Revert. This seems to causes Emacs to...
Katsumi Yamaoka [Wed, 5 Dec 2012 10:27:16 +0000 (10:27 +0000)]
gmm-utils.el (gmm-called-interactively-p): Revert.  This seems to causes Emacs to get stuck!

11 years ago* net/tramp-adb.el (tramp-adb-sdk-dir, tramp-adb-prompt): Use
Michael Albinus [Wed, 5 Dec 2012 10:09:54 +0000 (11:09 +0100)]
* net/tramp-adb.el (tramp-adb-sdk-dir, tramp-adb-prompt): Use
group `tramp'.  Add version.

11 years agogmm-utils.el (gmm-called-interactively-p): New function.
Katsumi Yamaoka [Wed, 5 Dec 2012 09:24:27 +0000 (09:24 +0000)]
gmm-utils.el (gmm-called-interactively-p): New function.
gnus-art.el (article-unsplit-urls)
gnus-bookmark.el (gnus-bookmark-bmenu-list)
gnus-registry.el (gnus-registry-get-article-marks)
message.el (message-goto-body): Use it.
  (message-called-interactively-p): Remove.

11 years agoImprove url matching in ffap.el.
Chong Yidong [Wed, 5 Dec 2012 07:29:02 +0000 (15:29 +0800)]
Improve url matching in ffap.el.

* 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
11 years agoImprove completion behavior of info-display-manual.
Chong Yidong [Wed, 5 Dec 2012 06:14:11 +0000 (14:14 +0800)]
Improve completion behavior of info-display-manual.

* 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.

11 years ago* lisp/progmodes/octave-mod.el (octave-mark-block): Move out of tokens and
Stefan Monnier [Wed, 5 Dec 2012 05:30:58 +0000 (00:30 -0500)]
* lisp/progmodes/octave-mod.el (octave-mark-block): Move out of tokens and
fix open-paren-like token test.

Fixes: debbugs:12785
11 years agoRevert dumb change
Glenn Morris [Wed, 5 Dec 2012 04:05:57 +0000 (20:05 -0800)]
Revert dumb change

11 years agoMinor fixes for Lisp manual.
Chong Yidong [Wed, 5 Dec 2012 03:52:08 +0000 (11:52 +0800)]
Minor fixes for Lisp manual.

* lists.texi (Plist Access): Move put example to Symbol Plists.

* symbols.texi (Standard Properties): Fix typo.

11 years agogmm-util.el: Re-introduce gmm-flet using cl-letf
Katsumi Yamaoka [Wed, 5 Dec 2012 02:26:15 +0000 (02:26 +0000)]
gmm-util.el: Re-introduce gmm-flet using cl-letf

11 years ago* configure.ac (MAKEINFO, EGREP, CC): Quote, in case of spaces in file names.
Glenn Morris [Wed, 5 Dec 2012 02:17:03 +0000 (21:17 -0500)]
* configure.ac (MAKEINFO, EGREP, CC): Quote, in case of spaces in file names.

11 years ago* configure.ac: Handle info/ files with or without ".info" extension.
Glenn Morris [Wed, 5 Dec 2012 02:13:40 +0000 (21:13 -0500)]
* configure.ac: Handle info/ files with or without ".info" extension.

11 years agoAdd conflict detection/resolution to vc-hg (bug#10709)
Glenn Morris [Wed, 5 Dec 2012 01:49:31 +0000 (20:49 -0500)]
Add conflict detection/resolution to vc-hg (bug#10709)

* lisp/vc/vc-hg.el (vc-hg-resolve-when-done, vc-hg-find-file-hook):
New functions, for detecting and resolving conflicts.

11 years agogmm-utils.el (gmm-labels): Doc fix
Katsumi Yamaoka [Wed, 5 Dec 2012 00:18:23 +0000 (00:18 +0000)]
gmm-utils.el (gmm-labels): Doc fix

11 years agogmm-utils.el (gmm-flet): Remove.
Katsumi Yamaoka [Wed, 5 Dec 2012 00:13:56 +0000 (00:13 +0000)]
gmm-utils.el (gmm-flet): Remove.
gnus-sync.el (gnus-sync-lesync-call)
message.el (message-read-from-minibuffer): Don't use it.

11 years agogmm-utils.el (gmm-labels): Dox fix
Katsumi Yamaoka [Tue, 4 Dec 2012 23:33:24 +0000 (23:33 +0000)]
gmm-utils.el (gmm-labels): Dox fix

11 years agogmm-utils.el (gmm-labels): Use cl-labels if available
Katsumi Yamaoka [Tue, 4 Dec 2012 23:24:24 +0000 (23:24 +0000)]
gmm-utils.el (gmm-labels): Use cl-labels if available

11 years ago* callproc.c (Fcall_process): Fix specpdl nesting for asynchronous
Andreas Schwab [Tue, 4 Dec 2012 21:18:37 +0000 (22:18 +0100)]
* callproc.c (Fcall_process): Fix specpdl nesting for asynchronous
processes.

11 years ago* leim/quail/latin-ltx.el: Avoid deprecated chars for \langle and \rangle.
Stefan Monnier [Tue, 4 Dec 2012 21:17:30 +0000 (16:17 -0500)]
* leim/quail/latin-ltx.el: Avoid deprecated chars for \langle and \rangle.
Remove \rightparengtr and \leftparengtr for lack of consensus.
Suggested by Mattias Engdegård <mattiase@bredband.net>.

Fixes: debbugs:12948
11 years ago* lisp/hi-lock.el (hi-lock-auto-select-face): New user variable.
Jambunathan K [Tue, 4 Dec 2012 21:13:47 +0000 (16:13 -0500)]
* lisp/hi-lock.el (hi-lock-auto-select-face): New user variable.
(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
11 years agoInclude <config.h> uniformly in oldXMenu sources.
Paul Eggert [Tue, 4 Dec 2012 20:42:29 +0000 (12:42 -0800)]
Include <config.h> uniformly in oldXMenu sources.

* 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>.

11 years agoFix another instance of bug #12933 with non-ASCII file names on Windows.
Eli Zaretskii [Tue, 4 Dec 2012 18:48:01 +0000 (20:48 +0200)]
Fix another instance of bug #12933 with non-ASCII file names on Windows.

 src/fileio.c (file_name_as_directory, directory_file_name) [DOS_NT]:
 Encode the file name before passing it to dostounix_filename, in
 case it will downcase it (under w32-downcase-file-names).

11 years agormail-new-summary fix for bug#13066
Glenn Morris [Tue, 4 Dec 2012 18:08:01 +0000 (13:08 -0500)]
rmail-new-summary fix for bug#13066

* lisp/mail/rmailsum.el (rmail-new-summary):
Tweak for rmail-maybe-display-summary changing buffer.

11 years ago* NEWS: Mention new Tramp method "adb".
Michael Albinus [Tue, 4 Dec 2012 17:07:09 +0000 (18:07 +0100)]
* NEWS: Mention new Tramp method "adb".

11 years ago* lisp/obsolete/terminal.el, lisp/obsolete/longlines.el: Add obsolecence info.
Stefan Monnier [Tue, 4 Dec 2012 17:04:01 +0000 (12:04 -0500)]
* lisp/obsolete/terminal.el, lisp/obsolete/longlines.el: Add obsolecence info.

11 years ago* tramp.texi (History): Mention ADB.
Michael Albinus [Tue, 4 Dec 2012 16:59:24 +0000 (17:59 +0100)]
* tramp.texi (History): Mention ADB.
(Inline methods): Add `adb' method.

11 years ago* Makefile.in (TRAMP_SRC):
Michael Albinus [Tue, 4 Dec 2012 16:56:04 +0000 (17:56 +0100)]
* Makefile.in (TRAMP_SRC):
* makefile.w32-in (TRAMP_SRC): Add tramp-adb.el.

11 years ago* net/tramp-adb.el: New package.
Juergen Hoetzel [Tue, 4 Dec 2012 16:53:01 +0000 (17:53 +0100)]
* net/tramp-adb.el: New package.

11 years ago* lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state
Dmitry Antipov [Tue, 4 Dec 2012 15:15:30 +0000 (19:15 +0400)]
* lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state
member.  Adjust users.  Convert mouse_face_past_end, mouse_face_defer
and mouse_face_hidden members to a bitfields.
* frame.h (struct frame): Remove set-but-not-used space_width member.
(FRAME_SPACE_WIDTH): Remove.
* nsterm.m, w32term.c, xterm.c: Adjust users.
* termchar.h (struct tty_display_info): Remove set-but-unused se_is_so
member.  Adjust users.  Convert term_initted, delete_in_insert_mode,
costs_set, insert_mode, standout_mode, cursor_hidden and flow_control
members to a bitfields.

11 years agogmm-utils.el (gmm-flet, gmm-labels): New macros.
Katsumi Yamaoka [Tue, 4 Dec 2012 08:22:12 +0000 (08:22 +0000)]
gmm-utils.el (gmm-flet, gmm-labels): New macros.
gnus-sync.el (gnus-sync-lesync-call)
message.el (message-read-from-minibuffer): Use gmm-flet.
gnus-score.el (gnus-score-decode-text-parts): Use gmm-labels.
gnus-util.el (gnus-macroexpand-all): Remove.

11 years agoObsolete terminal.el.
Chong Yidong [Tue, 4 Dec 2012 03:04:31 +0000 (11:04 +0800)]
Obsolete terminal.el.

* terminal.el: Move to obsolete/.

11 years agoObsolete longlines.el.
Chong Yidong [Tue, 4 Dec 2012 02:47:43 +0000 (10:47 +0800)]
Obsolete longlines.el.

* longlines.el: Move to obsolete/.

* lisp/org/org-bibtex.el (org-bibtex-ask): Use visual-line-mode instead of
longlines-mode.

* lisp/vc/ediff-diff.el (ediff-extract-diffs, ediff-extract-diffs3):
Remove code referring to longlines mode.

11 years ago* lisp/sort.el (delete-duplicate-lines): New command.
Juri Linkov [Mon, 3 Dec 2012 23:49:08 +0000 (01:49 +0200)]
* lisp/sort.el (delete-duplicate-lines): New command.

Fixes: debbugs:13032
11 years ago* lisp/info.el (Info-fontify-node): Don't hide the last newline.
Juri Linkov [Mon, 3 Dec 2012 23:38:56 +0000 (01:38 +0200)]
* lisp/info.el (Info-fontify-node): Don't hide the last newline.

Fixes: debbugs:12272
11 years agognus-sync.el (gnus-sync-newsrc-offsets): Add :version
Katsumi Yamaoka [Mon, 3 Dec 2012 22:08:37 +0000 (22:08 +0000)]
gnus-sync.el (gnus-sync-newsrc-offsets): Add :version

11 years agoDon't let call-process be a zombie factory.
Paul Eggert [Mon, 3 Dec 2012 21:42:12 +0000 (13:42 -0800)]
Don't let call-process be a zombie factory.

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
11 years ago* bytecode.c, lisp.h (Qbytecode): Remove.
Paul Eggert [Mon, 3 Dec 2012 21:07:47 +0000 (13:07 -0800)]
* bytecode.c, lisp.h (Qbytecode): Remove.

No longer needed after 2012-11-20 interactive-p changes.

11 years agoFix bug #13055 with cursor positioning inside scroll-margin.
Eli Zaretskii [Mon, 3 Dec 2012 20:48:12 +0000 (22:48 +0200)]
Fix bug #13055 with cursor positioning inside scroll-margin.

 src/xdisp.c (redisplay_window): If the cursor is visible, but inside
 the scroll margin, move point outside the margin.

11 years ago* gtkutil.c (my_log_handler): New function.
Jan Djärv [Mon, 3 Dec 2012 19:16:17 +0000 (20:16 +0100)]
* gtkutil.c (my_log_handler): New function.
(xg_set_geometry): Set log handler to my_log_handler.

Fixes: debbugs:11177