bpt/emacs.git
11 years ago* fileio.c (Fcopy_file): Make fstat failure as serious as open failure.
Paul Eggert [Thu, 13 Dec 2012 02:17:49 +0000 (18:17 -0800)]
* fileio.c (Fcopy_file): Make fstat failure as serious as open failure.

fstat shouldn't fail, and if it does fail copy-file should not proceed.
Remove unnecessary S_ISLNK test, as (contra the comments) this
function can't copy symlinks.  Improve quality of error message
when attempting to copy files that are neither regular files nor
directories.

11 years ago* lisp/emacs-lisp/cl.el (letf): Make it an alias of cl-letf.
Stefan Monnier [Thu, 13 Dec 2012 01:46:47 +0000 (20:46 -0500)]
* lisp/emacs-lisp/cl.el (letf): Make it an alias of cl-letf.
(cl--symbol-function): Remove (now that funbound is like nil).

11 years agont/config.nt: Sync with autogen/config.in.
Juanma Barranquero [Thu, 13 Dec 2012 01:18:28 +0000 (02:18 +0100)]
nt/config.nt: Sync with autogen/config.in.
(HAVE_INOTIFY, HAVE_SYS_INOTIFY_H): New macros.

11 years agognus-start.el (gnus-before-resume-hook): Add :version
Katsumi Yamaoka [Thu, 13 Dec 2012 00:52:17 +0000 (00:52 +0000)]
gnus-start.el (gnus-before-resume-hook): Add :version

11 years ago* lisp/button.el (button--area-button-p): Fix typo (defun is not defalias).
Glenn Morris [Wed, 12 Dec 2012 22:39:29 +0000 (17:39 -0500)]
* lisp/button.el (button--area-button-p): Fix typo (defun is not defalias).

11 years agognus.el (gnus-other-frame-resume-function): Add :version
Katsumi Yamaoka [Wed, 12 Dec 2012 22:29:54 +0000 (22:29 +0000)]
gnus.el (gnus-other-frame-resume-function): Add :version

11 years agognus-art.el (gnus-article-browse-html-parts): Use <div align="left"> instead of ...
Katsumi Yamaoka [Wed, 12 Dec 2012 22:22:31 +0000 (22:22 +0000)]
gnus-art.el (gnus-article-browse-html-parts): Use <div align="left"> instead of <pre> to align message header

11 years ago* dispnew.c (set_window_cursor_after_update): Use clip_to_bounds.
Dmitry Antipov [Wed, 12 Dec 2012 15:33:30 +0000 (19:33 +0400)]
* dispnew.c (set_window_cursor_after_update): Use clip_to_bounds.
* gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
* window.c (Frecenter):
* xdisp.c (resize_mini_window, hscroll_window_tree, draw_glyphs):
* xterm.c (x_set_toolkit_scroll_bar_thumb): Likewise.

11 years ago* lisp/gnus/gnus.el (gnus-other-frame-resume-function): Add user option.
Sam Steingold [Wed, 12 Dec 2012 14:46:58 +0000 (09:46 -0500)]
* lisp/gnus/gnus.el (gnus-other-frame-resume-function): Add user option.
(gnus-other-frame): Call `gnus-other-frame-resume-function' on resume.

11 years ago* lisp/frame.el (frame-maximization-style): New user option.
Sam Steingold [Wed, 12 Dec 2012 14:43:45 +0000 (09:43 -0500)]
* lisp/frame.el (frame-maximization-style): New user option.
(toggle-frame-maximized): Toggle frame maximization according to
`frame-maximization-style', bound to <f11>.
(cycle-frame-maximized): Cycle between all maximization styles and
non-maximized frame, bound to shift-<f11>.

11 years ago* lisp/mpc.el (mpc-format): Use truncate-string-to-width.
David Cadé [Wed, 12 Dec 2012 14:42:03 +0000 (09:42 -0500)]
* lisp/mpc.el (mpc-format): Use truncate-string-to-width.

Fixes: debbugs:13143

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

11 years ago2012-12-12 Daniel Colascione <dancol@dancol.org>
Daniel Colascione [Wed, 12 Dec 2012 03:26:52 +0000 (19:26 -0800)]
2012-12-12  Daniel Colascione  <dancol@dancol.org>

* unexcw.c (fixup_executable): use posix_fallocate to ensure that
the dumped Emacs is not a sparse file, greatly improving Cygwin
"make bootstrap" performance.

11 years ago* lisp/emacs-lisp/eieio.el: Prettier object pretty-printing.
Jonas Bernoulli [Wed, 12 Dec 2012 02:16:05 +0000 (21:16 -0500)]
* lisp/emacs-lisp/eieio.el: Prettier object pretty-printing.
(eieio-override-prin1): Don't quote kewords and booleans.
(object-write) <eieio-default-superclass>: Don't put closing parens
on new line, avoid needless empty lines, align values that are objects
with the slot keyword (instead of beginning on the same line).
(eieio-list-prin1): Align value with slot keyword; increase
eieio-print-depth before printing members of the list.

Fixes: debbugs:13115

11 years ago* lisp/mail/emacsbug.el (report-emacs-bug): Move the intangible text to
Stefan Monnier [Tue, 11 Dec 2012 18:52:31 +0000 (13:52 -0500)]
* lisp/mail/emacsbug.el (report-emacs-bug): Move the intangible text to
a display text-property.
(report-emacs-bug-hook): Don't bother deleting it any more.

11 years ago* lisp/hilit-chg.el (highlight-save-buffer-state): Delete.
Stefan Monnier [Tue, 11 Dec 2012 18:51:27 +0000 (13:51 -0500)]
* lisp/hilit-chg.el (highlight-save-buffer-state): Delete.
Use with-silent-modifications instead.
(hilit-chg-set-face-on-change): Only fixup the text that's modified.

11 years ago* lisp/button.el: Handle buttons in display text-properties.
Stefan Monnier [Tue, 11 Dec 2012 18:49:25 +0000 (13:49 -0500)]
* lisp/button.el: Handle buttons in display text-properties.
(button--area-button-p, button--area-button-string):
Use (STRING . STRING-POS) representation instead of just STRING.

11 years agoMerge from gnulib for 'inline', incorporating:
Paul Eggert [Tue, 11 Dec 2012 18:18:13 +0000 (10:18 -0800)]
Merge from gnulib for 'inline', incorporating:
2012-12-11 extern-inline: avoid incompatibility with Darwin Libc
* m4/extern-inline.m4: Update from gnulib.

Fixes: debbugs:13040

11 years agoSpelling fixes.
Paul Eggert [Tue, 11 Dec 2012 18:09:55 +0000 (10:09 -0800)]
Spelling fixes.

11 years ago* inotify.c (inotify_callback): Generate an Emacs event for every
Michael Albinus [Tue, 11 Dec 2012 16:29:13 +0000 (17:29 +0100)]
* inotify.c (inotify_callback): Generate an Emacs event for every
incoming inotify event.

11 years agoFix part of bug #13011 with display of lines that have a box face.
Eli Zaretskii [Tue, 11 Dec 2012 12:22:35 +0000 (14:22 +0200)]
Fix part of bug #13011 with display of lines that have a box face.

 src/xdisp.c (handle_face_prop): Fix logic of computing
 it->start_of_box_run_p.
 (append_space_for_newline): If the glyph row is R2L, reset the
 iterator's end_of_box_run_p flag before prepending the space glyph.
 (extend_face_to_end_of_line): If the glyph row is R2L, reset the
 iterator's start_of_box_run_p flag before prepending the stretch.
 (append_glyph, produce_image_glyph, append_composite_glyph)
 (append_stretch_glyph, append_glyphless_glyph): Reverse the
 left_box_line_p and right_box_line_p flags of the glyph for R2L
 glyph rows.

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

11 years ago* buffer.c (Fset_buffer_multibyte): Do not force redisplay
Dmitry Antipov [Tue, 11 Dec 2012 09:51:12 +0000 (13:51 +0400)]
* buffer.c (Fset_buffer_multibyte): Do not force redisplay
if changed buffer is not shown in a window.
* insdel.c (prepare_to_modify_buffer): Likewise.
* window.c (replace_buffer_in_windows_safely): Do nothing
if buffer is not shown in a window.
(Fforce_window_update): Likewise if string or buffer argument
is passed.

11 years agoMinor change in variable name in inotify.c.
Eli Zaretskii [Tue, 11 Dec 2012 08:24:09 +0000 (10:24 +0200)]
Minor change in variable name in inotify.c.

 src/inotify.c (Finotify_add_watch): Rename decoded_file_name to
 encoded_file_name, which is what it is.

11 years agoFix a typo in lisp/makefile.w32-in.
Eli Zaretskii [Tue, 11 Dec 2012 07:49:06 +0000 (09:49 +0200)]
Fix a typo in lisp/makefile.w32-in.
See http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00288.html
for the details.

 lisp/makefile.w32-in (compile4-SH): Fix a typo that caused term
 subdirectory be skipped.

11 years agoConsistently use marker_position and marker_byte_position.
Dmitry Antipov [Tue, 11 Dec 2012 06:08:53 +0000 (10:08 +0400)]
Consistently use marker_position and marker_byte_position.
* fringe.c (Ffringe_bitmaps_at_pos):
* indent.c (Fvertical_motion):
* insdel.c (prepare_to_modify_buffer):
* keyboard.c (make_lispy_position):
* window.c (Fwindow_end, Fpos_visible_in_window_p, unshow_buffer)
(window_scroll_pixel_based, displayed_window_lines)
(Fset_window_configuration):
* xdisp.c (message_dolog, with_echo_area_buffer_unwind_data)
(mark_window_display_accurate_1, redisplay_window, decode_mode_spec):
Replace direct access to marker fields with calls
to marker_position and/or marker_byte_position.

11 years ago* lisp/net/rcirc.el (rcirc-urls, rcirc-condition-filter): Doc fixes.
Glenn Morris [Tue, 11 Dec 2012 04:44:26 +0000 (20:44 -0800)]
* lisp/net/rcirc.el (rcirc-urls, rcirc-condition-filter): Doc fixes.

11 years agoFix for indentation of f90 preproc lines embedded in continuations
Glenn Morris [Tue, 11 Dec 2012 04:42:49 +0000 (20:42 -0800)]
Fix for indentation of f90 preproc lines embedded in continuations

* lisp/progmodes/f90.el (f90-line-continued, f90-indent-region):
Treat preprocessor lines embedded in continuations like comments.
(f90-indent-line): Special-case preprocessor lines.

* test/automated/f90.el (f90-test-bug13138): New test.

11 years ago* lisp/calc/calc-forms.el (calc-date-notation): Fix typo.
Jay Belanger [Tue, 11 Dec 2012 02:37:36 +0000 (20:37 -0600)]
* lisp/calc/calc-forms.el (calc-date-notation): Fix typo.

11 years ago* lisp/calc/calc.el (calc-standard-date-formats): Add more date
Jay Belanger [Tue, 11 Dec 2012 02:29:21 +0000 (20:29 -0600)]
* lisp/calc/calc.el (calc-standard-date-formats):  Add more date
  formats.

* lisp/calc/calc-forms.el (math-parse-iso-date): New function.
  (math-parse-date): Use `math-parse-iso-date' when appropriate.
  (math-parse-iso-date-validate): Add extra error checking.
  (calc-date-notation): Add ability to access new date formats.

11 years ago(lib-src,src,lib)/makefile.w32-in: Update dependencies.
Juanma Barranquero [Tue, 11 Dec 2012 02:06:53 +0000 (03:06 +0100)]
(lib-src,src,lib)/makefile.w32-in: Update dependencies.

11 years agont/config.nt: Sync with autogen/config.in.
Juanma Barranquero [Tue, 11 Dec 2012 01:35:28 +0000 (02:35 +0100)]
nt/config.nt: Sync with autogen/config.in.
(HAVE_DECL_UNSETENV, HAVE_SIG2STR, VOID_UNSETENV): New macros.
(ULIMIT_BREAK_VALUE): Remove.

11 years ago* internals.texi (C Integer Types): New section.
Paul Eggert [Tue, 11 Dec 2012 00:13:44 +0000 (16:13 -0800)]
* internals.texi (C Integer Types): New section.

This follows up and records an email in
<http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00496.html>.

11 years ago* lisp/hi-lock.el (hi-lock--regexps-at-point): Fix boundary case for
Stefan Monnier [Mon, 10 Dec 2012 21:26:13 +0000 (16:26 -0500)]
* lisp/hi-lock.el (hi-lock--regexps-at-point): Fix boundary case for
font-lock as well as when there's no text-property.

11 years agoMerge from private trunk
Daniel Colascione [Mon, 10 Dec 2012 20:55:02 +0000 (12:55 -0800)]
Merge from private trunk

Daniel Colascione 2012-12-10 Add emacs.res to .bzrignore
Daniel Colascione 2012-12-10 Fix cygw32 build break

11 years agoAdd emacs.res to .bzrignore
Daniel Colascione [Mon, 10 Dec 2012 20:47:57 +0000 (12:47 -0800)]
Add emacs.res to .bzrignore

11 years agoFix cygw32 build break
Daniel Colascione [Mon, 10 Dec 2012 20:46:20 +0000 (12:46 -0800)]
Fix cygw32 build break

11 years ago* configure.ac (HAVE_INOTIFY): Speed up configure-time test.
Paul Eggert [Mon, 10 Dec 2012 20:27:33 +0000 (12:27 -0800)]
* configure.ac (HAVE_INOTIFY): Speed up configure-time test.

There's no need to test for any of three inotify functions,
since we use all three.  Check for just the first one.

11 years ago* lisp/hi-lock.el: Refine the choice of default face.
Jambunathan K [Mon, 10 Dec 2012 18:33:59 +0000 (13:33 -0500)]
* lisp/hi-lock.el: Refine the choice of default face.
(hi-lock-keyword->face): New function.  Use it wherever we used
cadadadr instead.
(hi-lock--regexps-at-point): Ignore faces that can't come from hi-lock.
(hi-lock--last-face): Remove var.
(hi-lock--unused-faces): New var to replace it.
(hi-lock-read-face-name): Use/maintain it.
(hi-lock-unface-buffer): Maintain it.  Fix error for the C-u case.
(hi-lock-set-pattern): Ignore new rule if it has the same regexp even
if it has another face.

Fixes: debbugs:11095

11 years agoMove fix for cygw32 icon issue from emacs-24 branch to trunk as Stefan Monnier requests
Daniel Colascione [Mon, 10 Dec 2012 17:52:35 +0000 (09:52 -0800)]
Move fix for cygw32 icon issue from emacs-24 branch to trunk as Stefan Monnier requests

11 years agoPer-buffer window counters.
Dmitry Antipov [Mon, 10 Dec 2012 17:34:47 +0000 (21:34 +0400)]
Per-buffer window counters.
* buffer.h (struct buffer): New member window_count.
(buffer_window_count): New function.
* buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
Initialize window_count.
(Fkill_buffer): Verify window_count for the buffer being killed.
(modify_overlay): Do not force redisplay if buffer is not shown
in any window.
(init_buffer_once): Initialize window_count for buffer_defaults
and buffer_local_symbols.
* window.h (buffer_shared): Remove declaration.
(wset_buffer): Convert from inline ...
* window.c (wset_buffer): ... to an ordinary function.
(adjust_window_count): New function.
(make_parent_window): Use it.
* xdisp.c (buffer_shared): Remove.
(redisplay_internal, redisplay_window): Adjust users.
(buffer_shared_and_changed): Use per-buffer window counter.

11 years agoFinal cleanups and updated ChangeLog entries.
Eli Zaretskii [Mon, 10 Dec 2012 13:25:17 +0000 (15:25 +0200)]
Final cleanups and updated ChangeLog entries.

11 years agoProof-read comments on w32notify.c. Adapt NEWS entry.
Eli Zaretskii [Mon, 10 Dec 2012 12:38:49 +0000 (14:38 +0200)]
Proof-read comments on w32notify.c.  Adapt NEWS entry.

11 years agoMerge from trunk + rename the event. Not tested yet.
Eli Zaretskii [Mon, 10 Dec 2012 12:08:02 +0000 (14:08 +0200)]
Merge from trunk + rename the event.  Not tested yet.

11 years agoSupport filesystem notification through inotify on GNU/Linux.
Rüdiger Sonderfeld [Mon, 10 Dec 2012 11:17:21 +0000 (06:17 -0500)]
Support filesystem notification through inotify on GNU/Linux.

 configure.ac (inotify): New option.
 (HAVE_INOTIFY): Test for inotify.

 src/termhooks.h (enum event_kind) [HAVE_INOTIFY]: Add
 FILE_NOTIFY_EVENT.
 src/lisp.h (syms_of_inotify) [HAVE_INOTIFY]: Add prototype.
 src/keyboard.c (Qfile_inotify) [HAVE_INOTIFY]: New variable.
 (syms_of_keyboard): DEFSYM it.
 (kbd_buffer_get_event) [HAVE_INOTIFY]: Generate FILE_NOTIFY_EVENT.
 (make_lispy_event): Support FILE_NOTIFY_EVENT by generating
 Qfile_inotify events.
 (keys_of_keyboard) [HAVE_INOTIFY]: Bind file-inotify events in
 special-event-map to inotify-handle-event.
 src/emacs.c (main) [HAVE_INOTIFY]: Call syms_of_inotify.
 src/Makefile.in (base_obj): Add inotify.o.
 src/inotify.c: New file.

 lisp/subr.el (inotify-event-p, inotify-handle-event): New functions.

 test/automated/inotify-test.el: New test.

11 years agoCompile Windows resources into cygw32 Emacs
Daniel Colascione [Mon, 10 Dec 2012 07:11:21 +0000 (23:11 -0800)]
Compile Windows resources into cygw32 Emacs

11 years agoMerge from emacs-24; up to 2012-11-26T19:56:14Z!monnier@iro.umontreal.ca
Glenn Morris [Mon, 10 Dec 2012 02:00:42 +0000 (18:00 -0800)]
Merge from emacs-24; up to 2012-11-26T19:56:14Z!monnier@iro.umontreal.ca

11 years ago* fileio.c (Fsubstitute_in_file_name): Use ptrdiff_t, not int,
Paul Eggert [Mon, 10 Dec 2012 01:44:32 +0000 (17:44 -0800)]
* fileio.c (Fsubstitute_in_file_name): Use ptrdiff_t, not int,

for string length.

11 years ago* lisp/emacs-lisp/cl-lib.el (cl-declaim): Paren typo.
Stefan Monnier [Mon, 10 Dec 2012 01:32:36 +0000 (20:32 -0500)]
* lisp/emacs-lisp/cl-lib.el (cl-declaim): Paren typo.

11 years agoProvide a prototype for unsetenv on MS-Windows.
Eli Zaretskii [Sun, 9 Dec 2012 22:10:18 +0000 (00:10 +0200)]
Provide a prototype for unsetenv on MS-Windows.

 nt/inc/unistd.h (unsetenv): Provide a prototype.

11 years agoParallelize byte compilation on MS-Windows.
Eli Zaretskii [Sun, 9 Dec 2012 21:32:12 +0000 (23:32 +0200)]
Parallelize byte compilation on MS-Windows.

 lisp/makefile.w32-in (WINS_BASIC1, WINS_BASIC2, WINS_BASIC3)
 (WINS_BASIC4): New variables, subdivide subdirectories into 4
 parts.
 (WINS_BASIC): Define as concatenation of the above.
 (compile): Subdivide into 4 separate and independent jobs that can
 be run in parallel.
 (compile0-CMD, compile0-SH): New targets for compiling
 COMPILE_FIRST files, which are prerequisites for the rest of the
 byte-compilation.
 (compile1-CMD, compile2-CMD, compile3-CMD, compile4-CMD): New
 targets for parallel compilation with cmd.exe.
 (compile1-SH, compile2-SH, compile3-SH, compile4-SH): Ditto for
 compiling under a Unixy shell.

11 years ago* doc/lispref/control.texi (Pattern maching case statement): New node.
Stefan Monnier [Sun, 9 Dec 2012 15:36:46 +0000 (10:36 -0500)]
* doc/lispref/control.texi (Pattern maching case statement): New node.

11 years agoAuto-commit of generated files.
Glenn Morris [Sun, 9 Dec 2012 11:19:04 +0000 (06:19 -0500)]
Auto-commit of generated files.

11 years ago* configure.ac: Fix source command in .gdbinit.
Andreas Schwab [Sun, 9 Dec 2012 08:37:01 +0000 (09:37 +0100)]
* configure.ac: Fix source command in .gdbinit.
Don't quote $MAKEINFO.

11 years ago* simple.el (set-mark-default-inactive): Mark for removal after 24.3.
Chong Yidong [Sun, 9 Dec 2012 03:44:59 +0000 (11:44 +0800)]
* simple.el (set-mark-default-inactive): Mark for removal after 24.3.

11 years ago* simple.el (set-mark-default-inactive): Delete accidentally-introduced option.
Chong Yidong [Sun, 9 Dec 2012 03:40:09 +0000 (11:40 +0800)]
* simple.el (set-mark-default-inactive): Delete accidentally-introduced option.
(set-mark-command, exchange-point-and-mark): Remove calls.

11 years agoAllow spaces in some configuration vars (Bug#13078).
Paul Eggert [Sun, 9 Dec 2012 02:22:39 +0000 (18:22 -0800)]
Allow spaces in some configuration vars (Bug#13078).

* configure.ac (srcdir): Don't assume $PWD lacks spaces.
(srcdir, MAKEINFO, PKG_CONFIG, PKG_CONFIG_MIN_VERSION):
All uses quoted, to allow spaces in these vars.

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* nsterm.m (fd_handler:): FD_ZERO fds.
Jan Djärv [Sat, 8 Dec 2012 19:02:30 +0000 (20:02 +0100)]
* nsterm.m (fd_handler:): FD_ZERO fds.

Fixes: debbugs:13103

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 agoFix incompatibilities with 64-bit Windows builds.
Fabrice Popineau [Sat, 8 Dec 2012 12:06:46 +0000 (14:06 +0200)]
Fix incompatibilities with 64-bit Windows builds.

 src/w32fns.c (cache_system_info): Cast sysinfo_cache.dwPageSize to
 DWORD_PTR, for compatibility with 64-bit builds.
 src/w32.c (_PROCESS_MEMORY_COUNTERS_EX):
 (GetProcessWorkingSetSize_Proc, get_process_working_set_size)
 (system_process_attributes): Use SIZE_T rather than DWORD, for
 compatibility with 64-bit builds.

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 ago* lisp/simple.el (just-one-space): Doc fix.
Dani Moncayo [Sat, 8 Dec 2012 03:25:28 +0000 (11:25 +0800)]
* lisp/simple.el (just-one-space): Doc fix.
* doc/emacs/killing.texi (Deletion): Doc fix.

Fixes: debbugs:12748

11 years ago* lread.c (Vload_source_file_function): Doc fix.
Christopher Schmidt [Sat, 8 Dec 2012 03:16:45 +0000 (11:16 +0800)]
* lread.c (Vload_source_file_function): Doc fix.

Fixes: debbugs:11647

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 agoFix insertion of " inside @smallexample.
Eli Zaretskii [Fri, 7 Dec 2012 15:52:40 +0000 (17:52 +0200)]
Fix insertion of " inside @smallexample.

 lisp/textmodes/texinfo.el (texinfo-enable-quote-envs): Add "smallexample".

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 agoFix bug #13108 introduced by the fix to bug #12930.
Eli Zaretskii [Fri, 7 Dec 2012 15:28:20 +0000 (17:28 +0200)]
Fix bug #13108 introduced by the fix to bug #12930.

 src/indent.c (Fvertical_motion): If a display string will be
 displayed on the left or the right margin, don't consider it as a
 factor in cursor positioning.

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 agoReword doc-string of Fcompare_buffer_substrings.
Martin Rudalics [Fri, 7 Dec 2012 09:45:03 +0000 (10:45 +0100)]
Reword doc-string of Fcompare_buffer_substrings.

* editfns.c (Fcompare_buffer_substrings): Reword doc-string.

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 ago* lisp/hilit-chg.el (hilit-chg-set-face-on-change): Don't burp in
Le Wang [Fri, 7 Dec 2012 05:00:04 +0000 (00:00 -0500)]
* lisp/hilit-chg.el (hilit-chg-set-face-on-change): Don't burp in
narrowed buffer.

Fixes: debbugs:12361

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/debug.el (debug): Fix hard-coded frame counts.
Michael Heerdegen [Fri, 7 Dec 2012 04:31:24 +0000 (23:31 -0500)]
* lisp/emacs-lisp/debug.el (debug): Fix hard-coded frame counts.
Virtually backported from trunk.

Fixes: debbugs:10025

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 agolisp/vc/vc-hooks.el (vc-state): Doc fix.
Juanma Barranquero [Fri, 7 Dec 2012 03:55:40 +0000 (04:55 +0100)]
lisp/vc/vc-hooks.el (vc-state): Doc fix.

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 rmail.el fix for bug#13066
Glenn Morris [Thu, 6 Dec 2012 21:41:32 +0000 (16:41 -0500)]
Further rmail.el fix for bug#13066

* lisp/mail/rmail.el (rmail-maybe-display-summary):
Preserve buffer, in case select-window changes it.

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/emacs-lisp/cl.el, lisp/emacs-lisp/cl-lib.el: Move cl-unload-function and
Stefan Monnier [Thu, 6 Dec 2012 21:08:50 +0000 (16:08 -0500)]
* lisp/emacs-lisp/cl.el, lisp/emacs-lisp/cl-lib.el: Move cl-unload-function and
cl-load-hook where they belong.

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.