bpt/emacs.git
12 years ago* image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
Paul Eggert [Mon, 20 Jun 2011 06:03:10 +0000 (23:03 -0700)]
* image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:

Don't assume string length fits in int.

12 years ago* gtkutil.c (style_changed_cb): Avoid need for strlen.
Paul Eggert [Mon, 20 Jun 2011 05:54:33 +0000 (22:54 -0700)]
* gtkutil.c (style_changed_cb): Avoid need for strlen.

12 years ago* font.c (font_intern_prop): Don't assume string length fits in int.
Paul Eggert [Mon, 20 Jun 2011 05:51:47 +0000 (22:51 -0700)]
* font.c (font_intern_prop): Don't assume string length fits in int.

Don't assume integer property fits in fixnum.
* font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.

12 years ago* font.c: Don't assume string length fits in int.
Paul Eggert [Mon, 20 Jun 2011 03:21:35 +0000 (20:21 -0700)]
* font.c: Don't assume string length fits in int.

(font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
Use ptrdiff_t, not int.

12 years ago* filelock.c: Fix some buffer overrun and integer overflow issues.
Paul Eggert [Mon, 20 Jun 2011 03:11:40 +0000 (20:11 -0700)]
* filelock.c: Fix some buffer overrun and integer overflow issues.

(get_boot_time): Don't assume that gzip command string fits in 100 bytes.
Reformulate so as not to need the command string.
Invoke gzip -cd rather than gunzip, as it's more portable.
(lock_info_type, lock_file_1, lock_file):
Don't assume pid_t and time_t fit in unsigned long.
(LOCK_PID_MAX): Remove; we now use more-reliable bounds.
(current_lock_owner): Prefer signed type for sizes.
Use memcpy, not strncpy, where memcpy is what is really wanted.
Don't assume (via atoi) that time_t and pid_t fit in int.
Check for time_t and/or pid_t out of range, e.g., via a network share.
Don't alloca where an auto var works fine.

12 years ago* fileio.c: Fix some integer overflow issues.
Paul Eggert [Sun, 19 Jun 2011 19:06:16 +0000 (12:06 -0700)]
* fileio.c: Fix some integer overflow issues.

(file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
Don't assume string length fits in int.
(directory_file_name): Don't assume string length fits in long.
(make_temp_name): Don't assume pid fits in int, or that its print
length is less than 20.

12 years ago* data.c (Fsubr_name): Rewrite to avoid a strlen call.
Paul Eggert [Sun, 19 Jun 2011 18:44:58 +0000 (11:44 -0700)]
* data.c (Fsubr_name): Rewrite to avoid a strlen call.

12 years ago* coding.c (make_subsidiaries): Don't assume string length fits in int.
Paul Eggert [Sun, 19 Jun 2011 18:44:09 +0000 (11:44 -0700)]
* coding.c (make_subsidiaries): Don't assume string length fits in int.

12 years ago* callproc.c (child_setup): Rewrite to avoid two strlen calls.
Paul Eggert [Sun, 19 Jun 2011 18:40:02 +0000 (11:40 -0700)]
* callproc.c (child_setup): Rewrite to avoid two strlen calls.

12 years ago* process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
Paul Eggert [Sun, 19 Jun 2011 18:38:58 +0000 (11:38 -0700)]
* process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.

We prefer signed integers, even for size calculations.

12 years ago* emacs.c: Don't assume string length fits in 'int'.
Paul Eggert [Sun, 19 Jun 2011 18:37:51 +0000 (11:37 -0700)]
* emacs.c: Don't assume string length fits in 'int'.

(DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
(main): Don't invoke strlen when not needed.

12 years ago* dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
Paul Eggert [Sun, 19 Jun 2011 18:32:55 +0000 (11:32 -0700)]
* dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.

(XD_DEBUG_MESSAGE): Don't waste a byte.

12 years ago* callproc.c: Don't assume string length fits in 'int.'
Paul Eggert [Sun, 19 Jun 2011 18:30:19 +0000 (11:30 -0700)]
* callproc.c: Don't assume string length fits in 'int.'

12 years ago* buffer.c (init_buffer): Don't assume string length fits in 'int'.
Paul Eggert [Sun, 19 Jun 2011 18:27:58 +0000 (11:27 -0700)]
* buffer.c (init_buffer): Don't assume string length fits in 'int'.

12 years ago* lread.c (string_to_number): Simplify the 2011-04-26 change by invoking xsignal1.
Paul Eggert [Sun, 19 Jun 2011 01:35:03 +0000 (18:35 -0700)]
* lread.c (string_to_number): Simplify the 2011-04-26 change by invoking xsignal1.

12 years ago* lread.c (invalid_syntax): Omit length argument.
Paul Eggert [Sun, 19 Jun 2011 01:31:41 +0000 (18:31 -0700)]
* lread.c (invalid_syntax): Omit length argument.

All uses changed.  This doesn't fix a bug, but it simplifies the
code away from its former Hollerith-constant appearance, and it's
one less 'int' to worry about when looking at integer-overflow issues.

12 years ago* lisp.h (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
Paul Eggert [Sun, 19 Jun 2011 00:11:45 +0000 (17:11 -0700)]
* lisp.h (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.

12 years ago* lisp.h (LIST_END_P): Remove unused macro and its bogus comment.
Paul Eggert [Sun, 19 Jun 2011 00:09:24 +0000 (17:09 -0700)]
* lisp.h (LIST_END_P): Remove unused macro and its bogus comment.

12 years ago* lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
Paul Eggert [Sun, 19 Jun 2011 00:06:17 +0000 (17:06 -0700)]
* lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).

This didn't break anything, but it didn't help either.
It's confusing to put a bogus integer in a place where the actual
value does not matter.

12 years ago* lisp.h (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
Paul Eggert [Sat, 18 Jun 2011 19:13:46 +0000 (12:13 -0700)]
* lisp.h (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,

not EMACS_UINT and EMACS_INT, when converting pointer to integer.
This avoids a GCC warning when WIDE_EMACS_INT.

12 years ago* lisp.h (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
Paul Eggert [Sat, 18 Jun 2011 19:08:22 +0000 (12:08 -0700)]
* lisp.h (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.

We prefer signed types, and the value cannot exceed the EMACS_INT
range anyway (because otherwise the length would not be representable).

12 years ago* lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
Paul Eggert [Sat, 18 Jun 2011 18:32:22 +0000 (11:32 -0700)]
* lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.

This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
implementation.

12 years ago* indent.c (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
Paul Eggert [Sat, 18 Jun 2011 18:29:19 +0000 (11:29 -0700)]
* indent.c (Fcompute_motion): Don't assume hscroll and tab offset fit in int.

12 years ago* insdel.c: Omit unnecessary forward decls, to simplify future changes.
Paul Eggert [Sat, 18 Jun 2011 18:28:32 +0000 (11:28 -0700)]
* insdel.c: Omit unnecessary forward decls, to simplify future changes.

12 years ago* indent.c (sane_tab_width): New function.
Paul Eggert [Sat, 18 Jun 2011 18:24:12 +0000 (11:24 -0700)]
* indent.c (sane_tab_width): New function.

(current_column, scan_for_column, Findent_to, position_indentation)
(compute_motion): Use it.  This is just for clarity.

12 years ago* image.c (xbm_image_p): Don't assume stated width and height fit in int.
Paul Eggert [Sat, 18 Jun 2011 18:12:25 +0000 (11:12 -0700)]
* image.c (xbm_image_p): Don't assume stated width and height fit in int.

12 years ago* lisp.h (lint_assume): New macro.
Paul Eggert [Sat, 18 Jun 2011 18:09:17 +0000 (11:09 -0700)]
* lisp.h (lint_assume): New macro.

* composite.c (composition_gstring_put_cache):
* ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.

12 years ago* fns.c (Ffillarray): Don't shadow a local.
Paul Eggert [Sat, 18 Jun 2011 16:45:23 +0000 (09:45 -0700)]
* fns.c (Ffillarray): Don't shadow a local.

12 years ago* editfns.c: Omit unnecessary forward decls, to simplify future changes.
Paul Eggert [Sat, 18 Jun 2011 16:20:05 +0000 (09:20 -0700)]
* editfns.c: Omit unnecessary forward decls, to simplify future changes.

12 years ago* ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
Paul Eggert [Sat, 18 Jun 2011 16:19:18 +0000 (09:19 -0700)]
* ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.

12 years ago* font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
Paul Eggert [Sat, 18 Jun 2011 16:15:19 +0000 (09:15 -0700)]
* font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.

12 years ago* fns.c (mapcar1): Declare byte as byte, for clarity.
Paul Eggert [Sat, 18 Jun 2011 16:10:16 +0000 (09:10 -0700)]
* fns.c (mapcar1): Declare byte as byte, for clarity.

12 years ago* fns.c (Ffillarray): Use same idx as rest of code here.
Paul Eggert [Sat, 18 Jun 2011 16:07:41 +0000 (09:07 -0700)]
* fns.c (Ffillarray): Use same idx as rest of code here.

12 years ago* fns.c: Check that character arg fits in 'int'.
Paul Eggert [Sat, 18 Jun 2011 16:04:07 +0000 (09:04 -0700)]
* fns.c: Check that character arg fits in 'int'.

12 years ago* fns.c: Don't assume string byte-length fits in 'int'.
Paul Eggert [Sat, 18 Jun 2011 16:02:03 +0000 (09:02 -0700)]
* fns.c: Don't assume string byte-length fits in 'int'.

12 years ago* fns.c: Use much-faster test for byte-length change.
Paul Eggert [Sat, 18 Jun 2011 16:01:08 +0000 (09:01 -0700)]
* fns.c: Use much-faster test for byte-length change.

12 years ago* fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
Paul Eggert [Sat, 18 Jun 2011 15:57:22 +0000 (08:57 -0700)]
* fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.

12 years ago* alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
Paul Eggert [Sat, 18 Jun 2011 15:39:24 +0000 (08:39 -0700)]
* alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.

12 years ago* fns.c (concat): Catch string overflow earlier.
Paul Eggert [Sat, 18 Jun 2011 15:08:31 +0000 (08:08 -0700)]
* fns.c (concat): Catch string overflow earlier.

Do not rely on integer wraparound.

12 years ago* dispextern.h (struct it.overlay_strings_charpos): EMACS_INT, not int.
Paul Eggert [Sat, 18 Jun 2011 05:51:59 +0000 (22:51 -0700)]
* dispextern.h (struct it.overlay_strings_charpos): EMACS_INT, not int.

12 years ago* dispextern.h (struct it.selective): Now EMACS_INT, not int.
Paul Eggert [Fri, 17 Jun 2011 19:55:19 +0000 (12:55 -0700)]
* dispextern.h (struct it.selective): Now EMACS_INT, not int.

* xdisp.c (forward_to_next_line_start)
(back_to_previous_visible_line_start)
(reseat_at_next_visible_line_start, next_element_from_buffer):
Don't arbitrarily truncate the value of 'selective' to int.

12 years ago* xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
Paul Eggert [Fri, 17 Jun 2011 19:49:04 +0000 (12:49 -0700)]
* xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.

12 years ago* composite.c (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
Paul Eggert [Fri, 17 Jun 2011 19:45:29 +0000 (12:45 -0700)]
* composite.c (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,

not EMACS_UINT, for indexes.

12 years ago* composite.c: Don't truncate sizes to 'int'.
Paul Eggert [Fri, 17 Jun 2011 08:27:36 +0000 (01:27 -0700)]
* composite.c: Don't truncate sizes to 'int'.

(composition_gstring_p, composition_reseat_it)
(composition_adjust_point): Use EMACS_INT, not int.

12 years ago* category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
Paul Eggert [Fri, 17 Jun 2011 08:17:29 +0000 (01:17 -0700)]
* category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.

12 years ago* buffer.c: Include <verify.h>.
Paul Eggert [Fri, 17 Jun 2011 08:14:30 +0000 (01:14 -0700)]
* buffer.c: Include <verify.h>.

(init_buffer_once): Check at compile-time, not run-time.

12 years ago* buffer.c (record_overlay_string): Check for size-calculation overflow.
Paul Eggert [Fri, 17 Jun 2011 08:10:34 +0000 (01:10 -0700)]
* buffer.c (record_overlay_string): Check for size-calculation overflow.

(struct sortstrlist.size, struct sortlist.used): Don't truncate size to int.

12 years ago* buffer.c (struct sortstr.size, record_overlay_string): Don't truncate size to int.
Paul Eggert [Fri, 17 Jun 2011 07:57:42 +0000 (00:57 -0700)]
* buffer.c (struct sortstr.size, record_overlay_string): Don't truncate size to int.

12 years ago* buffer.c (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
Paul Eggert [Fri, 17 Jun 2011 07:52:35 +0000 (00:52 -0700)]
* buffer.c (compare_overlays, cmp_for_strings): Avoid subtraction overflow.

12 years ago* buffer.c (struct sortstr.priority): Now EMACS_INT, not int.
Paul Eggert [Fri, 17 Jun 2011 07:49:50 +0000 (00:49 -0700)]
* buffer.c (struct sortstr.priority): Now EMACS_INT, not int.

12 years ago* buffer.c (struct sortvec.priority): Now EMACS_INT, not int.
Paul Eggert [Fri, 17 Jun 2011 07:47:18 +0000 (00:47 -0700)]
* buffer.c (struct sortvec.priority): Now EMACS_INT, not int.

12 years agoFix two typos in same-window-p.
Martin Rudalics [Fri, 17 Jun 2011 06:04:44 +0000 (08:04 +0200)]
Fix two typos in same-window-p.

* window.el (same-window-p): Fix two typos introduced when
adding with-no-warnings.

12 years ago* m4/lstat.m4: Merge from gnulib (Bug#8878).
Paul Eggert [Thu, 16 Jun 2011 23:10:17 +0000 (16:10 -0700)]
* m4/lstat.m4: Merge from gnulib (Bug#8878).

12 years ago* lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
Paul Eggert [Thu, 16 Jun 2011 22:50:46 +0000 (15:50 -0700)]
* lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.

Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
hosts with pre-C99 libraries, because pD is wrongly defined to "t".

12 years agoImprove buffer-overflow checking (Bug#8873).
Paul Eggert [Thu, 16 Jun 2011 21:25:42 +0000 (14:25 -0700)]
Improve buffer-overflow checking (Bug#8873).

12 years agoMerge from trunk.
Paul Eggert [Thu, 16 Jun 2011 21:19:55 +0000 (14:19 -0700)]
Merge from trunk.

12 years agoImprove buffer-overflow checking.
Paul Eggert [Thu, 16 Jun 2011 21:18:12 +0000 (14:18 -0700)]
Improve buffer-overflow checking.

* fileio.c (Finsert_file_contents):
* insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
Remove the old (too-loose) buffer overflow checks.
They weren't needed, since make_gap checks for buffer overflow.
* insdel.c (make_gap_larger): Catch buffer overflows that were missed.
The old code merely checked for Emacs fixnum overflow, and relied
on undefined (wraparound) behavior.  The new code avoids undefined
behavior, and also checks for ptrdiff_t and/or size_t overflow.

12 years agoconfigure.in: Try to determine CRT_DIR automatically when using gcc
Miles Bader [Thu, 16 Jun 2011 17:50:21 +0000 (02:50 +0900)]
configure.in: Try to determine CRT_DIR automatically when using gcc

12 years ago* editfns.c: Tune. Don't use wider integers than needed. Don't use alloca.
Paul Eggert [Thu, 16 Jun 2011 17:44:43 +0000 (10:44 -0700)]
* editfns.c: Tune.  Don't use wider integers than needed.  Don't use alloca.

Use a bigger 'string' buffer.  Rewrite to avoid 'n > 0' test.

12 years ago* editfns.c (Finsert_char): Don't dump core with very negative counts.
Paul Eggert [Thu, 16 Jun 2011 17:25:16 +0000 (10:25 -0700)]
* editfns.c (Finsert_char): Don't dump core with very negative counts.

12 years agoHave enlarge-/shrink-window not report errors in most cases (bug#8862).
Martin Rudalics [Thu, 16 Jun 2011 14:01:46 +0000 (16:01 +0200)]
Have enlarge-/shrink-window not report errors in most cases (bug#8862).

* window.el (enlarge-window, shrink-window): Don't report an error
when the window can't be resized as requested (Bug#8862).

12 years agoAuto-commit of generated files.
Glenn Morris [Thu, 16 Jun 2011 10:18:50 +0000 (06:18 -0400)]
Auto-commit of generated files.

12 years agoNever ever pop up a new frame in noninteractive mode (bug#8857).
Martin Rudalics [Thu, 16 Jun 2011 09:21:56 +0000 (11:21 +0200)]
Never ever pop up a new frame in noninteractive mode (bug#8857).

(display-buffer): Don't check noninteractive when calling
display-buffer-pop-up-frame.
(display-buffer-pop-up-frame): Never pop up a frame in
noninteractive mode (Bug#8857).

12 years agoFix doc-strings of switch-to-buffer family functions (bug#8875).
Martin Rudalics [Thu, 16 Jun 2011 08:55:08 +0000 (10:55 +0200)]
Fix doc-strings of switch-to-buffer family functions (bug#8875).

(switch-to-buffer-same-frame, switch-to-buffer-other-window)
(switch-to-buffer-other-window-same-frame)
(switch-to-buffer-other-frame): Fix doc-strings.  Reported by Drew
Adams (Bug#8875).

12 years agoImprove cohabitation of pop-up-frames and second argument of display-buffer (bug...
Martin Rudalics [Thu, 16 Jun 2011 07:31:51 +0000 (09:31 +0200)]
Improve cohabitation of pop-up-frames and second argument of display-buffer (bug#8865).

* window.el (display-buffer-normalize-specifiers-1): Respect
current value of pop-up-frames for most reasonable values of
second argument of display-buffer (Bug#8865).

12 years ago* insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
Paul Eggert [Thu, 16 Jun 2011 06:57:02 +0000 (23:57 -0700)]
* insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.

12 years ago* insdel.c, lisp.h (buffer_overflow): New function.
Paul Eggert [Thu, 16 Jun 2011 06:48:01 +0000 (23:48 -0700)]
* insdel.c, lisp.h (buffer_overflow): New function.

(insert_from_buffer_1, replace_range, replace_range_2):
* insdel.c (make_gap_larger):
* editfns.c (Finsert_char):
* fileio.c (Finsert_file_contents): Use it, to normalize wording.

12 years ago* buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
Paul Eggert [Thu, 16 Jun 2011 06:19:26 +0000 (23:19 -0700)]
* buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.

12 years agoMerge changes made in Gnus trunk.
Teodor Zlatanov [Thu, 16 Jun 2011 06:18:18 +0000 (06:18 +0000)]
Merge changes made in Gnus trunk.

auth-source.el (auth-source-save-secrets): New variable to control if secret tokens should be saved encrypted.
 (auth-source-netrc-parse, auth-source-netrc-search): Pass the file name to `auth-source-netrc-normalize'.
 (with-auth-source-epa-overrides): Add convenience macro.  Don't depend on the EPA variables being defined.
 (auth-source-epa-make-gpg-token): Convert text to a "gpg:" token.
 (auth-source-netrc-normalize): Convert "gpg:" tokens back to text in the lexical-let closure.
 (auth-source-netrc-create): Create "gpg:" tokens according to `auth-source-save-secrets'.

12 years agoMerge from gnulib: lib/gnulib.mk, m4/*.m4.
Paul Eggert [Wed, 15 Jun 2011 22:27:54 +0000 (15:27 -0700)]
Merge from gnulib: lib/gnulib.mk, m4/*.m4.

12 years ago(open-network-stream): Add the keyword :always-query-capabilities.
Lars Magne Ingebrigtsen [Wed, 15 Jun 2011 20:44:45 +0000 (22:44 +0200)]
(open-network-stream): Add the keyword :always-query-capabilities.

This is for the case where you want to force a `plain' network
connection, but the protocol still requires the capabilitiy command
(i.e., SMTP and EHLO).

12 years agoInteger overflow and signedness fixes (Bug#8873).
Paul Eggert [Wed, 15 Jun 2011 19:57:25 +0000 (12:57 -0700)]
Integer overflow and signedness fixes (Bug#8873).

12 years ago* ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
Paul Eggert [Wed, 15 Jun 2011 19:40:52 +0000 (12:40 -0700)]
* ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.

(GET_CCL_RANGE, IN_INT_RANGE): Use it.

12 years ago* fileio.c (emacs_lseek): Work around GCC bug 43772.
Paul Eggert [Wed, 15 Jun 2011 19:29:18 +0000 (12:29 -0700)]
* fileio.c (emacs_lseek): Work around GCC bug 43772.

12 years ago* character.h, charset.h: Use verify_expr, not verify_true.
Paul Eggert [Wed, 15 Jun 2011 18:57:45 +0000 (11:57 -0700)]
* character.h, charset.h: Use verify_expr, not verify_true.

12 years agoMerge from trunk.
Paul Eggert [Wed, 15 Jun 2011 18:52:30 +0000 (11:52 -0700)]
Merge from trunk.

12 years ago* lib/ftoastr.c, lib/stdio.in.h, lib/verify.h: Merge from gnulib.
Paul Eggert [Wed, 15 Jun 2011 18:50:18 +0000 (11:50 -0700)]
* lib/ftoastr.c, lib/stdio.in.h, lib/verify.h: Merge from gnulib.

12 years ago* doc/lispref/text.texi (Special Properties): Clarify role of font-lock-face.
Chong Yidong [Wed, 15 Jun 2011 18:45:28 +0000 (14:45 -0400)]
* doc/lispref/text.texi (Special Properties): Clarify role of font-lock-face.

12 years ago* lisp/pcmpl-rpm.el (pcomplete/rpm): Minor simplification.
Stefan Monnier [Wed, 15 Jun 2011 18:40:00 +0000 (14:40 -0400)]
* lisp/pcmpl-rpm.el (pcomplete/rpm): Minor simplification.

12 years ago* lisp/emacs-lisp/debug.el (debug): Don't leave the buffer in Debugger.
Stefan Monnier [Wed, 15 Jun 2011 18:39:04 +0000 (14:39 -0400)]
* lisp/emacs-lisp/debug.el (debug): Don't leave the buffer in Debugger.

12 years ago* src/eval.c (Fdefvaralias): Also mark the target as variable-special-p.
Stefan Monnier [Wed, 15 Jun 2011 18:36:00 +0000 (14:36 -0400)]
* src/eval.c (Fdefvaralias): Also mark the target as variable-special-p.

12 years ago* lisp/abbrev.el (define-abbrev-table): Don't add a table multiple times.
Stefan Monnier [Wed, 15 Jun 2011 18:33:33 +0000 (14:33 -0400)]
* lisp/abbrev.el (define-abbrev-table): Don't add a table multiple times.

12 years agoprogmodes/cc-fonts.el (c-font-lock-declarations): 1: Whilst checking for
Alan Mackenzie [Wed, 15 Jun 2011 18:24:25 +0000 (18:24 +0000)]
progmodes/cc-fonts.el (c-font-lock-declarations): 1: Whilst checking for
declarators, disable knr checking to speed up for normal files.  2:
Refactor, replacing a sequence of nested if forms by a cond form.

12 years agoMerge from trunk.
Paul Eggert [Wed, 15 Jun 2011 18:07:38 +0000 (11:07 -0700)]
Merge from trunk.

12 years agoRenamed `process-alive-p' to `process-live-p' for consistency with other `-live-p...
Lars Magne Ingebrigtsen [Wed, 15 Jun 2011 17:30:41 +0000 (19:30 +0200)]
Renamed `process-alive-p' to `process-live-p' for consistency with other `-live-p' functions.

12 years agoDon't encourage the use of display-buffer-alist from Elisp code.
Stefan Monnier [Wed, 15 Jun 2011 17:20:36 +0000 (13:20 -0400)]
Don't encourage the use of display-buffer-alist from Elisp code.
* lisp/window.el (same-window-buffer-names, same-window-regexps)
(special-display-frame-alist, special-display-popup-frame)
(special-display-function, special-display-buffer-names)
(special-display-regexps, pop-up-frame-alist)
(pop-up-frame-function, pop-up-frames, display-buffer-reuse-frames)
(pop-up-windows, split-window-preferred-function)
(split-height-threshold, split-width-threshold, even-window-heights)
(display-buffer-mark-dedicated): Fix obsolescence info.

12 years ago* lisp/progmodes/cfengine.el (cfengine-mode): Derive from prog-mode.
Dan Nicolaescu [Wed, 15 Jun 2011 14:47:57 +0000 (07:47 -0700)]
* lisp/progmodes/cfengine.el (cfengine-mode): Derive from prog-mode.

12 years agoRemove some macros that are either not used anymore or don't really
Dan Nicolaescu [Wed, 15 Jun 2011 14:11:04 +0000 (07:11 -0700)]
Remove some macros that are either not used anymore or don't really
need documenting here.

12 years agoDerive some programming modes from prog-mode.
Dan Nicolaescu [Wed, 15 Jun 2011 14:07:48 +0000 (07:07 -0700)]
Derive some programming modes from prog-mode.

* lisp/progmodes/python.el (python-mode): Derive from prog-mode.
* lisp/progmodes/ps-mode.el (ps-mode):
* lisp/progmodes/mixal-mode.el (mixal-mode):
* lisp/progmodes/ld-script.el (ld-script-mode): Likewise.

12 years agoAuto-commit of generated files.
Glenn Morris [Wed, 15 Jun 2011 10:18:57 +0000 (06:18 -0400)]
Auto-commit of generated files.

12 years agoDon't let display-buffer pop up new frames by default (bug#8857).
Martin Rudalics [Wed, 15 Jun 2011 07:09:47 +0000 (09:09 +0200)]
Don't let display-buffer pop up new frames by default (bug#8857).

* window.el (display-buffer-alist): Trim default value to avoid
popping up a new frame (Bug#8857) or reusing an arbitrary window
on another frame.
(display-buffer): Do not fall back on popping up a new frame in
batch mode (Bug#8857).

12 years ago* fileio.c: Don't assume EMACS_INT fits in off_t.
Paul Eggert [Wed, 15 Jun 2011 01:07:35 +0000 (18:07 -0700)]
* fileio.c: Don't assume EMACS_INT fits in off_t.

(emacs_lseek): New static function.
(Finsert_file_contents, Fwrite_region): Use it.
Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.

12 years ago* fns.c (Fload_average): Don't assume 100 * load average fits in int.
Paul Eggert [Tue, 14 Jun 2011 23:18:53 +0000 (16:18 -0700)]
* fns.c (Fload_average): Don't assume 100 * load average fits in int.

12 years ago* fns.c (Fcopy_sequence): Don't assume vector length fits in int.
Paul Eggert [Tue, 14 Jun 2011 22:41:38 +0000 (15:41 -0700)]
* fns.c (Fcopy_sequence): Don't assume vector length fits in int.

12 years ago* fns.c (Fnthcdr, Fsort): Don't assume list length fits in int.
Paul Eggert [Tue, 14 Jun 2011 22:39:35 +0000 (15:39 -0700)]
* fns.c (Fnthcdr, Fsort): Don't assume list length fits in int.

12 years ago* fns.c: Don't overflow int when computing a list length.
Paul Eggert [Tue, 14 Jun 2011 22:32:12 +0000 (15:32 -0700)]
* fns.c: Don't overflow int when computing a list length.

(Fsafe_length): Return a float if the value is not representable
as a fixnum.  This shouldn't happen except in contrived situations.
Use same QUIT_COUNT_HEURISTIC as Flength now does.

12 years ago* fns.c (Flength): Don't overflow int when computing a list length.
Paul Eggert [Tue, 14 Jun 2011 22:01:32 +0000 (15:01 -0700)]
* fns.c (Flength): Don't overflow int when computing a list length.

Use EMACS_INT, not int, to avoid unwanted truncation on 64-bit hosts.
Check for QUIT every 1024 entries rather than every other entry;
that's faster and is responsive enough.  Report an error instead of
overflowing an integer.

12 years ago* alloc.c: Check that resized vectors' lengths fit in fixnums.
Paul Eggert [Tue, 14 Jun 2011 21:30:16 +0000 (14:30 -0700)]
* alloc.c: Check that resized vectors' lengths fit in fixnums.

(header_size, word_size): New constants.
(allocate_vectorlike): Don't check size overflow here.
(allocate_vector): Check it here instead, since this is the only
caller of allocate_vectorlike that could cause overflow.
Check that the new vector's length is representable as a fixnum.

12 years agoFix resize and change of scroll bar width for Gtk3.
Jan Djärv [Tue, 14 Jun 2011 21:08:20 +0000 (23:08 +0200)]
Fix resize and change of scroll bar width for Gtk3.

* configure.in: Add emacsgtkfixed.o to GTK_OBJ if HAVE_GTK3.

* src/emacsgtkfixed.c, src/emacsgtkfixed.h: New files.

* src/gtkutil.c: Include src/emacsgtkfixed.h if HAVE_GTK3.
(int_gtk_range_get_value): Move to the scroll bar part of the file.
(style_changed_cb): Call update_theme_scrollbar_width and call
x_set_scroll_bar_default_width and xg_frame_set_char_size for
all frames.
(xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
Call gtk_window_set_resizable if HAVE_GTK3.
(x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
and height if HAVE_GTK3 (Bug#8505).
(scroll_bar_width_for_theme): New variable.
(update_theme_scrollbar_width): New function.
(xg_get_default_scrollbar_width): Move code to
update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
(xg_initialize): Call update_theme_scrollbar_width.

* src/gtkutil.h (xg_get_default_scrollbar_width): Remove argument.

* src/xfns.c (x_set_scroll_bar_default_width): Remove argument to
xg_get_default_scrollbar_width.

12 years ago* fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
Paul Eggert [Tue, 14 Jun 2011 20:57:33 +0000 (13:57 -0700)]
* fns.c (next_almost_prime): Don't return a multiple of 3 or 5.

The previous code was bogus.  For example, next_almost_prime (32)
returned 39, which is undesirable as it is a multiple of 3; and
next_almost_prime (24) returned 25, which is a multiple of 5 so
why was the code bothering to check for multiples of 7?