Fix bad interaction between icomplete and completion inline help (Bug#5849).
* lisp/minibuffer.el (completion-show-inline-help): New var.
(completion--do-completion, minibuffer-complete)
(minibuffer-force-complete, minibuffer-complete-word): Inhibit
minibuffer messages if completion-show-inline-help is nil.
* lisp/icomplete.el (icomplete-mode): Bind completion-show-inline-help
to avoid interference from inline help.
Eli Zaretskii [Sun, 10 Apr 2011 20:43:08 +0000 (23:43 +0300)]
Fix write-region and its subroutines for buffers > 2GB.
src/fileio.c (a_write, e_write): Modify declaration of arguments and
local variables to support buffers larger than 2GB.
(Fcopy_file): Use EMACS_INT for return value of emacs_read.
src/sysdep.c (emacs_write, emacs_read): Use ssize_t for last
argument, local variables, and return value.
src/lisp.h: Update prototypes of emacs_write and emacs_read.
src/sound.c (vox_write): Use ssize_t for return value of emacs_write.
Jim Meyering [Sun, 10 Apr 2011 14:00:13 +0000 (16:00 +0200)]
use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
* gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
return ssize_t not "int", and use size_t as the buffer length.
(emacs_gnutls_write): Likewise, and make the buffer pointer "const".
* gnutls.h: Update declarations.
* process.c (read_process_output): Use ssize_t, to match.
(send_process): Likewise.
* lisp/image-mode.el (image-toggle-display-image): Signal an error if
not in Image mode.
(image-transform-mode, image-transform-resize)
(image-transform-set-rotation): Doc fix.
(image-transform-set-resize): Deleted.
(image-transform-set-scale, image-transform-fit-to-height)
(image-transform-fit-to-width): Handle image-toggle-display-image
and image-transform-resize directly.
* src/image.c (Fimagemagick_types): Doc fix, and comment cleanup.
Paul Eggert [Sat, 9 Apr 2011 20:19:05 +0000 (13:19 -0700)]
* callint.c (Fcall_interactively): <, not <=, for optimization.
(Fcall_interactively): Count the number of arguments produced,
not the number of arguments given. This is simpler and lets GCC
4.6.0 generate slightly better code.
Paul Eggert [Sat, 9 Apr 2011 19:14:12 +0000 (12:14 -0700)]
* ftfont.c: Distingish more carefully between FcChar8 and char.
The previous code passed unsigned char * to a functions like
strlen and xstrcasecmp that expect char *, which does not
conform to the C standard.
(get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
arguments to FcPatternGetString, and explicitly cast FcChar8 * to
char * when the C standard requires it.
Eli Zaretskii [Sat, 9 Apr 2011 06:59:26 +0000 (09:59 +0300)]
Produce more accurate results from file-size-human-readable.
lisp/files.el (file-size-human-readable): Produce one digit after
decimal, like "ls -lh" does.
lisp/ls-lisp.el (ls-lisp-format-file-size): Allow for 7 characters in
the file size representation.
Paul Eggert [Fri, 8 Apr 2011 23:28:52 +0000 (16:28 -0700)]
* eval.c: Port to Windows vsnprintf (Bug#8435).
Include <limits.h>.
(SIZE_MAX): Define if the headers do not.
(verror): Do not give up if vsnprintf returns a negative count.
Instead, grow the buffer. This ports to Windows vsnprintf, which
does not conform to C99. Problem reported by Eli Zaretskii.
Also, simplify the allocation scheme, by avoiding the need for
calling realloc, and removing the ALLOCATED variable.
* doc-view.el (doc-view-fit-width-to-window)
(doc-view-fit-height-to-window, doc-view-fit-page-to-window): New
functions for fitting the shown image to the Emacs window size.
(doc-view-mode-map): Add bindings for the new functions.
Eli Zaretskii [Fri, 8 Apr 2011 15:31:33 +0000 (18:31 +0300)]
New function file-size-human-readable.
lisp/files.el (file-size-human-readable): New function.
lisp/ls-lisp.el (ls-lisp-format-file-size): Use it, instead of
computing the representation inline. Don't require `cl'.
* lisp/vc/log-edit.el (log-edit-empty-buffer-p): New function.
(log-edit-insert-cvs-template, log-edit-insert-cvs-rcstemplate):
Use log-edit-empty-buffer-p.
gnus-registry.el (gnus-registry-handle-action): More debugging.
gnus-start.el (gnus-gnus-to-newsrc-format): Add a way to run interactively so the newsrc file can contain foreign groups too. Useful for debugging but not much for users.
registry.el (registry-usage-test): Only do `registry-lookup-breaks-before-lexbind' testing for Emacs24 with lexical binding.
Paul Eggert [Thu, 7 Apr 2011 03:34:05 +0000 (20:34 -0700)]
error: Print 32- and 64-bit integers portably (Bug#8435).
Without this change, on typical 64-bit hosts error ("...%d...", N)
was used to print both 32- and 64-bit integers N, which relied on
undefined behavior.
* lisp.h, src/m/amdx86-64.h, src/m/ia64.h, src/m/ibms390x.h (pEd):
New macro.
* lisp.h (error, verror): Mark as printf-like functions.
* eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
Report overflow in size calculations when allocating printf buffer.
Do not truncate output string at its first null byte.
* xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
Truncate the output at a character boundary, since vsnprintf does not
do that.
* charset.c (check_iso_charset_parameter): Convert internal
character to string before calling 'error', since %c now has the
printf meaning.
* coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
overflow when computing char to be passed to 'error'. Do not
pass Lisp_Object to 'error'; pass the integer instead.
* nsfns.m (Fns_do_applescript): Use int, not long, since it's
formatted with plain %d.
registry.el, gnus-registry.el: Use `ignore-errors' instead of third argument NOERROR for `require', since XEmacs 21.4 does not support it.
registry.el (initialize-instance): Change :after to :AFTER to be compatible with old EIEIO version in XEmacs.
gnus-registry.el (gnus-registry-post-process-groups)
(gnus-registry--split-fancy-with-parent-internal): Fix splitting bugs and provide better messaging.
gnus-registry.el: Load ERT unconditionally anyway, discarding errors.
registry.el: Load ERT unconditionally anyway, discarding errors.
* lisp/simple.el: Lisp reimplement of list-processes. Based on an
earlier reimplementation by Leo Liu, but using tabulated-list.el.
(process-menu-mode): New major mode.
(list-processes--refresh, list-processes):
(process-menu-visit-buffer): New functions.
* lisp/files.el (save-buffers-kill-emacs): Don't assume any return
value of list-processes, which is undocumented anyway.
* emacs-lisp/package.el: Use Tabulated List mode.
(package-menu-mode-map): Inherit from tabulated-list-mode-map.
(package-menu-mode): Derive from tabulated-list-mode. Set up the
table format using Tabulated List mode variables.
(package--push): New macro, replacing package-list-maybe-add.
(package-menu--generate): Use package--push. Renamed from
package--generate-package-list.
(package-menu-refresh, list-packages): Use it.
(package-menu--print-info): Renamed from package-print-package.
Return insertion data instead of inserting it directly.
(package-menu-describe-package, package-menu-execute): Use
tabulated-list-get-id.
(package-menu-mark-delete, package-menu-mark-install)
(package-menu-mark-unmark, package-menu-backup-unmark)
(package-menu-mark-obsolete-for-deletion): Use
tabulated-list-put-tag.
(package--list-packages, package-menu-revert)
(package-menu-get-package, package-menu-get-version)
(package-menu-sort-by-column): Functions deleted.
(package-menu-package-list, package-menu-sort-key): Vars deleted.
(package-menu--status-predicate, package-menu--version-predicate)
(package-menu--name-predicate)
(package-menu--description-predicate): Handle arguments in the
Tabulated List format.
(package-list-packages-no-fetch): Call list-packages.
* lisp/files.el (after-find-file-from-revert-buffer): Remove variable.
(after-find-file): Dont' bind it.
(revert-buffer-in-progress-p): New variable.
(revert-buffer): Bind it.
Pass nil for `after-find-file-from-revert-buffer'.
* lisp/saveplace.el (save-place-find-file-hook): Use new variable
`rever-buffer-in-progress-p', not `after-find-file-from-revert-buffer'.
* etc/NEWS: New variable `revert-buffer-in-progress-p'.
Eli Zaretskii [Wed, 6 Apr 2011 17:49:21 +0000 (20:49 +0300)]
Adapt the MS-DOS build to changes in gnulib.
msdos/sedlibmk.inp: Update checklist.
(am_libgnu_a_OBJECTS): Remove careadlinkat.$(OBJEXT).
($(top_builddir)/config.status): Edit away, both as target and in
prerequisites.
(@am__fastdepCC_FALSE@): Fix editing.
(@GL_GENERATE_STDBOOL_H_TRUE@, @GL_GENERATE_STDBOOL_H_FALSE@)
(@GL_GENERATE_STDDEF_H_TRUE@, @GL_GENERATE_STDDEF_H_FALSE@)
(@GL_GENERATE_STDINT_H_TRUE@, @GL_GENERATE_STDINT_H_FALSE@): Edit
to either nothing or "#".
src/msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
Eli Zaretskii [Wed, 6 Apr 2011 15:44:32 +0000 (18:44 +0300)]
Fix the Windows build due to introduction of ATTRIBUTE_FORMAT_PRINTF.
nt/config.nt (NO_INLINE, ATTRIBUTE_FORMAT)
(ATTRIBUTE_FORMAT_PRINTF): Define, as followup to 2011-04-06T05:19:39Z!eggert@cs.ucla.edu
on the trunk on 2011-04-06.
gnus-registry.el: Don't use ERT if it's not available.
(gnus-registry-delete-entries): New convenience function.
(gnus-registry-import-eld): Import from old .eld registry.
registry.el: Don't use ERT if it's not available.
proto-stream.el (gnutls-negotiate): Revert inadvertent commit of the version from the Claudio Bley GnuTLS patch (extra optional parametersnand host name).
Make update_autogen handle loaddefs-like files as well.
* autogen/update_autogen: (usage): Add -l, -C.
(clean, ldefs_flag, ldefs_in, ldefs_out): New variables.
With -l, check status of lisp/ as well.
With -C, clean before building.
(autoreconf): Only pass -f in the `clean' case.
(commit): New function.
* lisp/Makefile.in (AUTOGEN_VCS): New variable.
(autoloads): Use $AUTOGEN_VCS.
* .bzrignore: Tighten up ignore patterns (for autogen/).
Backport 2011-04-04T22:08:01Z!lekktu@gmail.com and 2011-04-04T22:33:12Z!lekktu@gmail.com from trunk.
* help-fns.el (describe-variable): Complete all variables having
documentation, including keywords.
http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00112.html
gnus-registry.el (gnus-registry-fixup-registry): New function to fixup the parameters that can be customized by the user between save/read cycles.
(gnus-registry-read): Use it.
(gnus-registry-make-db): Use it.
(gnus-registry-spool-action, gnus-registry-handle-action): Fix messaging.
(gnus-registry--split-fancy-with-parent-internal): Fix loop. Map references to actual group names with sender and subject tracking.
(gnus-registry-post-process-groups): Use `cond' for better messaging.
(gnus-registry-usage-test): Add subject lookup test.
registry.el (registry-db, initialize-instance): Set up constructor instead of :initform arguments for the sake of older Emacsen.
(registry-lookup-breaks-before-lexbind): New method to demonstrate pre-lexbind merge bug.
(registry-usage-test): Use it.
(initialize-instance, registry-db): Move the non-function initforms back to the class definition.
registry.el: New library to manage gnus-registry-style data.
gnus-registry.el: Use it (major rewrite).
nnregistry.el: Use it.
spam.el: Use it.
Remove extraneous messages in 2011-03-30 completion change.
These blocked the minibuffer contents when completing in the minibuffer, in a
departure from previous Emacs behavior.