]> git.eshelyaron.com Git - emacs.git/log
emacs.git
13 years ago* minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
Paul Eggert [Thu, 23 Jun 2011 06:45:38 +0000 (23:45 -0700)]
* minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,

for sizes.  Check for string overflow more accurately.
Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.

13 years ago* macros.c: Integer and buffer overflow fixes.
Paul Eggert [Thu, 23 Jun 2011 06:31:41 +0000 (23:31 -0700)]
* macros.c: Integer and buffer overflow fixes.

* keyboard.h (struct keyboard.kbd_macro_bufsize):
* macros.c (Fstart_kbd_macro, store_kbd_macro_char):
Use ptrdiff_t, not int, for sizes.
Don't increment bufsize until after realloc succeeds.
Check for size-calculation overflow.
(Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.

13 years ago* lread.c (read1): Check for size overflow.
Paul Eggert [Thu, 23 Jun 2011 05:41:40 +0000 (22:41 -0700)]
* lread.c (read1): Check for size overflow.

13 years ago* lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
Paul Eggert [Thu, 23 Jun 2011 05:35:51 +0000 (22:35 -0700)]
* lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.

13 years ago* lread.c (read_escape): Avoid int overflow.
Paul Eggert [Thu, 23 Jun 2011 05:34:52 +0000 (22:34 -0700)]
* lread.c (read_escape): Avoid int overflow.

(Fload, openp, read_buffer_size, read1)
(substitute_object_recurse, read_vector, read_list, map_obarray):
Use ptrdiff_t, not int, for sizes.
(read1): Use EMACS_INT, not int, for sizes.

13 years ago* lread.c: Integer overflow fixes.
Paul Eggert [Thu, 23 Jun 2011 00:55:55 +0000 (17:55 -0700)]
* lread.c: Integer overflow fixes.

(read_integer): Radix is now EMACS_INT, not int,
to improve quality of diagnostics for out-of-range radices.
Calculate buffer size correctly for out-of-range radices.
(read1): Check for integer overflow in radices, and in
read-circle numbers.

13 years ago* image.c (cache_image): Check for size arithmetic overflow.
Paul Eggert [Thu, 23 Jun 2011 00:46:41 +0000 (17:46 -0700)]
* image.c (cache_image): Check for size arithmetic overflow.

13 years ago* lread.c (read_escape): Check for hex character overflow.
Paul Eggert [Wed, 22 Jun 2011 22:39:06 +0000 (15:39 -0700)]
* lread.c (read_escape): Check for hex character overflow.

13 years ago* lread.c: Integer overflow issues.
Paul Eggert [Wed, 22 Jun 2011 22:36:19 +0000 (15:36 -0700)]
* lread.c: Integer overflow issues.

(saved_doc_string_size, saved_doc_string_length)
(prev_saved_doc_string_size, prev_saved_doc_string_length):
Now ptrdiff_t, not int.
(read1): Don't assume doc string length fits in int.  Check for
out-of-range doc string lengths.
(read_list): Don't assume file position fits in int.

13 years agolisp/textmodes/bibtex.el: minor cleanup and bug fixes
Roland Winkler [Wed, 22 Jun 2011 20:59:48 +0000 (15:59 -0500)]
lisp/textmodes/bibtex.el: minor cleanup and bug fixes

13 years ago(smtpmail-try-auth-methods): If the user has stored a user name, then
Lars Magne Ingebrigtsen [Wed, 22 Jun 2011 19:24:51 +0000 (21:24 +0200)]
(smtpmail-try-auth-methods): If the user has stored a user name, then
query for the password first, instead of waiting for SMTP to give an
error message and the trying again.

13 years agoMerge: Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
Paul Eggert [Wed, 22 Jun 2011 18:20:15 +0000 (11:20 -0700)]
Merge: Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.

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

13 years agoGLYPH_DEBUG fixes
Paul Eggert [Wed, 22 Jun 2011 18:15:23 +0000 (11:15 -0700)]
GLYPH_DEBUG fixes

The following patches are for when GLYPH_DEBUG && !XASSERT.
* dispextern.h (trace_redisplay_p, dump_glyph_string):
* dispnew.c (flush_stdout):
* xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
Mark as externally visible.
* dispnew.c (check_window_matrix_pointers): Now static.
* dispnew.c (window_to_frame_vpos):
* xfns.c (unwind_create_frame):
* xterm.c (x_check_font): Remove unused local.
* scroll.c (CHECK_BOUNDS):
* xfaces.c (cache_fache): Rename local to avoid shadowing.
* xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
* xdisp.c (check_window_end): Now a no-op if !XASSERTS.
(debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
(debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
Now static.
(debug_method_add): Use va_list and vsprintf rather than relying
on undefined behavior with wrong number of arguments.
(dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
Don't assume ptrdiff_t and EMACS_INT are the same width as int.
In this code, it's OK to assume C99 behavior for ptrdiff_t formats
since we're not interested in debugging glyphs with old libraries.
* xfaces.c (cache_face): Move debugging code earlier; this pacifies
GCC 4.6.0's static checking.

13 years agoFrom Lawrence Mitchell <wence@gmx.li>: Don't hang in browse-url-xdg-open.
Jan Djärv [Wed, 22 Jun 2011 16:44:53 +0000 (18:44 +0200)]
From Lawrence Mitchell  <wence@gmx.li>: Don't hang in browse-url-xdg-open.

* net/browse-url.el (browse-url-xdg-open): Use 0, rather than nil
  BUFFER in call-process.

13 years agoMerge: Use gnulib's alloca-opt module.
Paul Eggert [Wed, 22 Jun 2011 16:28:41 +0000 (09:28 -0700)]
Merge: Use gnulib's alloca-opt module.

13 years agoMerge from trunk.
Paul Eggert [Wed, 22 Jun 2011 16:25:06 +0000 (09:25 -0700)]
Merge from trunk.

13 years agoMerge: Integer overflow and signedness fixes (Bug#8873).
Paul Eggert [Wed, 22 Jun 2011 16:15:41 +0000 (09:15 -0700)]
Merge: Integer overflow and signedness fixes (Bug#8873).

A few related buffer overrun fixes, too.

13 years agoMerge from trunk.
Paul Eggert [Wed, 22 Jun 2011 16:01:00 +0000 (09:01 -0700)]
Merge from trunk.

13 years agoWhen the .authinfo file has a user name but not a password, prompt
Lars Magne Ingebrigtsen [Wed, 22 Jun 2011 14:48:31 +0000 (16:48 +0200)]
When the .authinfo file has a user name but not a password, prompt
for the password.

13 years agodon't leak an XBM-image-sized buffer
Jim Meyering [Wed, 22 Jun 2011 12:23:17 +0000 (14:23 +0200)]
don't leak an XBM-image-sized buffer

* image.c (xbm_load): Free the image buffer after using it.

13 years agoNormalize SIDE argument of split-window (Bug#8916).
Martin Rudalics [Wed, 22 Jun 2011 09:23:31 +0000 (11:23 +0200)]
Normalize SIDE argument of split-window (Bug#8916).

* window.el (split-window): Normalize SIDE argument (Bug#8916).

13 years ago(smtpmail-via-smtp): Make sure we don't send QUIT twice.
Lars Magne Ingebrigtsen [Wed, 22 Jun 2011 09:13:50 +0000 (11:13 +0200)]
(smtpmail-via-smtp): Make sure we don't send QUIT twice.

13 years agoRemove preset entries for pop-up-frame-alist from window.el defaults.
Martin Rudalics [Wed, 22 Jun 2011 07:12:18 +0000 (09:12 +0200)]
Remove preset entries for pop-up-frame-alist from window.el defaults.

* window.el (display-buffer-default-specifiers)
(display-buffer-alist): Remove entries for pop-up-frame-alist.
Suggested by Katsumi Yamaoka <yamaoka@jpl.org>.

* frame.el (pop-up-frame-alist, pop-up-frame-function)
(special-display-frame-alist, special-display-popup-frame):
Remove duplicate declarations.  These are now in window.el.

13 years ago* font.c (font_score): Use EMACS_INT, not int, to store XINT value.
Paul Eggert [Wed, 22 Jun 2011 06:18:06 +0000 (23:18 -0700)]
* font.c (font_score): Use EMACS_INT, not int, to store XINT value.

13 years ago* dispextern.h (struct face.stipple):
Paul Eggert [Wed, 22 Jun 2011 06:16:16 +0000 (23:16 -0700)]
* dispextern.h (struct face.stipple):

* image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
(x_bitmap_mask, x_allocate_bitmap_record)
(x_create_bitmap_from_data, x_create_bitmap_from_file)
(x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
(x_create_bitmap_from_xpm_data):
* nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
* w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
(.bitmaps_last):
* xfaces.c (load_pixmap):
* xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
* xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
(.bitmaps_last, struct x_output.icon_bitmap):
Use ptrdiff_t, not int, for bitmap indexes.
(x_allocate_bitmap_record): Check for size overflow.
* dispextern.h, lisp.h: Adjust to API changes elsewhere.

13 years ago* buffer.c (OVERLAY_COUNT_MAX): New macro.
Paul Eggert [Tue, 21 Jun 2011 23:16:43 +0000 (16:16 -0700)]
* buffer.c (OVERLAY_COUNT_MAX): New macro.

(overlays_in, mouse_face_overlay_overlaps, Foverlays_in):
Use ptrdiff_t, not int, for sizes.
(overlays_in): Check for size-calculation overflow.

13 years agoSet :use-starttls-if-possible so that we always use STARTTLS if the server supports it.
Lars Magne Ingebrigtsen [Tue, 21 Jun 2011 22:55:52 +0000 (00:55 +0200)]
Set :use-starttls-if-possible so that we always use STARTTLS if the server supports it.

SMTP servers that support STARTTLS commonly require it.

13 years ago(smtpmail-via-smtp): Check for servers saying they want AUTH after MAIL FROM, too.
Lars Magne Ingebrigtsen [Tue, 21 Jun 2011 22:33:44 +0000 (00:33 +0200)]
(smtpmail-via-smtp): Check for servers saying they want AUTH after MAIL FROM, too.

13 years agonnimap.el (nnimap-find-article-by-message-id): return nil when no article found.
Andrew Cohen [Tue, 21 Jun 2011 22:13:24 +0000 (22:13 +0000)]
nnimap.el (nnimap-find-article-by-message-id): return nil when no article found.

13 years agoUse ptrdiff_t, not int, for overlay counts.
Paul Eggert [Tue, 21 Jun 2011 21:32:10 +0000 (14:32 -0700)]
Use ptrdiff_t, not int, for overlay counts.

* buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
* editfns.c (overlays_around, get_pos_property):
* textprop.c (get_char_property_and_overlay):
* xdisp.c (next_overlay_change, note_mouse_highlight):
* xfaces.c (face_at_buffer_position):
* buffer.c (overlays_at, sort_overlays, Foverlays_at)
(Fnext_overlay_change, Fprevious_overlay_change):
Use ptrdiff_t, not int, for sizes.
(overlays_at): Check for size-calculation overflow.

13 years agoRewritten smtpmail.el to use `open-network-stream' to do STARTTLS
Lars Magne Ingebrigtsen [Tue, 21 Jun 2011 21:10:52 +0000 (23:10 +0200)]
Rewritten smtpmail.el to use `open-network-stream' to do STARTTLS
upgrades opportunistically, and to only use auth-source for all
credentials.  Mostly backwards compatible, but
`smtpmail-auth-credentials' and `smtpmail-starttls-credentials' are
removed, and users who relied on those will have to put the
credentials in ~/.authinfo instead.

13 years ago(network-stream-certificate): Change cert-cert to cert and cert-key to key.
Lars Magne Ingebrigtsen [Tue, 21 Jun 2011 21:00:45 +0000 (23:00 +0200)]
(network-stream-certificate): Change cert-cert to cert and cert-key to key.

13 years agoPrefer the ~/.authinfo file over the ~/.authinfo.gpg file, especially when saving.
Lars Magne Ingebrigtsen [Tue, 21 Jun 2011 20:51:45 +0000 (22:51 +0200)]
Prefer the ~/.authinfo file over the ~/.authinfo.gpg file, especially when saving.

13 years ago* xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
Paul Eggert [Tue, 21 Jun 2011 20:43:08 +0000 (13:43 -0700)]
* xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.

13 years agoAdd support for client certificates for built-in and external STARTTLS.
Lars Magne Ingebrigtsen [Tue, 21 Jun 2011 20:39:08 +0000 (22:39 +0200)]
Add support for client certificates for built-in and external STARTTLS.

13 years ago* xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
Paul Eggert [Tue, 21 Jun 2011 20:32:19 +0000 (13:32 -0700)]
* xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.

(x_session_initialize): Do not assume string length fits in int.

13 years ago* net/tramp-cache.el (top): Don't load the persistency file when
Michael Albinus [Tue, 21 Jun 2011 19:51:26 +0000 (21:51 +0200)]
* net/tramp-cache.el (top): Don't load the persistency file when
"emacs -Q" has been called.

13 years agons-win: set ApplePressAndHoldEnabled to NO as it is unsupported.
David Reitter [Tue, 21 Jun 2011 18:45:36 +0000 (11:45 -0700)]
ns-win: set ApplePressAndHoldEnabled to NO as it is unsupported.
This is in preparation for OS X "Lion"; it is a stop-gap solution
until this new input mechanism is supported correctly.

13 years ago* xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font): Avoid need for...
Paul Eggert [Tue, 21 Jun 2011 17:52:14 +0000 (10:52 -0700)]
* xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font): Avoid need for strlen.

13 years ago* xsettings.c (apply_xft_settings): Fix potential buffer overrun.
Paul Eggert [Tue, 21 Jun 2011 17:49:46 +0000 (10:49 -0700)]
* xsettings.c (apply_xft_settings): Fix potential buffer overrun.

This is unlikely, but can occur if DPI is outlandish.

13 years ago* configure.in: Port alloca to AIX 3.
Paul Eggert [Tue, 21 Jun 2011 17:10:10 +0000 (10:10 -0700)]
* configure.in: Port alloca to AIX 3.

13 years agoMerge from trunk.
Paul Eggert [Tue, 21 Jun 2011 16:48:33 +0000 (09:48 -0700)]
Merge from trunk.

13 years agoPort to Sun C.
Paul Eggert [Tue, 21 Jun 2011 16:47:56 +0000 (09:47 -0700)]
Port to Sun C.

* composite.c (find_automatic_composition): Omit needless 'return 0;'
that Sun C diagnosed.
* fns.c (secure_hash): Fix pointer signedness issue.
* intervals.c (static_offset_intervals): New function.
(offset_intervals): Use it.

13 years agoUse gnulib's alloca-opt module.
Paul Eggert [Tue, 21 Jun 2011 16:15:07 +0000 (09:15 -0700)]
Use gnulib's alloca-opt module.

* .bzrignore: Add lib/alloca.h.
* Makefile.in (GNULIB_MODULES): Add alloca-opt.
* configure.in (AC_FUNC_ALLOCA): Remove almost all the alloca stuff,
as gnulib now does that for us.  Put alloca check after gl_INIT.
* lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
* lib/alloca.in.h, m4/alloca.m4: New files, from gnulib.

13 years agoDon't make popup frames unsplittable by default.
Martin Rudalics [Tue, 21 Jun 2011 15:16:32 +0000 (17:16 +0200)]
Don't make popup frames unsplittable by default.

(display-buffer-alist, display-buffer-default-specifiers): Don't
make new frame unsplittable by default.
(display-buffer-normalize-argument): Fix doc-string typo and use
'same-frame-other-window instead of 'other-window when associating
with display-buffer-macro-specifiers.

13 years agoAuto-commit of generated files.
Glenn Morris [Tue, 21 Jun 2011 10:18:39 +0000 (06:18 -0400)]
Auto-commit of generated files.

13 years agolisp/misc.el (list-dynamic-libraries): Fix computation of header fields.
Juanma Barranquero [Tue, 21 Jun 2011 10:04:28 +0000 (12:04 +0200)]
lisp/misc.el (list-dynamic-libraries): Fix computation of header fields.

13 years agoNew primitive secure-hash supporting md5, sha-1 and sha-2
Leo Liu [Tue, 21 Jun 2011 08:55:22 +0000 (16:55 +0800)]
New primitive secure-hash supporting md5, sha-1 and sha-2

13 years agoFix last fix of display-buffer-normalize-options.
Martin Rudalics [Tue, 21 Jun 2011 08:51:30 +0000 (10:51 +0200)]
Fix last fix of display-buffer-normalize-options.

13 years agoAdd crypto/sha256 and crypto/sha512 modules from gnulib
Leo Liu [Tue, 21 Jun 2011 08:45:39 +0000 (16:45 +0800)]
Add crypto/sha256 and crypto/sha512 modules from gnulib

13 years agoHandle old buffer display options more faithfully.
Martin Rudalics [Tue, 21 Jun 2011 08:29:43 +0000 (10:29 +0200)]
Handle old buffer display options more faithfully.

* window.el (display-buffer-alist): In default value do not
enforce searching a window on any but the selected frame.
Reported by Katsumi Yamaoka <yamaoka@jpl.org>.
(display-buffer-select-window): Remove function.
(display-buffer-in-window): When a window on another frame gets
reused, do not select it any more but just raise its frame if
necessary (Bug#8851) and (Bug#8856).
(display-buffer-normalize-options): Handle pop-up-frames related
options more faithfully.
(pop-to-buffer): Don't rely on `display-buffer' selecting the
window if it is on another frame.

13 years ago* font.c (font_intern_prop): Don't use string_to_number, since the string isn't null...
Paul Eggert [Tue, 21 Jun 2011 06:47:52 +0000 (23:47 -0700)]
* font.c (font_intern_prop): Don't use string_to_number, since the string isn't null-terminated.

13 years ago* lisp/play/5x5.el (5x5-solve-rotate-left, 5x5-solve-rotate-right): New funs.
Vincent Belaïche [Tue, 21 Jun 2011 03:16:02 +0000 (23:16 -0400)]
* lisp/play/5x5.el (5x5-solve-rotate-left, 5x5-solve-rotate-right): New funs.
(5x5-mode-map, 5x5-mode-menu): Bind them.
(5x5-draw-grid): Tweak the solver's rendering.

13 years ago* xselect.c (Fx_get_atom_name): Avoid need for strlen.
Paul Eggert [Tue, 21 Jun 2011 02:16:54 +0000 (19:16 -0700)]
* xselect.c (Fx_get_atom_name): Avoid need for strlen.

13 years ago* xrdb.c: Don't assume strlen fits in int; avoid some strlens.
Paul Eggert [Tue, 21 Jun 2011 02:15:16 +0000 (19:15 -0700)]
* xrdb.c: Don't assume strlen fits in int; avoid some strlens.

* xrdb.c (magic_file_p, search_magic_path):
Omit last arg SUFFIX; it was always 0.  All callers changed.
(magic_file_p): Use ptrdiff_t, not int.  Check for size overflow.

13 years ago* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Rename
Stefan Monnier [Tue, 21 Jun 2011 02:10:10 +0000 (22:10 -0400)]
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Rename
`caml' to `python-tracebacks-and-caml'; allow leading tabs.

Fixes: debbugs:8585
13 years ago* lisp/menu-bar.el: Use function variable instead of switch-to-buffer.
Drew Adams [Tue, 21 Jun 2011 01:49:36 +0000 (21:49 -0400)]
* lisp/menu-bar.el: Use function variable instead of switch-to-buffer.
(menu-bar-select-buffer-function): New variable.
(menu-bar-update-buffers): Use it.

13 years ago* lisp/emacs-lisp/bytecomp.el (add-to-list): Add handler to check the
Stefan Monnier [Tue, 21 Jun 2011 01:43:56 +0000 (21:43 -0400)]
* lisp/emacs-lisp/bytecomp.el (add-to-list): Add handler to check the
variable's status.

13 years ago* xfont.c (xfont_match): Avoid need for strlen.
Paul Eggert [Tue, 21 Jun 2011 01:40:45 +0000 (18:40 -0700)]
* xfont.c (xfont_match): Avoid need for strlen.

13 years ago* xfns.c: Don't assume strlen fits in int.
Paul Eggert [Tue, 21 Jun 2011 01:38:04 +0000 (18:38 -0700)]
* xfns.c: Don't assume strlen fits in int.

(xic_create_fontsetname, x_window): Use ptrdiff_t, not int.

13 years ago* xdisp.c (display_mode_element): Don't assume strlen fits in int.
Paul Eggert [Tue, 21 Jun 2011 01:30:32 +0000 (18:30 -0700)]
* xdisp.c (display_mode_element): Don't assume strlen fits in int.

13 years ago* xdisp.c (message_log_check_duplicate): Return intmax_t,
Paul Eggert [Tue, 21 Jun 2011 01:21:44 +0000 (18:21 -0700)]
* xdisp.c (message_log_check_duplicate): Return intmax_t,

not unsigned long, as we prefer signed integers.  All callers changed.
Detect integer overflow in repeat count.
(message_dolog): Don't assume print length fits in 39 bytes.

13 years ago* callproc.c (egetenv): Adjust to getenv_internal API change.
Paul Eggert [Tue, 21 Jun 2011 01:06:45 +0000 (18:06 -0700)]
* callproc.c (egetenv): Adjust to getenv_internal API change.

13 years agoMerge from trunk.
Paul Eggert [Tue, 21 Jun 2011 00:59:02 +0000 (17:59 -0700)]
Merge from trunk.

13 years ago* x-dnd.el (x-dnd-version-from-flags)
Jan Djärv [Mon, 20 Jun 2011 20:49:12 +0000 (22:49 +0200)]
* x-dnd.el (x-dnd-version-from-flags)
(x-dnd-more-than-3-from-flags): New functions that handle long-as-cons
and long as number.
(x-dnd-handle-xdnd): Call functions above.

Fixes: debbugs:8899
13 years ago* lisp/minibuffer.el (completion-metadata): Prepend the alist with `metadata'.
Stefan Monnier [Mon, 20 Jun 2011 20:16:20 +0000 (16:16 -0400)]
* lisp/minibuffer.el (completion-metadata): Prepend the alist with `metadata'.
(completion-try-completion, completion-all-completions): Compute the
metadata argument if it's missing; make it optional.

Fixes: debbugs:8795
13 years ago* doc/misc/eshell.texi (Known problems): Fix typo.
Stefan Monnier [Mon, 20 Jun 2011 16:14:01 +0000 (12:14 -0400)]
* doc/misc/eshell.texi (Known problems): Fix typo.

13 years agoUse completion-at-point rather than completion-in-region.
Stefan Monnier [Mon, 20 Jun 2011 16:02:31 +0000 (12:02 -0400)]
Use completion-at-point rather than completion-in-region.
* lisp/wid-edit.el: Use lexical scoping and move towards completion-at-point.
(widget-complete): Use new :completion-function property.
(widget-completions-at-point): New function.
(default): Use :completion-function instead of :complete.
(widget-default-completions): Rename from widget-default-complete, rewrite.
(widget-string-complete, widget-file-complete, widget-color-complete):
Remove functions.
(file, symbol, function, variable, coding-system, color):
* lisp/international/mule-cmds.el (default-input-method, charset)
(language-info-custom-alist):
* lisp/cus-edit.el (face): Use new property :completions.

* lisp/progmodes/pascal.el (pascal-completions-at-point): New function.
(pascal-mode): Use it.
(pascal-mode-map): Use completion-at-point.
(pascal-toggle-completions): Make obsolete.
(pascal-complete-word, pascal-show-completions):
* lisp/progmodes/octave-mod.el (octave-complete-symbol):
Redefine as obsolete alias.
* lisp/progmodes/octave-inf.el (inferior-octave-completion-at-point):
Signal absence of completion info for old Octave,
(inferior-octave-complete): Redefine as obsolete alias.
* lisp/progmodes/meta-mode.el: Use lexical-binding and completion-at-point.
(meta-completions-at-point): Rename from meta-complete-symbol and
adapt it for use on completion-at-point-functions.
(meta-common-mode): Use it.
(meta-looking-at-backward, meta-match-buffer): Remove.
(meta-complete-symbol): Redefine as obsolete alias.
(meta-common-mode-map): Use completion-at-point.
* lisp/progmodes/make-mode.el: Use lexical-binding and completion-at-point.
(makefile-mode-map): Use completion-at-point.
(makefile-completions-at-point): Rename from makefile-complete and
adapt it for use on completion-at-point-functions.
(makefile-mode): Use it.
(makefile-complete): Redefine as obsolete alias.

13 years ago* lisp/net/rcirc.el: Delete trailing whitespaces once and for all.
Deniz Dogan [Mon, 20 Jun 2011 12:55:24 +0000 (14:55 +0200)]
* lisp/net/rcirc.el: Delete trailing whitespaces once and for all.

13 years ago* src/process.c (Fset_process_buffer): Clarify return value in docstring.
Deniz Dogan [Mon, 20 Jun 2011 12:54:05 +0000 (14:54 +0200)]
* src/process.c (Fset_process_buffer): Clarify return value in docstring.

13 years agoRestore old behavior of get-window-with-predicate and get-buffer-window-list.
Martin Rudalics [Mon, 20 Jun 2011 08:41:57 +0000 (10:41 +0200)]
Restore old behavior of get-window-with-predicate and get-buffer-window-list.

* window.el (get-window-with-predicate): Start scanning with
window following selected window to restore Emacs 23 behavior.
Clarify doc-string.
(get-buffer-window-list): Start scanning with selected window to
restore Emacs 23 behavior.  Clarify doc-string.

13 years ago* termcap.c: Don't assume sizes fit in int and never overflow.
Paul Eggert [Mon, 20 Jun 2011 07:21:06 +0000 (00:21 -0700)]
* termcap.c: Don't assume sizes fit in int and never overflow.

(struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
(gobble_line): Check for size-calculation overflow.

13 years ago* minibuf.c (Fread_buffer): Don't assume strlen fits in int.
Paul Eggert [Mon, 20 Jun 2011 06:14:57 +0000 (23:14 -0700)]
* minibuf.c (Fread_buffer): Don't assume strlen fits in int.

13 years ago* lread.c (intern, intern_c_string): Don't assume strlen fits in int.
Paul Eggert [Mon, 20 Jun 2011 06:11:36 +0000 (23:11 -0700)]
* lread.c (intern, intern_c_string): Don't assume strlen fits in int.

13 years ago* keyboard.c (parse_tool_bar_item): Avoid need for strlen.
Paul Eggert [Mon, 20 Jun 2011 06:07:16 +0000 (23:07 -0700)]
* keyboard.c (parse_tool_bar_item): Avoid need for strlen.

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

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

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

13 years ago* emacs-lisp/syntax.el (syntax-ppss): Further improve docstring.
Daniel Colascione [Mon, 20 Jun 2011 03:36:16 +0000 (20:36 -0700)]
* emacs-lisp/syntax.el (syntax-ppss): Further improve docstring.

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

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

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

13 years agoFix last change.
Chong Yidong [Sun, 19 Jun 2011 18:59:58 +0000 (14:59 -0400)]
Fix last change.

13 years ago* lisp/files.el (auto-mode-alist): Entry for m2-mode (Bug#8852).
Chong Yidong [Sun, 19 Jun 2011 18:53:49 +0000 (14:53 -0400)]
* lisp/files.el (auto-mode-alist): Entry for m2-mode (Bug#8852).

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

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

13 years ago* info.el (Info-apropos-toc-nodes): Minor doc fix (Bug#8833).
Chong Yidong [Sun, 19 Jun 2011 18:42:06 +0000 (14:42 -0400)]
* info.el (Info-apropos-toc-nodes): Minor doc fix (Bug#8833).

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

13 years agoAuto-commit of loaddefs files.
Glenn Morris [Sun, 19 Jun 2011 18:39:24 +0000 (14:39 -0400)]
Auto-commit of loaddefs files.

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

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

13 years agoAuto-commit of generated files.
Glenn Morris [Sun, 19 Jun 2011 18:33:17 +0000 (14:33 -0400)]
Auto-commit of generated files.

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

13 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.'

13 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'.

13 years ago* lib/unistd.in.h, m4/getloadavg.m4: Merge from gnulib.
Paul Eggert [Sun, 19 Jun 2011 18:22:16 +0000 (11:22 -0700)]
* lib/unistd.in.h, m4/getloadavg.m4: Merge from gnulib.

13 years agoRegroup clauses in display-buffer-normalize-options (Bug#8851) and (Bug#8856).
Martin Rudalics [Sun, 19 Jun 2011 14:32:12 +0000 (16:32 +0200)]
Regroup clauses in display-buffer-normalize-options (Bug#8851) and (Bug#8856).

* window.el (display-buffer-normalize-options): Move special-display-p
group after pop-up-frame group (Bug#8851) and (Bug#8856).

13 years agoProvide functions for saving window configurations as Lisp objects.
Martin Rudalics [Sun, 19 Jun 2011 10:17:56 +0000 (12:17 +0200)]
Provide functions for saving window configurations as Lisp objects.

* window.el (window-list-no-nils, window-state-ignored-parameters)
(window-state-get-1, window-state-get, window-state-put-list)
(window-state-put-1, window-state-put-2, window-state-put): New
functions.

13 years agoSanitize processing of display specifiers; new option frame-auto-delete.
Martin Rudalics [Sun, 19 Jun 2011 09:59:58 +0000 (11:59 +0200)]
Sanitize processing of display specifiers; new option frame-auto-delete.

* window.el (display-buffer-other-window-means-other-frame):
Call display-buffer-normalize-alist.
(display-buffer-normalize-specifiers-1): Rename to
display-buffer-normalize-argument.  New argument other-frame.
Rewrite.
(display-buffer-normalize-specifiers-2): Rename to
display-buffer-normalize-options.
(display-buffer-normalize-alist-1): New function.
(display-buffer-normalize-specifiers-3): Rename to
display-buffer-normalize-alist.  Call
display-buffer-normalize-alist-1.
(display-buffer-normalize-options-inhibit): New variable.
(display-buffer-normalize-specifiers): Rewrite calling
display-buffer-normalize-alist,
display-buffer-normalize-argument, and
display-buffer-normalize-options.  Don't call the latter if
display-buffer-normalize-options-inhibit is non-nil.
(frame-auto-delete): New option.
(window-deletable-p): Use frame-auto-delete.