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.
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/).
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.
Paul Eggert [Tue, 5 Apr 2011 06:41:53 +0000 (23:41 -0700)]
* coding.c (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
directly, rather than having caller test rule sign. This avoids
some unnecessary tests.
* composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
(COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
Paul Eggert [Mon, 4 Apr 2011 19:46:32 +0000 (12:46 -0700)]
* composite.h (COMPOSITION_DECODE_REFS): New macro,
breaking out part of COMPOSITION_DECODE_RULE.
(COMPOSITION_DECODE_RULE): Use it.
* composite.c (get_composition_id): Remove unused local vars,
by using the new macro.
gnus-sum.el (gnus-update-marks): Reinstate the code to not alter marks on non-selected articles.
gnus-start.el (gnus-get-unread-articles): Don't try to contact denied servers.
Improvements to flyspell-mark-duplications-exceptions.
* lisp/textmodes/flyspell.el (flyspell-word): Recognize default
dictionary case for flyspell-mark-duplications-exceptions. Use
regexp matching for languages.
(flyspell-mark-duplications-exceptions): Add "that" and "had" for
default dictionary (Bug#7926).
* xdisp.c (display_count_lines): Remove parameter `start',
unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
(get_char_face_and_encoding): Remove parameter `multibyte_p',
unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
(fill_stretch_glyph_string): Remove parameters `row' and `area',
unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
and thereabouts. All callers changed.
(get_per_char_metric): Remove parameter `f', unused since
2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.