bpt/emacs.git
11 years agoFix wrong overhang display for gstring compositions (Bug#12364).
YAMAMOTO Mitsuharu [Tue, 11 Sep 2012 03:32:41 +0000 (12:32 +0900)]
Fix wrong overhang display for gstring compositions (Bug#12364).

* xdisp.c (right_overwritten, right_overwriting): Also handle gstring
composition cases (Bug#12364).

* xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
overhang of succeeding glyphs overlapping box cursor.

* w32term.c (x_draw_glyph_string): Likewise.

11 years agoSimplify, document, and port floating-point.
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.

11 years ago* xdisp.c (Qinhibit_debug_on_message): Now static.
Paul Eggert [Tue, 11 Sep 2012 01:20:56 +0000 (18:20 -0700)]
* xdisp.c (Qinhibit_debug_on_message): Now static.

11 years ago* nsterm.m (ns_update_begin): Set clip path to whole view by using
Jan Djärv [Mon, 10 Sep 2012 21:01:45 +0000 (23:01 +0200)]
* nsterm.m (ns_update_begin): Set clip path to whole view by using
NSBezierPath.

Fixes: debbugs:12131

11 years ago* progmodes/sql.el: Version 3.1
Michael Mauger [Mon, 10 Sep 2012 19:22:53 +0000 (15:22 -0400)]
* progmodes/sql.el: Version 3.1
(sql-db2-escape-newlines): New variable.
(sql-escape-newlines-filter): Use it.

11 years agolisp/custom.el (custom-theme-load-confirm): Remove unneeded assignment.
Juanma Barranquero [Mon, 10 Sep 2012 15:52:15 +0000 (17:52 +0200)]
lisp/custom.el (custom-theme-load-confirm): Remove unneeded assignment.

11 years ago* vc/diff-mode.el (diff-mode-menu): diff-remove-trailing-whitespace.
Dan Nicolaescu [Mon, 10 Sep 2012 14:40:13 +0000 (10:40 -0400)]
* vc/diff-mode.el (diff-mode-menu): diff-remove-trailing-whitespace.

11 years agoMention diff-remove-trailing-whitespace.
Dan Nicolaescu [Mon, 10 Sep 2012 14:33:08 +0000 (10:33 -0400)]
Mention diff-remove-trailing-whitespace.

11 years agont/config.nt: Sync with autogen/config.in.
Juanma Barranquero [Mon, 10 Sep 2012 13:37:53 +0000 (09:37 -0400)]
nt/config.nt: Sync with autogen/config.in.
(FLOAT_CHECK_DOMAIN, HAVE_FMOD, HAVE_FREXP)
(HAVE_INVERSE_HYPERBOLIC, NO_MATHERR): Remove.

11 years agoAuto-commit of generated files.
Glenn Morris [Mon, 10 Sep 2012 10:18:11 +0000 (06:18 -0400)]
Auto-commit of generated files.

11 years ago* fns.c (Fdelq, Fdelete): Doc fix.
Chong Yidong [Mon, 10 Sep 2012 03:25:10 +0000 (11:25 +0800)]
* fns.c (Fdelq, Fdelete): Doc fix.

11 years agoParenthesize macro bodies.
Paul Eggert [Mon, 10 Sep 2012 01:17:23 +0000 (18:17 -0700)]
Parenthesize macro bodies.

* lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
(XSETFLOAT, XSETMISC): Parenthesize.

11 years agoNew emacs-lisp-byte-code-mode; misc minor changes.
Stefan Monnier [Mon, 10 Sep 2012 01:16:13 +0000 (21:16 -0400)]
New emacs-lisp-byte-code-mode; misc minor changes.
* lisp/emacs-lisp/lisp-mode.el (emacs-list-byte-code-comment-re): New var.
(emacs-lisp-byte-code-comment)
(emacs-lisp-byte-code-syntax-propertize, emacs-lisp-byte-code-mode):
New functions.
(eval-sexp-add-defvars): Don't skip defvars in column >0.
(eval-defun-2): Remove bogus interactive spec.
(lisp-indent-line): Remove redundant whole-exp code, now done in
indent-according-to-mode.
(save-match-data): Remove redundant indent data.
* lisp/emacs-lisp/benchmark.el (benchmark-run, benchmark-run-compiled):
Use `declare'.
* lisp/gnus/qp.el (quoted-printable-decode-region):
Inline+CSE+strength-reduction.

11 years agoImprove robustness of 'make bootstrap'.
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.

Fixes: debbugs:12376

11 years ago* lisp/replace.el (replace-regexp-lax-whitespace): New defcustom.
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.

Fixes: debbugs:10885

11 years ago* src/lisp.h (make_lisp_ptr): New macro to replace XSET.
Stefan Monnier [Sun, 9 Sep 2012 21:24:04 +0000 (17:24 -0400)]
* src/lisp.h (make_lisp_ptr): New macro to replace XSET.
(XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
Use it.

11 years ago* lisp/eshell/em-unix.el (eshell/sudo): Explicitly drop return value.
Stefan Monnier [Sun, 9 Sep 2012 21:11:14 +0000 (17:11 -0400)]
* lisp/eshell/em-unix.el (eshell/sudo): Explicitly drop return value.

11 years agoAvoid leaving traces of cursor when entering linum-mode.
Eli Zaretskii [Sun, 9 Sep 2012 20:10:36 +0000 (23:10 +0300)]
Avoid leaving traces of cursor when entering linum-mode.

 src/fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
 left fringe if the window has a left margin.  This avoids leaving
 traces of the cursor because its leftmost pixel is not drawn over.

11 years agoFix bug #12277 with incomplete redisplay of the vertical border between windows.
Eli Zaretskii [Sun, 9 Sep 2012 17:59:50 +0000 (20:59 +0300)]
Fix bug #12277 with incomplete redisplay of the vertical border between windows.

 src/dispnew.c (update_window_line): When the left margin area of a
 screen line is updated, set the redraw_fringe_bitmaps_p flag of
 that screen line.

11 years agoAssume C89 or later for math functions.
Paul Eggert [Sun, 9 Sep 2012 16:06:33 +0000 (09:06 -0700)]
Assume C89 or later for math functions.

This simplifies the code, and makes it a bit smaller and faster,
and (most important) makes it easier to clean up signal handling
since we can stop worring about floating-point exceptions in
library code.  That was a problem before C89, but the problem
went away many years ago on all practical Emacs targets.
* configure.ac (frexp, fmod): Remove checks for these functions,
as we now assume them.
(FLOAT_CHECK_DOMAIN, HAVE_INVERSE_HYPERBOLIC, NO_MATHERR)
(HAVE_EXCEPTION):
Remove; no longer needed.
* admin/CPP-DEFINES (HAVE_FMOD, HAVE_FREXP, FLOAT_CHECK_DOMAIN)
(HAVE_INVERSE_HYPERBOLIC, NO_MATHERR): Remove.
* src/data.c, src/image.c, src/lread.c, src/print.c:
Don't include <math.h>; no longer needed.
* src/data.c, src/floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
might be autoconfigured, as that never happens.
* src/data.c (fmod):
* src/doprnt.c (DBL_MAX_10_EXP):
* src/print.c (DBL_DIG):
Remove.  C89 or later always defines these.
* src/floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
(in_float, float_error_arg, float_error_arg2, float_error_fn_name)
(arith_error, domain_error, domain_error2):
Remove all this pre-C89 cruft.  Do not include <errno.h> as that's
no longer needed -- we simply return what C returns.  All uses removed.
(IN_FLOAT, IN_FLOAT2): Remove.  All uses replaced with
the wrapped code.
(FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
Remove.  All uses expanded, as these macros are no longer used
more than once and are now more trouble than they're worth.
(Ftan): Use tan, not sin / cos.
(Flogb): Assume C89 frexp.
(fmod_float): Assume C89 fmod.
(matherr) [HAVE_MATHERR]: Remove; no longer needed.
(init_floatfns): Remove.  All uses removed.

11 years agoCorrect the handling of two c-state-cache state variables.
Alan Mackenzie [Sun, 9 Sep 2012 11:03:37 +0000 (11:03 +0000)]
Correct the handling of two c-state-cache state variables.
cc-engine.el (c-state-cache-init): Initialise
c-state-semi-nonlit-pos-cache\(-limit\)? properly.
(c-record-parse-state-state): record
c-state-semi-nonlit-pos-cache\(-limit\)?.

11 years agoRemove debug prints
Jan Djärv [Sun, 9 Sep 2012 08:44:22 +0000 (10:44 +0200)]
Remove debug prints

11 years ago* lisp/register.el (register-separator): Rename from
Andreas Schwab [Sun, 9 Sep 2012 08:10:56 +0000 (10:10 +0200)]
* lisp/register.el (register-separator): Rename from
separator-register.  All uses changed.  Doc fix.
(register): Fix version.

11 years agoClarify descriptions of delq and delete in Lisp manual.
Chong Yidong [Sun, 9 Sep 2012 07:50:45 +0000 (15:50 +0800)]
Clarify descriptions of delq and delete in Lisp manual.

* doc/lispref/lists.texi (Sets And Lists): Explain that the return value for
delete should be used, like for delq.

11 years ago* minibuf.texi: Fix last change.
Chong Yidong [Sun, 9 Sep 2012 07:09:03 +0000 (15:09 +0800)]
* minibuf.texi: Fix last change.

11 years agoAllow scrolling in y-or-n-p.
Chong Yidong [Sun, 9 Sep 2012 06:43:47 +0000 (14:43 +0800)]
Allow scrolling in y-or-n-p.

* lisp/replace.el (query-replace-map): Bind four new symbols for
requesting window scrolling.

* lisp/subr.el (y-or-n-p): Handle the window-scrolling bindings in
query-replace-map.

* lisp/custom.el (custom-theme-load-confirm): Use y-or-n-p.

* lisp/window.el (scroll-other-window-down): Make the arg optional.

* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Don't bind scrolling keys
since they are now in query-replace-map.

* doc/lispref/minibuf.texi (Yes-or-No Queries): Document recentering and
scrolling in y-or-n-p.  Remove gratuitous example.

* doc/lispref/searching.texi (Search and Replace): Document window scrolling
entries in query-replace-map.

Fixes: debbugs:8948

11 years agoUse quit-window for quitting the *Local Variables* buffer.
Chong Yidong [Sun, 9 Sep 2012 05:50:43 +0000 (13:50 +0800)]
Use quit-window for quitting the *Local Variables* buffer.

* lisp/files.el (hack-local-variables-confirm): Use quit-window to kill
the *Local Variables* buffer.

11 years ago* lisp/progmodes/ruby-mode.el (ruby-toggle-block): Guess the current block,
Dmitry Gutov [Sat, 8 Sep 2012 23:32:25 +0000 (03:32 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-toggle-block): Guess the current block,
not just expect to be at its beginning.  Adjust callees.
Succeed when do-end block has no space before the pipe character.
(ruby-brace-to-do-end): When the original block is one-liner,
convert to multiline.  Reindent the result.

* test/automated/ruby-mode-tests.el:
(ruby-toggle-block-to-multiline): New test.
(ruby-should-indent-buffer, ruby-toggle-block-to-do-end)
(ruby-toggle-block-to-brace): Use buffer-string.

11 years ago* nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
Jan Djärv [Sat, 8 Sep 2012 20:16:39 +0000 (22:16 +0200)]
* nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
compositeToPoint for OSX < 10.6.

Fixes: debbugs:12390

11 years ago* lisp/register.el (increment-register): Route it to `append-to-register',
Jambunathan K [Sat, 8 Sep 2012 20:09:06 +0000 (16:09 -0400)]
* lisp/register.el (increment-register): Route it to `append-to-register',
if register contains text so that `C-x r +' can now be
used for appending to a text register.
(register): New group.
(register-separator): New user option.
(append-to-register, prepend-to-register): Add separator based on
`register-separator.
* doc/emacs/regs.texi (Text Registers): `C-x r +' can now be used instead of
M-x append-to-register.  New option `register-separator'.
(Number Registers): Mention that `C-x r +' is polymorphic.

Fixes: debbugs:12217

11 years agoAWK Mode: make auto-newline work when there's "==" in the pattern.
Alan Mackenzie [Sat, 8 Sep 2012 20:00:13 +0000 (20:00 +0000)]
AWK Mode: make auto-newline work when there's "==" in the pattern.
cc-cmds.el (c-point-syntax): Handle virtual semicolons correctly.
cc-engine.el (c-guess-basic-syntax CASE 5A.3): Test more rigorously for
"=" token.

11 years ago* floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
Paul Eggert [Sat, 8 Sep 2012 19:57:32 +0000 (12:57 -0700)]
* floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).

This produces more-accurate results.

11 years ago* nsterm.m (updateFrameSize): Call setFrame: on the view when size
Jan Djärv [Sat, 8 Sep 2012 17:22:15 +0000 (19:22 +0200)]
* nsterm.m (updateFrameSize): Call setFrame: on the view when size
changes.

Fixes: debbugs:12088

11 years ago* progmodes/ruby-mode.el (ruby-match-expression-expansion): Shorten
Dmitry Gutov [Sat, 8 Sep 2012 15:34:41 +0000 (19:34 +0400)]
* progmodes/ruby-mode.el (ruby-match-expression-expansion): Shorten
  previous change.

11 years ago* lisp/progmodes/ruby-mode.el (ruby-match-expression-expansion): Only
Dmitry Gutov [Sat, 8 Sep 2012 15:13:14 +0000 (19:13 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-match-expression-expansion): Only
fail when reached LIMIT.

11 years agoDon't bind M-= in Dired.
Chong Yidong [Sat, 8 Sep 2012 14:48:26 +0000 (22:48 +0800)]
Don't bind M-= in Dired.

* lisp/dired.el (dired-mode-map): Don't bind M-=.

* lisp/dired-aux.el (dired-diff): Use backup file as default.

11 years ago* subr.el (add-to-history): Fix delete usage.
Drew Adams [Sat, 8 Sep 2012 14:30:09 +0000 (22:30 +0800)]
* subr.el (add-to-history): Fix delete usage.

Fixes: debbugs:12314

11 years agoIntroduce "raw syntax descriptor" terminology, and use it.
Chong Yidong [Sat, 8 Sep 2012 14:23:01 +0000 (22:23 +0800)]
Introduce "raw syntax descriptor" terminology, and use it.

* syntax.texi (Syntax Table Internals): Define "raw syntax
descriptor" terminology.
(Syntax Descriptors): Mention raw syntax descriptors.

* lisp/subr.el (syntax-after, syntax-class): Doc fix.

* syntax.c (Fstring_to_syntax): Doc fix.

Fixes: debbugs:12383

11 years agoFix handling of debugger window. (Bug#8789)
Martin Rudalics [Sat, 8 Sep 2012 13:28:11 +0000 (15:28 +0200)]
Fix handling of debugger window.  (Bug#8789)

* window.el (display-buffer-in-previous-window): New buffer
display action function.

* emacs-lisp/debug.el (debugger-bury-or-kill): New option.
(debugger-previous-window): New variable.
(debug): Rewrite using display-buffer-in-previous-window,
quit-restore-window and debugger-bury-or-kill.  (Bug#8789)

11 years ago* nsterm.h (EmacsView): Add updateFrameSize.
Jan Djärv [Sat, 8 Sep 2012 12:48:33 +0000 (14:48 +0200)]
* nsterm.h (EmacsView): Add updateFrameSize.

* nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
in the internal border.
(x_set_window_size): Remove static variables and their usage.
(ns_redraw_scroll_bars): Fix NSTRACE arg.
(ns_after_update_window_line, ns_draw_fringe_bitmap): Remove
fringe/internal border adjustment.
(ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
(ns_draw_window_cursor): Remove fringe/internal border adjustment.
(ns_fix_rect_ibw): Remove.
(ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
(ns_dumpglyphs_box_or_relief): Ditto.
(ns_maybe_dumpglyphs_background): Remove fringe/internal border
adjustment.
(ns_dumpglyphs_image): Ditto.
(ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
border adjustment.
(ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
their usage.  Add fringe_extended_p and its use as in other terms.
(ns_judge_scroll_bars): Code style fix.  Call updateFrameSize if
scroll bar was removed.
(updateFrameSize): New function.
(windowDidResize): Move code to updateFrameSize and call it.

Fixes: debbugs:11052

11 years agoFix setting of environment variables by nt/configure.bat.
Eli Zaretskii [Sat, 8 Sep 2012 11:20:32 +0000 (14:20 +0300)]
Fix setting of environment variables by nt/configure.bat.

 nt/configure.bat <use_extensions>: Don't leave it set in the
 environment when the script exits.

11 years ago* lisp/emacs-lisp/byte-run.el (defun): Tweak message. Simplify code.
Stefan Monnier [Fri, 7 Sep 2012 20:14:55 +0000 (16:14 -0400)]
* lisp/emacs-lisp/byte-run.el (defun): Tweak message.  Simplify code.

11 years ago* progmodes/python.el (python-shell-send-string): When
Matt McClure [Fri, 7 Sep 2012 14:53:15 +0000 (16:53 +0200)]
* progmodes/python.el (python-shell-send-string): When
default-directory is remote, create temp file on remote
filesystem.
(python-shell-send-file): When file is remote, pass local view of
file paths to remote Python interpreter.  (Bug#12340)

11 years ago* src/textprop.c (Fget_text_property): Minor doc fix.
Chong Yidong [Fri, 7 Sep 2012 14:45:28 +0000 (22:45 +0800)]
* src/textprop.c (Fget_text_property): Minor doc fix.

Fixes: debbugs:12323

11 years agoFix doc of local-variable-if-set-p.
Chong Yidong [Fri, 7 Sep 2012 14:15:59 +0000 (22:15 +0800)]
Fix doc of local-variable-if-set-p.

* doc/lispref/variables.texi (Creating Buffer-Local): Fix description of
local-variable-if-set-p.

* src/data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).

11 years agoMinor doc fix for switch-to-buffer.
Chong Yidong [Fri, 7 Sep 2012 13:53:21 +0000 (21:53 +0800)]
Minor doc fix for switch-to-buffer.

* doc/lispref/windows.texi (Display Action Functions)
(Choosing Window Options): Remove obsolete variable
display-buffer-reuse-frames.
(Switching Buffers): Minor doc tweak for switch-to-buffer.

* lisp/window.el (switch-to-buffer): Doc fix.

Fixes: debbugs:12181

11 years agont/config.nt: Sync with autogen/config.in.
Juanma Barranquero [Fri, 7 Sep 2012 12:15:08 +0000 (14:15 +0200)]
nt/config.nt: Sync with autogen/config.in.
(NO_ABORT, SIGNAL_H_AHB): Remove.

11 years agoFix handling of require-final-newline in after-find-file.
Chong Yidong [Fri, 7 Sep 2012 10:53:29 +0000 (18:53 +0800)]
Fix handling of require-final-newline in after-find-file.

* files.el (after-find-file): Don't fail on a read-only buffer if
require-final-newline is `visit' or `visit-save'.

Fixes: debbugs:11156

11 years ago* doc/lispref/eval.texi (Intro Eval): Add index entry for sexp.
Chong Yidong [Fri, 7 Sep 2012 10:36:39 +0000 (18:36 +0800)]
* doc/lispref/eval.texi (Intro Eval): Add index entry for sexp.

Fixes: debbugs:12233

11 years agoRemove obsolete display-buffer-reuse-frames from manuals.
Chong Yidong [Fri, 7 Sep 2012 10:27:11 +0000 (18:27 +0800)]
Remove obsolete display-buffer-reuse-frames from manuals.

* doc/emacs/windows.texi (Window Choice): Don't mention obsolete
display-buffer-reuse-frames.

* doc/lispref/windows.texi (Display Action Functions)
(Choosing Window Options): Remove obsolete variable
display-buffer-reuse-frames.

11 years agoLet ESC ESC quit in read-char-choice, and use it in userlock.el.
Chong Yidong [Fri, 7 Sep 2012 10:19:58 +0000 (18:19 +0800)]
Let ESC ESC quit in read-char-choice, and use it in userlock.el.

* lisp/subr.el (read-char-choice): Allow quitting via ESC ESC.

* lisp/userlock.el (ask-user-about-supersession-threat): Use
read-char-choice.

Fixes: debbugs:12093

11 years agoAuto-commit of generated files.
Glenn Morris [Fri, 7 Sep 2012 10:17:37 +0000 (06:17 -0400)]
Auto-commit of generated files.

11 years agoAdd a utility function buffer-narrowed-p, and use it.
Chong Yidong [Fri, 7 Sep 2012 08:58:31 +0000 (16:58 +0800)]
Add a utility function buffer-narrowed-p, and use it.

* lisp/subr.el (buffer-narrowed-p): New function.

* lisp/ses.el (ses-widen):
* lisp/simple.el (count-words--buffer-message):
* lisp/net/browse-url.el (browse-url-of-buffer): Use it

* lisp/simple.el (count-words-region): Don't signal an error if there
is a non-nil prefix arg and the mark is not set.

* doc/lispref/positions.texi (Narrowing): Document buffer-narrowed-p.

11 years ago* emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
Paul Eggert [Fri, 7 Sep 2012 08:55:03 +0000 (01:55 -0700)]
* emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.

Problem introduced when merging patches.  Noted by Eli Zaretskii in
<http://bugs.gnu.org/12327#67>.

11 years agoMore signal-handler cleanup.
Paul Eggert [Fri, 7 Sep 2012 08:46:44 +0000 (01:46 -0700)]
More signal-handler cleanup.

* configure.ac (FLOAT_CHECK_DOMAIN): Comment fix (Bug#12327).
* src/floatfns.c: Comment fix.
* src/lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
and anyway the declaration is harmless even if SIGDANGER is not defined.
* src/syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
defined BROKEN_FIONREAD).  systty.h formerly did this, but other
source files not surprisingly expected syssignal.h to define, or
not define, SIGIO, and it's cleaner to do it that way, for consistency.
Include <sys/ioctl.h>, for FIONREAD.
* src/systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
This eliminates a problem whereby other files mysteriously had
to include "syssignal.h" before including "systty.h" if they
wanted to use "#ifdef SIGIO".

11 years ago* lisp/simple.el (count-words--buffer-message): Fix narrowing check.
Chong Yidong [Fri, 7 Sep 2012 08:36:25 +0000 (16:36 +0800)]
* lisp/simple.el (count-words--buffer-message): Fix narrowing check.

11 years agoMS-Windows followup for 2012-09-07T01:27:44Z!eggert@cs.ucla.edu, signal-handler cleanup.
Eli Zaretskii [Fri, 7 Sep 2012 08:20:07 +0000 (11:20 +0300)]
MS-Windows followup for 2012-09-07T01:27:44Z!eggert@cs.ucla.edu, signal-handler cleanup.

 src/w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
 src/w32.c (sigemptyset): Empty the set.
 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.

 nt/inc/ms-w32.h (struct sigaction): Declare sa_handler __cdecl.

Fixes: debbugs:12327

11 years agoFix compilation failure under ENABLE_CHECKING.
Eli Zaretskii [Fri, 7 Sep 2012 07:24:08 +0000 (10:24 +0300)]
Fix compilation failure under ENABLE_CHECKING.

 src/alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.

Fixes: debbugs:12327

11 years ago* alloc.c (mark_buffer): Revert unsafe marking optimization.
Dmitry Antipov [Fri, 7 Sep 2012 07:05:56 +0000 (11:05 +0400)]
* alloc.c (mark_buffer): Revert unsafe marking optimization.
(mark_object): Likewise for frame objects.

11 years ago* syssignal.h (handle_on_main_thread): Always declare,
Paul Eggert [Fri, 7 Sep 2012 06:47:30 +0000 (23:47 -0700)]
* syssignal.h (handle_on_main_thread): Always declare,

even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
This ports to platforms without HAVE_PTHREAD.

11 years ago* lisp/progmodes/ruby-mode.el
Dmitry Gutov [Fri, 7 Sep 2012 05:06:05 +0000 (09:06 +0400)]
* lisp/progmodes/ruby-mode.el
(ruby-beginning-of-defun): Only consider 3 keywords defun beginners.
(ruby-end-of-defun): Expect that the point is at the beginning of
the defun.

11 years agoFix for invoking C-h c from the minibuffer.
Chong Yidong [Fri, 7 Sep 2012 05:00:32 +0000 (13:00 +0800)]
Fix for invoking C-h c from the minibuffer.

* help.el (describe-key-briefly): Allow the message to be seen
when invoked from the minibuffer.

Fixes: debbugs:7014

11 years agoAdd a couple of xrefs to the Lisp manual.
Chong Yidong [Fri, 7 Sep 2012 04:51:26 +0000 (12:51 +0800)]
Add a couple of xrefs to the Lisp manual.

* markers.texi (Moving Markers): Add xref to Point.

* syntax.texi (Low-Level Parsing): Add xref to Parser State.

Fixes: debbugs:12269

11 years ago* lisp/progmodes/ruby-mode.el (ruby-end-of-defun)
Dmitry Gutov [Fri, 7 Sep 2012 04:36:20 +0000 (08:36 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-end-of-defun)
(ruby-beginning-of-defun): Simplify, allow indentation before
block beginning and end keywords.  Also, fix accidental change in the former.

11 years ago* lisp/progmodes/ruby-mode.el (ruby-indent-beg-re): Add pieces from
Dmitry Gutov [Fri, 7 Sep 2012 04:15:56 +0000 (08:15 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-indent-beg-re): Add pieces from
ruby-beginning-of-indent, simplify, allow all keywords to have
indentation before them.
(ruby-beginning-of-indent): Adjust for above.  Search until the
found point is not inside a string or comment.
(ruby-font-lock-keywords): Allow symbols to start with "@"
character, give them higher priority than variables.
(ruby-syntax-propertize-function)
(ruby-font-lock-syntactic-keywords): Remove the "not comments"
matchers.  Expression expansions are not comments when inside a
string, and there comment syntax status is irrelevant.
(ruby-match-expression-expansion): New function.  Check that
expression expansion is inside a string, and it's not escaped.
(ruby-font-lock-keywords): Use it.

* test/automated/ruby-mode-tests.el: New tests (Bug#11613).

11 years agoPartially revert last Gnus merge.
Chong Yidong [Fri, 7 Sep 2012 04:07:00 +0000 (12:07 +0800)]
Partially revert last Gnus merge.

The add-face function has been added gnus-compat.el, but is not in
Emacs; this leaves Gnus in an unusable state.

* lisp/gnus/gnus-salt.el (gnus-tree-highlight-node):
* lisp/gnus/gnus-sum.el (gnus-summary-highlight-line):
* lisp/gnus/gnus-group.el (gnus-group-highlight-line): Revert use of add-face.

* lisp/gnus/gnus-util.el (gnus-put-text-property-excluding-characters-with-faces): Restore.

11 years agoSignal-handler cleanup.
Paul Eggert [Fri, 7 Sep 2012 01:27:44 +0000 (18:27 -0700)]
Signal-handler cleanup.

Emacs's signal handlers were written in the old 4.2BSD style with
sigblock and sigmask and so forth, and this led to some
inefficiencies and confusion.  Rewrite these to use
pthread_sigmask etc. without copying signal sets around.  Also,
get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
'signal', and instead use functions that do not attempt to take
over the system name space.  This patch causes Emacs's text
segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
* configure.ac (PTY_OPEN, PTY_TTY_NAME_SPRINTF):
Adjust to syssignal.h changes.
(SIGNAL_H_AB): Remove; no longer needed.
* src/alloc.c, src/emacsgtkfixed.c, src/nsfns.m, src/widget.c, src/xmenu.c:
Do not include <signal.h> or "syssignal.h", as these
modules do not use signals.
* src/atimer.c, src/callproc.c, src/data.c, src/dispnew.c, src/emacs.c:
* src/floatfns.c, src/gtkutil.c, src/keyboard.c, src/process.c, src/sound.c:
* src/sysdep.c, src/term.c, src/xterm.c:
Do not include <signal.h>, as "syssignal.h" does that for us now.
* src/atimer.c (sigmask_atimers): New function.
(block_atimers, unblock_atimers): New functions,
replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
All uses replaced.
* src/conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
no longer needed here.
* src/emacs.c (main): Inspect existing signal handler with sigaction,
so that there's no need to block and unblock SIGHUP.
* src/sysdep.c (struct save_signal): New member 'action', replacing
old member 'handler'.
(save_signal_handlers, restore_signal_handlers):
Use sigaction instead of 'signal' to save and restore.
(get_set_sighandler, set_sighandler) [!WINDOWSNT]:
New function.  All users of 'signal' modified to use set_sighandler
if they're writeonly, and to use sys_signal if they're read+write.
(emacs_sigaction_init, forwarded_signal): New functions.
(sys_signal): Remove.  All uses replaced by calls to sigaction
and emacs_sigaction_init, or by direct calls to 'signal'.
(sys_sigmask) [!__GNUC__]: Remove; no longer needed.
(sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
all uses replaced by pthread_sigmask etc. calls.
* src/syssignal.h: Include <signal.h>.
(emacs_sigaction_init, forwarded_signal): New decls.
(SIGMASKTYPE): Remove.  All uses replaced by its definiens, sigset_t.
(SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
(sigmask, sys_sigmask): Remove; no longer needed.
(sigpause): Remove.  All uses replaced by its definiens, sigsuspend.
(sigblock, sigunblock, sigfree):
(sigsetmask) [!defined sigsetmask]:
Remove.  All uses replaced by pthread_sigmask.
(signal): Remove.  Its remaining uses (with SIG_DFL and SIG_IGN)
no longer need to be replaced, and its typical old uses
are now done via emacs_sigaction_init and sigaction.
(sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
(sys_sigdel): Remove; unused.
(NSIG): Remove a FIXME; the code's fine.  Remove an unnecessary ifdef.

Fixes: debbugs:12327

11 years agoMisc changes made in Gnus master
Gnus developers [Thu, 6 Sep 2012 22:13:45 +0000 (22:13 +0000)]
Misc changes made in Gnus master

Use combining faces for highlighting.
Change ephemeral Gnus group names to be prettier.
gnus-util.el: Fix compilation error on XEmacs 21.4.

11 years agoFix bug #12327 with SIGCHLD handling on Windows and some other systems.
Eli Zaretskii [Thu, 6 Sep 2012 16:42:48 +0000 (19:42 +0300)]
Fix bug #12327 with SIGCHLD handling on Windows and some other systems.

 src/process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
 SIGCHLD handling on systems that don't have WNOHANG.

11 years ago* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Understand _ on &key args.
Stefan Monnier [Thu, 6 Sep 2012 15:35:08 +0000 (11:35 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Understand _ on &key args.
(cl--make-usage-args): Strip _ from argument names.

Fixes: debbugs:12367

11 years agoRemove references to obsolete variable speedbar-key-map.
Chong Yidong [Thu, 6 Sep 2012 09:38:56 +0000 (17:38 +0800)]
Remove references to obsolete variable speedbar-key-map.

* speedbar.el (speedbar-update-flag, speedbar-mode): Remove
references to obsolete variable speedbar-key-map.

11 years agoFix use of obsolete variables in vhdl-mode.el.
Rüdiger Sonderfeld [Thu, 6 Sep 2012 09:36:40 +0000 (17:36 +0800)]
Fix use of obsolete variables in vhdl-mode.el.

* progmodes/vhdl-mode.el (vhdl-speedbar-initialize): Don't use
obsolete alias speedbar-key-map.
(vhdl-doc-variable, vhdl-doc-mode): Use called-interactively-p.
(vhdl-index-menu-init): Don't use obsolete variable font-lock-maximum-size.

11 years ago* frame.el (window-system-version): Mark as obsolete.
Chong Yidong [Thu, 6 Sep 2012 09:29:32 +0000 (17:29 +0800)]
* frame.el (window-system-version): Mark as obsolete.

See http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00412.html

11 years agoExplicitly mark buffer_defaults and buffer_local_symbols.
Dmitry Antipov [Thu, 6 Sep 2012 09:15:44 +0000 (13:15 +0400)]
Explicitly mark buffer_defaults and buffer_local_symbols.
* alloc.c (Fgarbage_collect): Mark buffer_defaults and
mark_local_symbols here.
(mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
since special buffers aren't marked here any more.
(allocate_buffer): Chain new buffer with all_buffers here...
* buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
not here.
(Vbuffer_defaults, Vbuffer_local_symbols): Remove.
(syms_of_buffer): Remove staticpro of the above.
(init_buffer_once): Set names for buffer_defaults and
buffer_local_symbols.

11 years ago* lisp/replace.el (replace-lax-whitespace): New defcustom.
Juri Linkov [Thu, 6 Sep 2012 08:49:40 +0000 (11:49 +0300)]
* lisp/replace.el (replace-lax-whitespace): New defcustom.
(query-replace, query-replace-regexp, query-replace-regexp-eval)
(replace-string, replace-regexp): Mention it in docstrings.
(perform-replace, replace-highlight): Let-bind
isearch-lax-whitespace and isearch-regexp-lax-whitespace according
to the values of replace-lax-whitespace and regexp-flag.
Don't let-bind search-whitespace-regexp.

* lisp/isearch.el (isearch-query-replace): Let-bind
replace-lax-whitespace instead of let-binding
replace-search-function and replace-re-search-function.
(isearch-lazy-highlight-search): Let-bind isearch-lax-whitespace
and isearch-regexp-lax-whitespace to lazy-highlight variables.
(isearch-toggle-symbol): Set isearch-regexp to nil
in isearch-word mode (like in isearch-toggle-word).

Fixes: debbugs:10885

11 years agoUse `isearch-search-fun' in `perform-replace' (bug#10885, bug#10887).
Juri Linkov [Thu, 6 Sep 2012 08:33:17 +0000 (11:33 +0300)]
Use `isearch-search-fun' in `perform-replace' (bug#10885, bug#10887).

* lisp/replace.el (replace-search-function)
(replace-re-search-function): Set default values to nil.
(perform-replace): Let-bind isearch-related variables based on
replace-related values, call `isearch-search-fun' and let-bind
the result to `search-function'.  Remove code that sets
`search-function' and `search-string' separately for
`delimited-flag'.
(replace-highlight): Add new argument `delimited-flag' and
rename other arguments to the names used in `perform-replace'.
Let-bind `isearch-word' to the argument `delimited-flag'.

11 years agoUse bool for booleans in font-related modules.
Paul Eggert [Thu, 6 Sep 2012 08:04:49 +0000 (01:04 -0700)]
Use bool for booleans in font-related modules.

* font.c (font_intern_prop, font_style_to_value)
(font_style_symbolic, font_parse_xlfd, font_parse_fcname)
(generate_otf_features, font_check_otf_features, font_check_otf)
(font_match_p, font_list_entities, font_at):
* fontset.c (fontset_id_valid_p, reorder_font_vector
(fontset_find_font, Fset_fontset_font)
(face_suitable_for_char_p) [0]:
* ftfont.c (fc_initialized, ftfont_get_open_type_spec)
(ftfont_open, ftfont_text_extents, ftfont_check_otf):
(m17n_flt_initialized, ftfont_shape_by_flt):
* ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
* nsfont.m (nsfont_draw):
* w32font.c (w32font_draw):
* w32term.c (x_draw_glyphless_glyph_string_foreground):
Use bool for booleans.
* font.h: Adjust to above API changes.
(struct font, struct font_driver, struct font_driver_list):
Use bool for booleans.
(struct font): Remove useless member encoding_type.
All users removed.
* fontset.c, xftfont.c: Omit unnecessary static decls.

11 years ago* alloc.c (mark_object): Revert window marking code
Dmitry Antipov [Thu, 6 Sep 2012 07:10:25 +0000 (11:10 +0400)]
* alloc.c (mark_object): Revert window marking code
since it's unsafe for the Fset_window_configuration.

11 years ago[Gnus] XEmacs 21.5 compilation fix
Katsumi Yamaoka [Thu, 6 Sep 2012 02:20:21 +0000 (02:20 +0000)]
[Gnus] XEmacs 21.5 compilation fix

* gnus-score.el (gnus-score-decode-text-parts): Use #' for
  mm-text-parts used in labels macro to make it work with XEmacs 21.5.
* gnus-util.el (gnus-string-prefix-p): New function, an alias to
  string-prefix-p in Emacs >=23.2.
* nnmaildir.el (nnmaildir--ensure-suffix, nnmaildir--add-flag)
  (nnmaildir--remove-flag, nnmaildir--scan): Use gnus-string-match-p
  instead of string-match-p.
  (nnmaildir--scan): Use gnus-string-prefix-p instead of string-prefix-p.

11 years agomerge trunk
Kenichi Handa [Thu, 6 Sep 2012 01:49:15 +0000 (10:49 +0900)]
merge trunk

11 years agoqp.el (quoted-printable-decode-region): Fix previous change; handle lowercase a..f.
Kenichi Handa [Thu, 6 Sep 2012 01:45:33 +0000 (10:45 +0900)]
qp.el (quoted-printable-decode-region): Fix previous change; handle lowercase a..f.

11 years agoMerge changes made in Gnus master
Gnus developers [Wed, 5 Sep 2012 22:45:43 +0000 (22:45 +0000)]
Merge changes made in Gnus master

2012-09-05  Magnus Henoch  <magnus.henoch@gmail.com>
* nnmaildir.el (nnmaildir--article-set-flags): Fix compilation error.

2012-09-05  Martin Stjernholm  <mast@lysator.liu.se>
* gnus-demon.el (gnus-demon-init): Fixed regression when IDLE is t and
  TIME is set.

2012-09-05  Juri Linkov  <juri@jurta.org>
* gnus-group.el (gnus-read-ephemeral-bug-group): Allow opening more
  than one group at a time (bug#11961).

11 years agoMerge changes made in Gnus master
Gnus developers [Wed, 5 Sep 2012 22:35:32 +0000 (22:35 +0000)]
Merge changes made in Gnus master

2012-09-05 Julien Danjou <julien@danjou.info>
* gnus-srvr.el (gnus-server-open-server): Don't message on failure:
  this hide the real reason with a message giving absolutely no hint.

2012-09-05 Lars Ingebrigtsen <larsi@gnus.org>
* gnus-group.el (gnus-group-mark-article-read): Propagate the read mark
  to the backend (bug#11804).
* message.el (message-insert-newsgroups): Don't insert newsgroup
  duplicates (bug#12275).

2012-09-05 John Wiegley <johnw@newartisans.com>
* gnus.el (gnus-expand-group-parameters): Allow regexp substitutions in
  sieve rules.

2012-09-05 Jan Tatarik <jan.tatarik@gmail.com>
* gnus-score.el (gnus-score-decode-text-parts): Use #' for the local
  function.
* gnus-logic.el (gnus-advanced-body): Allow scoring on decoded bodies.
* gnus-score.el (gnus-score-decode-text-parts): Ditto.

2012-09-05 Magnus Henoch <magnus.henoch@gmail.com>
* nnmaildir.el: Make nnmaildir understand and write maildir flags.
  That is, rename files from "unique:2," to "unique:2,S" for "seen", etc.
  This should make nnmaildir more usable with offlineimap.

11 years agoFix race conditions with signal handlers and errno.
Paul Eggert [Wed, 5 Sep 2012 21:33:53 +0000 (14:33 -0700)]
Fix race conditions with signal handlers and errno.

Be more systematic about preserving errno whenever a signal
handler returns, even if it's not in the main thread.  Do this by
renaming signal handlers to distinguish between signal delivery
and signal handling.  All uses changed.
* atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
* data.c (deliver_arith_signal): Rename from arith_error.
* dispnew.c (deliver_window_change_signal): Rename from
window_change_signal.
* emacs.c (deliver_error_signal): Rename from fatal_error_signal.
(deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
* keyboard.c (deliver_input_available_signal): Rename from
input_available_signal.
(deliver_user_signal): Rename from handle_user_signal.
(deliver_interrupt_signal): Rename from interrupt_signal.
* process.c (deliver_pipe_signal): Rename from send_process_trap.
(deliver_child_signal): Rename from sigchld_handler.
* atimer.c (handle_alarm_signal):
* data.c (handle_arith_signal):
* dispnew.c (handle_window_change_signal):
* emacs.c (handle_fatal_signal, handle_danger_signal):
* keyboard.c (handle_input_available_signal):
* keyboard.c (handle_user_signal, handle_interrupt_signal):
* process.c (handle_pipe_signal, handle_child_signal):
New functions, with the actual signal-handling code taken from the
original respective signal handlers, sans the sporadic attempts to
preserve errno, since that's now done by handle_on_main_thread.
* atimer.c (alarm_signal_handler): Remove unnecessary decl.
* emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
* emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
Move to sysdep.c.
(main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
Move initialization of main_thread to sysdep.c's init_signals.
* process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
our usage, and simplifies the mainline code.
(record_child_status_change): New static function, as a helper
for handle_child_signal, and with most of the old child handler's
contents.
(CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
(handle_child_signal): Use the above.
* sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
Moved here from emacs.c.
(init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
code moved here from emacs.c's main function.
* sysdep.c, syssignal.h (handle_on_main_thread): New function,
replacing the old SIGNAL_THREAD_CHECK.  All uses changed.  This
lets callers save and restore errno properly.

11 years agoleim/quail/hebrew.el ("yiddish-royal"): Fix several bogus entries.
Eli Zaretskii [Wed, 5 Sep 2012 18:05:16 +0000 (21:05 +0300)]
leim/quail/hebrew.el ("yiddish-royal"): Fix several bogus entries.

11 years agoRemove redundant or unused things here and there.
Dmitry Antipov [Wed, 5 Sep 2012 17:05:32 +0000 (21:05 +0400)]
Remove redundant or unused things here and there.
* lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
* conf_post.h (RE_TRANSLATE): Use char_table_translate.
* editfns.c (Fcompare_buffer_substrings): Likewise.
* frame.h (struct terminal, struct font_driver_list):
Remove redundant declarations.
* window.h (Qleft, Qright): Likewise.

11 years agoDo not mark objects from deleted buffers, windows and frames.
Dmitry Antipov [Wed, 5 Sep 2012 15:34:45 +0000 (19:34 +0400)]
Do not mark objects from deleted buffers, windows and frames.
* alloc.c (mark_buffer): Mark just the buffer if it is dead.
(mark_object): Likewise for windows and frames.

11 years ago* alloc.c (valid_lisp_object_p): Treat killed buffers,
Dmitry Antipov [Wed, 5 Sep 2012 12:55:03 +0000 (16:55 +0400)]
* alloc.c (valid_lisp_object_p): Treat killed buffers,
buffer_defaults and buffer_local_symbols as valid objects.
Return special value to denote them.

11 years agoAuto-commit of generated files.
Glenn Morris [Wed, 5 Sep 2012 10:17:38 +0000 (06:17 -0400)]
Auto-commit of generated files.

11 years agoProvide support for fitting frames to buffers.
Martin Rudalics [Wed, 5 Sep 2012 09:22:20 +0000 (11:22 +0200)]
Provide support for fitting frames to buffers.

* help.el (temp-buffer-max-height): New default value.
(temp-buffer-resize-frames): New option.
(resize-temp-buffer-window): Optionally resize frame.

* window.el (fit-frame-to-buffer-bottom-margin): New option.
(fit-frame-to-buffer): New function.

11 years ago* fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
Paul Eggert [Wed, 5 Sep 2012 07:18:46 +0000 (00:18 -0700)]
* fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.

* fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
(Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
(file_name_absolute_p, Fsubstitute_in_file_name):
(check_executable, check_writable, Ffile_accessible_directory_p)
(Fset_file_selinux_context, Fdefault_file_modes)
(Finsert_file_contents, choose_write_coding_system)
(Fwrite_region, build_annotations, a_write, e_write)
(Fdo_auto_save):
* filelock.c (boot_time_initialized, get_boot_time)
(get_boot_time_1, lock_file_1, within_one_second):
* floatfns.c (in_float):
* fns.c (concat, internal_equal, Frequire, base64_encode_1)
(base64_decode_1, cmpfn_eql, cmpfn_user_defined)
(sweep_weak_table, sweep_weak_hash_tables, secure_hash):
* lisp.h (struct Lisp_Hash_Table.cmpfn):
* window.c (compare_window_configurations):
Use bool for booleans.
* fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
(Fdefault_file_modes): Now mode_t, not int, for modes.
(Fdo_auto_save): Set a boolean to 1 rather than using ++.
(internal_delete_file): Now returns void, not a (boolean) int,
since nobody was looking at the return value.
* lisp.h, window.h: Adjust to above API changes.

11 years agoMerge from emacs-24; up to 2012-05-05T02:50:20Z!monnier@iro.umontreal.ca
Glenn Morris [Wed, 5 Sep 2012 07:05:56 +0000 (00:05 -0700)]
Merge from emacs-24; up to 2012-05-05T02:50:20Z!monnier@iro.umontreal.ca

11 years agoChangeLog fixes
Glenn Morris [Wed, 5 Sep 2012 06:56:55 +0000 (23:56 -0700)]
ChangeLog fixes

11 years ago* xdisp.c (set_message): Simplify and reindent last change.
Paul Eggert [Wed, 5 Sep 2012 03:37:32 +0000 (20:37 -0700)]
* xdisp.c (set_message): Simplify and reindent last change.

11 years agosrc/makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
Juanma Barranquero [Wed, 5 Sep 2012 00:30:14 +0000 (02:30 +0200)]
src/makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.

11 years agont/config.nt: Sync with autogen/config.in.
Juanma Barranquero [Wed, 5 Sep 2012 00:17:57 +0000 (02:17 +0200)]
nt/config.nt: Sync with autogen/config.in.

11 years agoImplement `debug-on-message'.
Lars Ingebrigtsen [Tue, 4 Sep 2012 21:21:00 +0000 (23:21 +0200)]
Implement `debug-on-message'.

This allows tracking down what piece of code is outputting stuff in
the echo area.

* eval.c (call_debugger): Make the function non-static so that we
can call it from set_message.

* xdisp.c (set_message): Implement the new variable `debug-on-message'.
(syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.

11 years agoGive more-useful info on a fatal error (Bug#12328).
Paul Eggert [Tue, 4 Sep 2012 18:29:04 +0000 (11:29 -0700)]
Give more-useful info on a fatal error (Bug#12328).

* doc/emacs/trouble.texi (Crashing): New section, documenting this.
* etc/NEWS: Document the change.
* src/alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
(die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
of doing the work ourselves.
* src/emacs.c (fatal_error_signal): Let fatal_error_backtrace
do most of the work.
(fatal_error_backtrace): New function, taken from the guts
of the old fatal_error_signal, but with a new option to output
a backtrace.
(shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
info about the signal than just its number.
* src/lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
* src/sysdep.c: Include <execinfo.h>
(emacs_backtrace): New function, taken partly from the previous
code of the 'die' function.
(emacs_abort): Call fatal_error_backtrace rather than abort.

11 years agoMacro-expand interpreted code during load.
Stefan Monnier [Tue, 4 Sep 2012 17:40:25 +0000 (13:40 -0400)]
Macro-expand interpreted code during load.
* src/lread.c (readevalloop): Call internal-macroexpand-for-load to perform
eager (load-time) macro-expansion.
* src/lisp.mk (lisp): Add macroexp.
* lisp/loadup.el: Load macroexp.  Remove hack.
* lisp/emacs-lisp/macroexp.el (macroexp--eval-if-compile): New function.
(macroexp--expand-all): Use it to get better warnings.
(macroexp--backtrace, macroexp--trim-backtrace-frame)
(internal-macroexpand-for-load): New functions.
(macroexp--pending-eager-loads): New var.
(emacs-startup-hook): New hack to replace one in loadup.el.
* lisp/emacs-lisp/cl-macs.el (cl--compiler-macro-list*)
(cl--compiler-macro-cXXr): Move to top, before they can be used.
(cl-psetf): Simplify.
(cl-defstruct): Add indent rule.

11 years agoSimplify redefinition of 'abort' (Bug#12316).
Paul Eggert [Tue, 4 Sep 2012 17:34:54 +0000 (10:34 -0700)]
Simplify redefinition of 'abort' (Bug#12316).

Do not try to redefine the 'abort' function.  Instead, redo
the code so that it calls 'emacs_abort' rather than 'abort'.
This removes the need for the NO_ABORT configure-time macro
and makes it easier to change the abort code to do a backtrace.
* configure.ac (NO_ABRT): Remove.
* admin/CPP-DEFINES (NO_ABORT): Remove.
* nt/inc/ms-w32.h (w32_abort) [HAVE_NTGUI]: Remove.
* src/.gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
* src/emacs.c (abort) [!DOS_NT && !NO_ABORT]:
Remove; sysdep.c's emacs_abort now takes its place.
* src/lisp.h (emacs_abort): New decl.  All calls from Emacs code to
'abort' changed to use 'emacs_abort'.
* src/msdos.c (dos_abort) [defined abort]: Remove; not used.
(abort) [!defined abort]: Rename to ...
(emacs_abort): ... new name.
* src/sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
the place of the old 'abort' in emacs.c.
* src/w32.c, src/w32fns.c (abort): Do not #undef.
* src/w32.c (emacs_abort): Rename from w32_abort.