Julien Danjou [Tue, 22 Mar 2011 13:40:41 +0000 (13:40 +0000)]
mm-view.el (mm-display-inline-fontify): Make mode optional, and call normal-mode if not set. Set temp buffer unmodified to avoid kill-buffer query.
(mm-inline-text): Render normal text with fontification whenever possible.
gnus-sum.el (gnus-summary-save-parts-1):
gnus-art.el (gnus-article-browse-html-save-cid-content)
(gnus-article-browse-html-parts, gnus-mime-delete-part)
(gnus-mime-copy-part, gnus-mime-inline-part, gnus-insert-mime-button):
Use `mm-handle-filename'.
mm-util.el (mm-handle-filename): New function, return the filename of an handle.
* image.el (image-type-file-name-regexps): Make it variable.
`imagemagick-register-types' modifies it, and the user may want
to add new extensions for known image types.
(imagemagick-register-types): Throw error if not using ImageMagick.
Paul Eggert [Tue, 22 Mar 2011 08:10:11 +0000 (01:10 -0700)]
* xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
This is less likely to overflow, and avoids undefined behavior if
overflow does occur. All callers changed. Use strtoul to scan
for the unsigned long integer.
Chong Yidong [Tue, 22 Mar 2011 00:30:23 +0000 (20:30 -0400)]
Special handling of the `custom-enabled-themes' custom variable.
* lisp/custom.el (custom--inhibit-theme-enable): Make it affect only
custom-theme-set-variables and custom-theme-set-faces.
(provide-theme): Ignore custom--inhibit-theme-enable.
(load-theme): Enable the theme explicitly if NO-ENABLE is non-nil.
(custom-enabling-themes): Delete variable.
(enable-theme): Accept only loaded themes as arguments. Ignore
the special custom-enabled-themes variable.
(custom-enabled-themes): Forbid themes from setting this.
Eliminate use of custom-enabling-themes.
(custom-push-theme): Quote "changed" custom var entry.
Paul Eggert [Mon, 21 Mar 2011 18:03:15 +0000 (11:03 -0700)]
* ebrowse.c: Use size_t, not int, for sizes.
This avoids a warning with gcc -Wstrict-overflow, and works
better for very large objects.
(inbuffer_size): Now size_t. All uses changed.
(xmalloc, xrealloc, operator_name, process_file): Use size_t for
sizes. Don't bother testing whether a size_t value can be negative.
Leo Liu [Mon, 21 Mar 2011 17:48:36 +0000 (01:48 +0800)]
Fix history adding in ido-read-internal
Assume, for example, the head of matches is "RSS" and user input is
"rs". If the user hit RET, "RSS" is selected but "rs" is added to the
history. This commit fixes this inconsistency.
Paul Eggert [Mon, 21 Mar 2011 16:40:05 +0000 (09:40 -0700)]
etags: In Prolog functions, don't assume int fits in size_t.
This avoids a warning with gcc -Wstrict-overflow.
* etags.c (Prolog_functions, prolog_pr, prolog_atom): Use size_t,
not int, to store sizes.
(prolog_atom): Return 0, not -1, on error. All callers changed.
Paul Eggert [Mon, 21 Mar 2011 07:46:53 +0000 (00:46 -0700)]
update-game-score: fix bug with -r
* update-game-score.c (main): Don't set 'scores' to garbage when
-r is specified and scorecount != MAX_SCORES. This bug was
introduced in the 2002-04-10 change, and was found with gcc
-Wstrict-overflow (GCC 4.5.2, x86-64).
Paul Eggert [Mon, 21 Mar 2011 05:04:41 +0000 (22:04 -0700)]
[ChangeLog]
fakemail: Remove dependency on ignore-value.
* Makefile.in (GNULIB_MODULES): Add stdio.
* lib/stdio.in.h, m4/stdio_h.m4: New files, automatically
imported from gnulib.
[lib-src/ChangeLog]
fakemail: Remove dependency on ignore-value.
This undoes some of the recent fakemail-related changes.
It is made possible due to recent changes to gnulib's stdio module.
* Makefile.in (fakemail${EXEEXT}): Do not depend on ignore-value.h.
* fakemail.c: Do not include ignore-value.h.
(put_line): Do not use ignore_value.
* autogen/: New directory, to be excluded from releases.
* autogen/copy_autogen, autogen/update_autogen: New scripts.
* autogen/README: New file.
* autogen/aclocal.m4, autogen/config.in, autogen/configure:
* autogen/Makefile.in: Add auto-updated generated files.
* autogen.sh: No longer a no-op, now it tests for autotools
and runs them as necessary.
* minibuf.c (Vcompleting_read_function): Don't declare, global variables
are now in src/globals.h.
(syms_of_minibuf): Remove spurious & from previous change.
Christian Ohler [Sun, 20 Mar 2011 10:17:10 +0000 (21:17 +1100)]
* emacs-lisp/ert.el (ert-run-tests-batch): Remove unused variable.
(ert-delete-all-tests): Use `called-interactively-p' rather than
`interactive-p'.
(ert--make-xrefs-region): Respect END.
Paul Eggert [Sat, 19 Mar 2011 22:46:50 +0000 (15:46 -0700)]
Make tparam.h and terminfo.c consistent.
* cm.c (tputs, tgoto, BC, UP): Remove extern decls. Include
tparam.h instead, since it declares them.
* cm.h (PC): Remove extern decl; tparam.h now does this.
* deps.mk (cm.o, terminfo.o): Depend on tparam.h.
* terminfo.c: Include tparam.h, to check interfaces.
(tparm): Make 1st arg a const pointer in decl. Put it at top level.
(tparam): Adjust signature to match interface in tparam.h;
this removes some undefined behavior. Check that outstring and len
are zero, which they always are with Emacs.
* tparam.h (PC, BC, UP): New extern decls.
Chong Yidong [Sat, 19 Mar 2011 21:37:21 +0000 (17:37 -0400)]
Fix facemenu to populate buffer inside the with-help-window call.
See http://lists.gnu.org/archive/html/emacs-devel/2011-02/msg01193.html
* facemenu.el (list-colors-display): Call list-faces-display from
inside with-help-window.
(list-colors-print): Use display property to align the final
column, instead of checking window-width.
Chong Yidong [Sat, 19 Mar 2011 18:27:55 +0000 (14:27 -0400)]
Fix tar package handling, and clean up package-subdirectory-regexp usage.
* lisp/startup.el (package-subdirectory-regexp): Move from package.el.
Omit \\` and \\', and let callers add them.
* lisp/emacs-lisp/package.el (package-strip-version)
(package-load-all-descriptors): Add \\` and \\' to
package-subdirectory-regexp before using it.
(package-untar-buffer): New arg DIR; ensure that file untars only
into this expected directory. Remove superfluous delete-region.
(package-unpack): Caller changed.
(package-tar-file-info): Use package-subdirectory-regexp.
Chong Yidong [Sat, 19 Mar 2011 16:42:53 +0000 (12:42 -0400)]
Backport fix for Bug#8219 from trunk.
* buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
(BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
These macros can no longer be used for assignment.
* buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Assign
struct members directly, instead of using BUF_BEGV etc.
(record_buffer_markers, fetch_buffer_markers): New functions for
recording and fetching special buffer markers.
(set_buffer_internal_1, set_buffer_temp): Use them.
* lread.c (unreadchar): Use SET_BUF_PT_BOTH.
* insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
* intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
(get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
* xdisp.c (hscroll_window_tree):
(reconsider_clip_changes): Use PT instead of BUF_PT.
Eli Zaretskii [Sat, 19 Mar 2011 09:30:56 +0000 (11:30 +0200)]
Fix emerge.el on MS-Windows and MS-DOS.
lisp/emerge.el (emerge-metachars): Separate value for ms-dos and
windows-nt systems.
(emerge-protect-metachars): Quote correctly for ms-dos and
windows-nt systems.
Paul Eggert [Sat, 19 Mar 2011 00:12:53 +0000 (17:12 -0700)]
character.h: Rename locals to avoid shadowing.
* character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
(FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
(FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
(BUF_DEC_POS): Be more systematic about renaming local temporaries
to avoid shadowing.
Stefan Monnier [Fri, 18 Mar 2011 19:52:05 +0000 (15:52 -0400)]
* vc/diff-mode.el (diff-mode-map): Shadow problematic bindings from
diff-mode-shared-map.
(diff-mode-shared-map): Re-introduce some bindings that were problematic.
Gnus developers [Fri, 18 Mar 2011 13:45:04 +0000 (13:45 +0000)]
Merge changes made in Gnus trunk.
message.texi (Various Commands): Document format specs in the ellipsis.
time-date.el (format-seconds): Use assoc instead of assoc-string to avoid warning on XEmacs.
gnus-art.el: Require mouse, which the build bot seems to say is needed.
gravatar.el (gravatar-retrieve-synchronously): Use `url-retrieve' on XEmacs, since it doesn't have url-retrieve-synchronously.
time-date.el (format-seconds): Use assoc instead of assoc-string, since assoc-string doesn't exist in XEmacs.
gnus-group.el (gnus-group-list-ticked): New function.
(gnus-group-make-menu-bar): Provide a menu entry for it.
(gnus-group-list-map): Provide a binding for it.
shr.el (shr-visit-file): New command.
nnimap.el (nnimap-fetch-inbox): Rewrite slightly last patch.
nnimap.el (nnimap-fetch-inbox): Don't download bodies on ver4-capable servers.