Paul Eggert [Sun, 16 Sep 2012 21:43:55 +0000 (14:43 -0700)]
Remove configure's --without-sync-input option.
When auditing signal-handling in preparation for cleaning it up,
I found that SYNC_INPUT has race conditions and would be a real
pain to fix. Since it's an undocumented and deprecated
configure-time option, now seems like a good time to remove it.
Also see <http://bugs.gnu.org/11080#16>.
* configure.ac (SYNC_INPUT, BROKEN_SA_RESTART): Remove.
* admin/CPP-DEFINES (BROKEN_SA_RESTART, SA_RESTART): Remove.
* etc/TODO (Make SYNC_INPUT the default): Remove, as the code now
behaves as if SYNC_INPUT is always true.
* src/alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
(_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
(alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
(malloc_hysteresis):
(check_depth) [XMALLOC_OVERRUN_CHECK]:
(MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
(__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
(dont_register_blocks, bytes_used_when_reconsidered)
(bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
(emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
[!SYSTEM_MALLOC && !SYNC_INPUT]:
Remove. All uses removed.
(MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
implementation, one that depends on whether the new macro
XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
is defined.
* src/atimer.c (run_timers, handle_alarm_signal):
* src/keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
(handle_async_input, process_pending_signals)
(handle_input_available_signal, init_keyboard):
* src/nsterm.m (ns_read_socket):
* src/process.c (wait_reading_process_output):
* src/regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
* src/sysdep.c (emacs_sigaction_init) [SA_RESTART]:
(emacs_write):
* src/xterm.c (XTread_socket):
Assume SYNC_INPUT.
* src/conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
* src/eval.c (handling_signal): Remove. All uses removed.
* src/lisp.h (ELSE_PENDING_SIGNALS): Remove.
All uses replaced with the SYNC_INPUT version.
(reset_malloc_hooks, uninterrupt_malloc, handling_signal):
Remove decls.
* src/sysdep.c, src/syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
Now static.
* admin/admin.el (set-version): No more need to set nextstep versions.
(set-copyright): Update for moved nextstep files.
* nextstep/Makefile.in: New file.
* nextstep/templates: New directory.
* nextstep/templates/Emacs.desktop.in, nextstep/templates/Info-gnustep.plist.in:
* nextstep/templates/Info.plist.in, nextstep/templates/InfoPlist.strings.in:
Move here from various Cocoa/, GNUstep/ locations.
Let configure set the version number.
* nextstep/Cocoa/Emacs.base/Contents/Info.plist:
* nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:
* nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:
* nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop: Move to templates/.
* nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj: Remove directory.
* src/Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
(ns_frag): Remove.
(ns-app): Move here from ns.mk, and simplify.
(clean): Simplify nextstep entry.
* src/ns.mk: Remove file.
Jan Djärv [Sun, 16 Sep 2012 09:11:50 +0000 (11:11 +0200)]
Try to fix crashes introduced by 2012-09-10T21:01:45Z!jan.h.d@swipnet.se.
* nsfns.m (Fx_open_connection): Move initialization of ns_*_types
to ns_term_init to avoid memory leak.
* nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
explicit retain/release.
(ns_term_init): Only allow one display. Initialize outerpool and
ns_*_types.
* lisp/progmodes/compile.el (compilation-parse-errors): Accept list
values similar to font-lock-keywords. Suggested by
Oleksandr Manzyuk.
(compilation-error-regexp-alist): Doc fix.
Paul Eggert [Sat, 15 Sep 2012 08:45:27 +0000 (01:45 -0700)]
Port _setjmp fix to POSIXish hosts as well as Microsoft.
* nt/config.nt: Attempt to sync with autogen/config.in.
(HAVE_SIGSETJMP, HAVE__SETJMP): New macros.
(_longjmp, _setjmp): Remove.
* src/image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
the Microsoft problem in a different way, by altering nt/config.nt.
Eli Zaretskii [Sat, 15 Sep 2012 08:03:11 +0000 (11:03 +0300)]
Fix MS-Windows build broken by 2012-09-15T07:06:56Z!eggert@cs.ucla.edu, completing fix for bug #12446.
src/w32xfns.c:
src/w32uniscribe.c:
src/w32term.c:
src/w32select.c:
src/w32reg.c:
src/w32proc.c:
src/w32menu.c:
src/w32inevt.c:
src/w32heap.c:
src/w32font.c:
src/w32fns.c:
src/w32console.c:
src/w32.c:
src/w16select.c: Remove inclusion of setjmp.h, as it is now included
by lisp.h. This completes removal of setjmp.h inclusion
erroneously announced in the previous commit.
src/lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
more accurate.
src/image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
not defined as a macro. The latter happens on MS-Windows.
Paul Eggert [Sat, 15 Sep 2012 07:06:56 +0000 (00:06 -0700)]
Port better to POSIX hosts lacking _setjmp.
* configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols.
(_setjmp, _longjmp): Remove.
* src/lisp.h: Include <setjmp.h> here, since we use its symbols here.
All instances of '#include <setjmp.h>' removed, if the
only reason for the instance was because "lisp.h" was included.
(sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
and _longjmp with the new symbols. Emacs already uses _setjmp if
available, so this change affects only POSIXish hosts that have
sigsetjmp but not _setjmp, such as some versions of Solaris and
Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
* src/image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
(png_load_body) [HAVE_PNG]:
(PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
(PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
since PNG requires jmp_buf. This is the only exception to the
general rule that we now use sys_setjmp and sys_longjmp.
This exception is OK since this code does not change the signal
mask or longjmp out of a signal handler.
Improve vc-bzr-working-revision for lightweight checkouts
* lisp/vc/vc-bzr.el (vc-bzr-working-revision): For lightweight local
checkouts, check the parent dirstate matches the branch.
Add "--tree" to "bzr revno" arguments. Don't try to shorten the
empty string.
Improve emacs-bzr-version for lightweight checkouts (bug#12441)
* lisp/version.el (emacs-bzr-version): Doc fix.
(emacs-bzr-version-dirstate): New function.
(emacs-bzr-get-version): For lightweight checkouts, if the parent
is local try and check that it matches the branch. If not, just
use dirstate information.
Paul Eggert [Fri, 14 Sep 2012 18:56:19 +0000 (11:56 -0700)]
* configure.ac: Port to hosts lacking gtk.
(PKG_CHECK_MODULES): Capture pkg-config diagnostics
better, in particular, problems in invoking pkg-config itself.
This is useful on hosts that don't have pkg-config.
(GTK_MODULES): Do not exit 'configure' simply because gtk3
and gtk2 are both missing. Problem found on Solaris 8.
Stefan Monnier [Fri, 14 Sep 2012 03:55:16 +0000 (23:55 -0400)]
* lisp/emacs-lisp/edebug.el: Miscellaneous cleanup.
Remove obsolete byte-compiler hack that tried to silence some warnings.
(edebug-submit-bug-report): Remove.
(edebug-get-buffer-window, edebug-sit-for, edebug-input-pending-p):
Remove aliases, use the un-prefixed name instead.
(edebug-pop-to-buffer): Consider other frames.
(edebug-original-read):: Make it more obvious that it's always defined.
(edebug--make-form-data-entry, edebug--form-data-name)
(edebug--form-data-begin, edebug--form-data-end): Rename from the
single-dashed name, and implement with cl-defstruct.
(edebug-set-form-data-entry): Use the standard accessors.
(edebug-make-top-form-data-entry): Use push.
(edebug-no-match): Drop useless `funcall'.
(mapcar, mapconcat, mapatoms, apply, funcall): Don't add debug specs
to functions.
(defsubst, dont-compile, eval-when-compile, eval-and-compile)
(delay-mode-hooks, with-temp-file, with-temp-message, ad-dolist)
(with-syntax-table, push, pop, 1value, noreturn, defadvice)
(easy-menu-define, with-custom-print): Remove redundant specs.
(edebug-outside-overriding-local-map)
(edebug-outside-overriding-terminal-local-map): Remove, unused.
(edebug--display): Bind unread-command-events directly to nil rather
than binding it to unread-command-events and later setting it to nil.
(edebug--display): Kill edebug-eval-buffer here...
(edebug--recursive-edit): ...rather than here.
Bind standard-output and standard-input.
(edebug-eval): Check cl-macroexpand-all is fboundp.
(edebug-temp-display-freq-count): Fix last change.
* lisp/emacs-lisp/easymenu.el (easy-menu-define): Add `debug' spec.
* lisp/subr.el (noreturn, 1value): Add `debug' spec.
* lisp/emacs-lisp/advice.el: Require cl-lib.
(ad-copy-tree): Remove, use copy-tree instead.
(ad-dolist): Remove use dolist or cl-dolist instead.
(ad-do-return): Remove, use cl-return instead.
(defadvice): Add `debug' spec.
* lisp/vc/vc.el: No need to require ediff.
(ediff-load-version-control): Declare.
(ediff-vc-internal): Fix declaration.
(vc-version-ediff): Require ediff.
Paul Eggert [Thu, 13 Sep 2012 16:23:06 +0000 (09:23 -0700)]
Use a more backwards-compatible timer format.
* etc/NEWS: Document it.
* lisp/emacs-lisp/timer.el (timer): PSECS is now at the end, rather than
being right after USECS, as that better supports old code that
inadvisedly looked directly at the timer vector.
* src/keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
vector element, not from the 4th, since PSECS is now at the end.
(Fcurrent_idle_time): Doc fix.
language/chinese.el ("Chinese-GB", "Chinese-BIG5", "Chinese-CNS", "Chinese-EUC-TW"): Add chinese-gbk to coding-priority property of these language environment.
Paul Eggert [Thu, 13 Sep 2012 06:09:45 +0000 (23:09 -0700)]
Fix glitches caused by addition of psec to timers.
* etc/NEWS: Document timer format change.
* lisp/image.el (image-animate-timer):
* lisp/time.el (display-time-world-timer):
Use timer--function and timer--args rather than raw access to
timer vector.
* lisp/gnus/gnus-art.el (gnus-article-stop-animations):
Use timer--function rather than raw access to timer vector.
Function to mark objects and remove killed buffers at once.
* alloc.c (discard_killed_buffers): Rename to ...
(mark_discard_killed buffers) ... new name. Add marking
of remaining objects. Fix comment. Adjust users.
(mark_object): Do not touch frame buffer lists here.
* frame.c (delete_frame): Reset frame buffer lists here.
Paul Eggert [Thu, 13 Sep 2012 04:14:33 +0000 (21:14 -0700)]
Better workaround for GNOME bug when --enable-gcc-warnings.
* emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
Paul Eggert [Thu, 13 Sep 2012 02:21:28 +0000 (19:21 -0700)]
Simplify SIGIO usage.
The code that dealt with SIGIO was crufty and confusing, e.g., it
played tricks like "#undef SIGIO" but these tricks were not used
consistently. Simplify mostly by not #undeffing standard symbols,
e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
or not as we please) rather than "defined SIGIO" (standard symbol
that we probably shouldn't #undef).
* configure.ac (NO_TERMIO, BROKEN_FIONREAD, BROKEN_SIGAIO)
(BROKEN_SIGPOLL, BROKEN_SIGPTY): Remove.
(USABLE_FIONREAD, USABLE_SIGIO): New symbols. All uses of
'defined SIGIO' replaced with 'defined USABLE_SIGIO', with no need
to #undef SIGIO now (which was error-prone). Likewise, all uses
of 'defined FIONREAD' replaced with 'defined USABLE_FIONREAD'.
* src/admin/CPP_DEFINES (BROKEN_SIGAIO, BROKEN_SIGIO, BROKEN_SIGPOLL)
(BROKEN_SIGPTY, NO_TERMIO): Remove.
* src/conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
Modules that need it can include it.
[USG5_4 && emacs]: Likewise, do not include the streams stuff here.
* src/dispextern.h (ignore_sigio): New decl.
* src/emacs.c (shut_down_emacs): Invoke unrequest_sigio
unconditionally, since it's now a no-op if !USABLE_SIGIO.
* src/emacs.c (shut_down_emacs):
* src/keyboard.c (kbd_buffer_store_event_hold):
Use ignore_sigio rather than invoking 'signal' directly.
* src/keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
for FIONREAD.
(FIONREAD, SIGIO): Do not #undef.
(tty_read_avail_input): Use #error rather than a syntax error.
* src/process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
for I_PIPE, used by SETUP_SLAVE_PTY.
(DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
* src/sysdep.c (croak): Remove; no longer needed. This bit of
temporary code, with Fred N. Fish's comment that it's temporary,
has been in Emacs since at least 1992!
(init_sigio, reset_sigio, request_sigio, unrequest_sigio):
Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
* src/syssignal.h (croak): Remove decl.
(SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
* src/systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
now that we're termios-only.
(FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
* src/term.c (dissociate_if_controlling_tty): Use #error rather than
a run-time error.
Stefan Monnier [Thu, 13 Sep 2012 02:00:41 +0000 (22:00 -0400)]
* lisp/emacs-lisp/edebug.el: Use lexical-binding.
Remove the "edebug-" prefix from non-dynamically-scoped variables.
Mark unused args with underscore.
(edebug-save-restriction, edebug-outside-excursion): Use `declare'.
(edebug-form-data): Use defvar-local.
(edebug-make-before-and-after-form, edebug-make-after-form):
Use backquote.
(edebug-args, edebug-value, edebug-after-index, edebug-arg-mode):
Not dynamically scoped any more.
(edebug--enter-trace): Add arguments `function' and `args'.
Rename from edebug-enter-trace.
(edebug-enter): Call it accordingly. Bind edebug-function explicitly.
(edebug--update-coverage): Add `after-index' and `value' args.
Rename from edebug-update-coverage.
(edebug-slow-after): Call it accordingly.
(edebug--recursive-edit): Add arg `arg-mode'. Rename from
edebug-recursive-edit.
(edebug--display): Call it accordingly. Add args `value',
`offset-index', and `arg-mode'. Rename from edebug-display.
(edebug-debugger, edebug): Call it accordingly.
(edebug-eval-display-list): Use dolist.
Paul Eggert [Thu, 13 Sep 2012 01:22:08 +0000 (18:22 -0700)]
Work around GCC and GNOME bugs when --enable-gcc-warnings.
* emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
to work around GNOME bug 683906.
* image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
(struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
This works around GCC bug 54561.
Paul Eggert [Wed, 12 Sep 2012 21:34:24 +0000 (14:34 -0700)]
More fixes for 'volatile' and setjmp/longjmp.
* eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
* image.c (struct png_load_context) [HAVE_PNG]: New type.
(png_load_body) [HAVE_PNG]:
(jpeg_load_body) [HAVE_JPEG]:
New function, with most of the old parent function's body.
(png_load) [HAVE_PNG]:
(jpeg_load) [HAVE_JPEG]:
Invoke the new function, to avoid longjmp munging our locals.
(struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
(my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
longjmp is passed 2, as the C standard doesn't guarantee this.
Instead, store the failure code into mgr->failure_code.
Juri Linkov [Wed, 12 Sep 2012 20:51:46 +0000 (23:51 +0300)]
Use Isearch lax whitespace mode in Info.
http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00811.html
* lisp/info.el (Info-search): Don't check for isearch-mode and
isearch-regexp before let-binding search-spaces-regexp to
Info-search-whitespace-regexp.
(Info-isearch-search): Let-bind Info-search-whitespace-regexp to
search-whitespace-regexp if isearch-lax-whitespace or
isearch-regexp-lax-whitespace is non-nil.
(Info-mode): Don't set local variable search-whitespace-regexp.
Jan Djärv [Wed, 12 Sep 2012 20:21:39 +0000 (22:21 +0200)]
* configure.ac: No --with-x-toolkit given: Try gtk3 toolkit first
and then gtk2 if not found.
--with-x-toolkit=gtk|yes: As above, but fail if gtk2 or gt3 not found.
--with-x-toolkit=gtk2: Only try gtk2, fail if not found.
--with-x-toolkit=gtk3: Only try gtk3, fail if not found.
Stefan Monnier [Wed, 12 Sep 2012 19:16:36 +0000 (15:16 -0400)]
Remove unread-command-char.
* src/keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
(Fdiscard_input, quit_throw_to_read_char, init_keyboard)
(syms_of_keyboard): Remove support for unread-command-char.
* lisp/emacs-lisp/debug.el (debugger-outer-unread-command-char, debug)
(debugger-env-macro): Remove support for unread-command-char.
* lisp/ehelp.el (with-electric-help): Accept functions in
electric-help-form-to-execute.
(electric-help-execute-extended, electric-help-ctrl-x-prefix): Use it.
And replace unread-command-char -> unread-command-events.
* lisp/subr.el (set-temporary-overlay-map): Minimize slightly the impact of
the temporary map re-appearing on emulation-mode-map-alists.
* lisp/emacs-lisp/edebug.el (def-edebug-form-spec): Remove, it's been broken
since 22.1.
Eli Zaretskii [Wed, 12 Sep 2012 19:14:02 +0000 (22:14 +0300)]
Fix silent exit upon assertion violation on MS-Windows.
src/w32proc.c (sys_kill): If PID is our process ID and the signal is
SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
violation. (Bug#12426)
Martin Rudalics [Wed, 12 Sep 2012 15:49:17 +0000 (17:49 +0200)]
Try to keep height of debugger window consistent. (Bug#8789)
* emacs-lisp/debug.el (debugger-previous-window-height): New
variable.
(debug): When debugger-jumping-flag is non-nil try to restore
height of debugger window. (Bug#8789)
Stefan Monnier [Wed, 12 Sep 2012 13:12:48 +0000 (09:12 -0400)]
* lisp/emacs-lisp/edebug.el (edebug-enter): Don't mess with
overriding-local-map and pre/post-command-hook here.
(edebug-recursive-edit): Do it here instead.
(edebug-outside-unread-command-char): Remove all uses of
unread-command-char.
Paul Eggert [Tue, 11 Sep 2012 23:50:28 +0000 (16:50 -0700)]
Avoid _setjmp/_longjmp problems with local nonvolatile variables.
If a nonvolatile local variable is written before a _longjmp to
the frame containing the variable, and is read after the _longjmp,
the value read is indeterminate. Some local variables of type
'struct handler' and 'struct catchtag' are used in this way, so
mark each of their slots as volatile if the slot can be set before
_longjmp and read afterwards.
* lisp.h (struct handler): var and chosen_clause are now volatile.
(struct catchtag): val, next, and pdlcount are now volatile.
Paul Eggert [Tue, 11 Sep 2012 22:59:50 +0000 (15:59 -0700)]
Prefer assignment to memcpy when either will do.
* lib-src/pop.c (socket_connection) [HAVE_GETADDRINFO]:
* src/bidi.c (bidi_push_it, bidi_pop_it):
* src/fns.c (copy_hash_table):
* src/image.c (define_image_type):
* src/keyboard.c (kbd_buffer_store_event_hold):
* src/process.c (Fprocess_send_eof):
* src/xfaces.c (x_create_gc) [HAVE_NS]:
* src/xgselect.c (xg_select):
Use assignment, not memcpy, as either will do here, and assignment is
more likely to catch type errors.
Paul Eggert [Tue, 11 Sep 2012 20:35:23 +0000 (13:35 -0700)]
* alloc.c (discard_killed_buffers): Tune and simplify a bit.
Use pointer-to-a-pointer to simplify and avoid a NILP check each
time an item is removed. No need to mark this function 'inline';
the compiler knows better than we do.
Jan Djärv [Tue, 11 Sep 2012 17:08:02 +0000 (19:08 +0200)]
* nsterm.h: Add delay parameter to updateFrameSize.
* nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
(updateFrameSize:): Add delay parameter to updateFrameSize, send it
to change_frame_size.
(windowDidResize:): Pass YES to updateFrameSize.
Discard killed buffers from deleted window and frame objects.
This reduces an amount of references to killed buffers and
helps GC to reclaim them faster.
* alloc.c (discard_killed_buffers): New function.
(mark_object): Use it for deleted windows and frames.
(mark_object): If symbol's value is set up for a killed buffer
or deleted frame, restore it's global binding.
* data.c (swap_in_global_binding): Add GC notice.
(swap_in_symval_forwarding): Use convenient set_blv_where.
* window.c (wset_next_buffers, wset_prev_buffers): Move ...
* window.h: ... to here.
* Makefile.in (install-arch-dep, install-arch-indep, install-doc):
Be more explicit about dependencies, for parallel `make install'.
It is not so unreasonable to run `make -j# install' from a clean state
for a self-contained NS build, where the "installation" happens within
the build tree.
Convenient macro to check whether the buffer is live.
* buffer.h (BUFFER_LIVE_P): New macro.
* alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
* minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
Paul Eggert [Tue, 11 Sep 2012 02:28:27 +0000 (19:28 -0700)]
Simplify, document, and port floating-point.
The porting part of this patch fixes bugs on non-IEEE platforms
with frexp, ldexp, logb.
* admin/CPP-DEFINES (HAVE_CBRT, HAVE_LOGB, logb): Remove.
* configure.ac (logb, cbrt): Do not check for these functions,
as they are not being used.
* doc/lispref/numbers.texi (Float Basics, Arithmetic Operations, Math Functions):
Document that / and mod (with floating point arguments), along
with asin, acos, log, log10, expt and sqrt, return special values
instead of signaling exceptions.
(Float Basics): Document that logb operates on the absolute value
of its argument.
(Math Functions): Document that (log ARG BASE) also returns NaN if
BASE is negative. Document that (expt X Y) returns NaN if X is a
finite negative number and Y a finite non-integer.
* etc/NEWS: Document NaNs versus signaling-error change.
* src/data.c, src/lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
Now static.
* src/floatfns.c: Simplify discussion of functions that Emacs doesn't
support, by removing commented-out code and briefly listing the
C89 functions excluded. The commented-out stuff was confusing
maintenance, e.g., we thought we needed cbrt but it was commented out.
(logb): Remove decl; no longer needed.
(isfinite): New macro, if not already supplied.
(isnan): Don't replace any existing macro.
(Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
are present on all C89 platforms.
(Ffrexp): Do not special-case zero, as frexp does the right thing
for that case.
(Flogb): Do not use logb, as it doesn't have the desired meaning
on hosts that use non-base-2 floating point. Instead, stick with
frexp, which is C89 anyway. Do not pass an infinity or a NaN to
frexp, to avoid getting an unspecified result.
Paul Eggert [Mon, 10 Sep 2012 01:03:27 +0000 (18:03 -0700)]
Improve robustness of 'make bootstrap'.
Run autogen.sh after bootstrap-clean, to avoid bzr pull issues.
* INSTALL, README: Document autogen.sh.
* Makefile.in (Makefile): Mark it as precious, since it's updated
atomically.
(MAKE_CONFIG_STATUS): New macro.
(config.status, bootstrap): Use it. This causes 'make bootstrap'
to run config.status with the --recheck option, which is more
appropriate for a bootstrap.
(bootstrap): Run autogen.sh right after cleaning. Don't worry
about failures due to missing tools.
* autogen.sh: Exit with status 101 when failing due to missing tools.
* make-dist: Distribute autogen.sh.
Juri Linkov [Sun, 9 Sep 2012 22:15:24 +0000 (01:15 +0300)]
* lisp/replace.el (replace-regexp-lax-whitespace): New defcustom.
(replace-lax-whitespace, query-replace-regexp)
(query-replace-regexp-eval, replace-regexp): Doc fix.
(perform-replace, replace-highlight): Let-bind
isearch-lax-whitespace to replace-lax-whitespace and
isearch-regexp-lax-whitespace to replace-regexp-lax-whitespace.
* lisp/isearch.el (isearch-query-replace): Let-bind
replace-lax-whitespace to isearch-lax-whitespace and
replace-regexp-lax-whitespace to
isearch-regexp-lax-whitespace.