Glenn Morris [Thu, 3 Feb 2011 07:37:43 +0000 (23:37 -0800)]
Small faq.texi changes.
* doc/misc/faq.texi (Contacting the FSF): Mainly just refer to the web-site.
(Binding combinations of modifiers and function keys):
Let's assume people reading this are not using Emacs 18.
Glenn Morris [Thu, 3 Feb 2011 07:33:16 +0000 (23:33 -0800)]
* lisp/vc/vc-hg.el (vc-hg-command): Doc fix.
Glenn Morris [Thu, 3 Feb 2011 07:31:42 +0000 (23:31 -0800)]
* lisp/term/w32-win.el (libpng-version): Declare for compiler.
Glenn Morris [Thu, 3 Feb 2011 07:29:38 +0000 (23:29 -0800)]
* lisp/msb.el: No need to load dired while compiling.
Glenn Morris [Thu, 3 Feb 2011 07:27:59 +0000 (23:27 -0800)]
elint.el trivia.
* lisp/emacs-lisp/elint.el (elint-standard-variables):
Remove a couple of built-ins that now have doc-strings.
Glenn Morris [Thu, 3 Feb 2011 07:25:14 +0000 (23:25 -0800)]
Silence some compiler warnings.
* lisp/gnus/nnheader.el (gnus-range-add, gnus-remove-from-range): Autoload.
* lisp/gnus/nnimap.el (gnus-fetch-headers): Declare.
Glenn Morris [Thu, 3 Feb 2011 07:21:56 +0000 (23:21 -0800)]
`require' is automatically `eval-and-compile'd.
* hi-lock.el, ps-bdf.el, ps-mule.el, ps-print.el, ps-samp.el:
`require' is automatically `eval-and-compile'd.
Glenn Morris [Thu, 3 Feb 2011 07:15:31 +0000 (23:15 -0800)]
* lisp/obsolete/spell.el: Fix header comment.
Glenn Morris [Thu, 3 Feb 2011 07:14:02 +0000 (23:14 -0800)]
rcirc.el trivia.
* lisp/net/rcirc.el (rcirc-nick-completion-format): Add :version tag.
(rcirc-log-directory, rcirc-log-flag): Move definitions before use.
Glenn Morris [Thu, 3 Feb 2011 07:11:31 +0000 (23:11 -0800)]
strokes.el trivia.
* lisp/strokes.el (strokes-fill-current-buffer-with-whitespace):
Move definition before use.
(strokes-report-bug): Make it obsolete.
Glenn Morris [Thu, 3 Feb 2011 07:09:50 +0000 (23:09 -0800)]
bzrmerge.el trivia.
* admin/bzrmerge.el (bzrmerge-buffer): New constant.
(bzrmerge-merges, bzrmerge-missing, bzrmerge-apply): Use it.
(bzrmerge-missing): If nothing to do, return nil not (nil).
(bzrmerge-apply): Remove odd character from message.
(bzrmerge): Give status messages.
Lars Ingebrigtsen [Thu, 3 Feb 2011 06:23:35 +0000 (22:23 -0800)]
Fix the ChangeLog message to be more legible.
Lars Ingebrigtsen [Thu, 3 Feb 2011 06:22:07 +0000 (22:22 -0800)]
(url-http-wait-for-headers-change-function): Don't move if the callback function has moved point.
Lars Ingebrigtsen [Thu, 3 Feb 2011 05:26:36 +0000 (05:26 +0000)]
message.el (message-forward-make-body-digest-plain)
(message-followup, message-reply): Clean up things noted by Stefan.
Lars Ingebrigtsen [Thu, 3 Feb 2011 05:21:20 +0000 (05:21 +0000)]
gnus-art.el (gnus-article-date-headers): Rip out the old -treat-date-* stuff, since it didn't really work with defcustom.
(article-update-date-lapsed): Make sure the window start doesn't move, either.
Lars Ingebrigtsen [Thu, 3 Feb 2011 05:01:44 +0000 (05:01 +0000)]
gnus-art.el (gnus-article-setup-buffer): Stop the date timer if gnus-article-update-date-headers is nil.
gnus.texi (Article Date): Remove mention of gnus-stop-date-timer, since it's run automatically.
Chong Yidong [Wed, 2 Feb 2011 20:44:19 +0000 (15:44 -0500)]
* modes.texi (Major Mode Conventions): Add face guidelines.
(Faces for Font Lock): List faces in order of prominence.
Eli Zaretskii [Wed, 2 Feb 2011 19:50:21 +0000 (21:50 +0200)]
lib-src/makefile.w32-in (obj): Remove strftime.o, it's not in src/.
Sam Steingold [Wed, 2 Feb 2011 17:59:44 +0000 (12:59 -0500)]
* lisp/apropos.el (apropos-print): Now that `apropos-mode' inherits
from `special-mode', entering it makes the buffer read-only, so
call it only when everything has been already inserted.
* lisp/emacs-lisp/ert.el (ert--setup-results-buffer)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-timings): Ditto.
* lisp/emacs-lisp/package.el (package--list-packages): Ditto.
* lisp/play/solitaire.el (solitaire): Ditto.
Chong Yidong [Wed, 2 Feb 2011 17:26:04 +0000 (12:26 -0500)]
* etc/themes/tango-theme.el: Remove some non-Tango face colors.
Chong Yidong [Wed, 2 Feb 2011 17:14:49 +0000 (12:14 -0500)]
* progmodes/compile.el: Make all faces inherit from font-lock faces.
(compilation-warning): Inherit from font-lock-variable-name-face.
(compilation-info): Inherit from font-lock-type-face.
(compilation-line-number): Reassign to font-lock-keyword-face.
(compilation-column-number): Reassign to font-lock-doc-face.
(compilation-leave-directory-face): Reassign to font-lock-builtin-face.
Eli Zaretskii [Wed, 2 Feb 2011 16:28:24 +0000 (18:28 +0200)]
Make "etags --version" on Windows produce the same as on Posix platforms.
makefile.w32-in (ETAGS_CFLAGS, CTAGS_CFLAGS): Add
``-DEMACS_NAME="\"GNU Emacs\""''.
Eli Zaretskii [Wed, 2 Feb 2011 16:21:52 +0000 (18:21 +0200)]
Fix Dired on DOS/Windows.
dired.el (dired-insert-directory): Don't invoke `ls' when
ls-lisp.el is used to emulate it.
Chong Yidong [Wed, 2 Feb 2011 03:36:29 +0000 (22:36 -0500)]
etc/themes/wheatgrass-theme.el: Apply min-colors setting to face definitions.
Julien Danjou [Tue, 1 Feb 2011 23:46:27 +0000 (23:46 +0000)]
mm-uu.el (mm-uu-type-alist): Add support for git format-patch diff format.
mm-decode.el (mm-inline-media-tests): Do not check for diff-mode it's standard in Emacs nowadays.
color.el (color-gradient): Add a color-gradient function.
Sam Steingold [Tue, 1 Feb 2011 21:37:12 +0000 (16:37 -0500)]
undo 2011-02-01T18:15:18Z!sds@gnu.org (purecopy-cons, purecopy-car) at Stefan Monnier's request
Sam Steingold [Tue, 1 Feb 2011 21:22:21 +0000 (16:22 -0500)]
* lisp/simple.el (special-mode-map): Bind "h" to `describe-mode';
bind "z" to `kill-this-buffer'.
(completion-list-mode-map): Bind "z" to `kill-this-buffer'.
* lisp/apropos.el (apropos-mode-map): Inherit from `special-mode-map'.
(apropos-mode): Inherit from `special-mode'.
* lisp/arc-mode.el (archive-mode-map): Inherit from `special-mode-map'.
* lisp/bookmark.el (bookmark-bmenu-mode): Define using
`define-derived-mode' inheriting from `special-mode'.
* lisp/dired.el (dired-mode-map): Inherit from `special-mode-map'.
* lisp/image-mode.el (image-mode-map): Ditto.
* lisp/replace.el (occur-mode): Define using
`define-derived-mode' inheriting from `special-mode'.
* lisp/tar-mode.el (tar-mode): Inherit from `special-mode'.
* lisp/calendar/diary-lib.el (diary-fancy-display-mode):
Inherit from `special-mode-map'.
* lisp/emacs-lisp/ert.el (ert-simple-view-mode, ert-results-mode):
Inherit from `special-mode'.
* lisp/emacs-lisp/package.el (package-menu-mode-map): Copy from
`special-mode-map'.
(package-menu-mode): Define using `define-derived-mode'
inheriting from `special-mode'.
* erc/erc-list.el (erc-list-menu-mode): Inherit from `special-mode'.
* lisp/net/xesam.el (xesam-mode): Inherit from `special-mode'.
(xesam-mode-map): Define separately.
* lisp/play/solitaire.el (solitaire-mode): Inherit from `special-mode'.
* lisp/progmodes/compile.el (compilation-minor-mode-map)
(compilation-mode-map): Inherit from `special-mode-map'.
* lisp/vc/diff-mode.el (diff-mode-shared-map):
Inherit from `special-mode-map'.
* lisp/vc/log-view.el (log-view-mode-map): Add a comment.
Eli Zaretskii [Tue, 1 Feb 2011 19:46:21 +0000 (21:46 +0200)]
Fix a compiler warning in image.c.
image.c (tiff_load): Avoid compiler warning in 2nd arg to TIFFClientOpen.
Sam Steingold [Tue, 1 Feb 2011 19:17:10 +0000 (14:17 -0500)]
fix docstrings of `purecopy-cons' & `purecopy-car' per Chong Yidong's request
Sam Steingold [Tue, 1 Feb 2011 18:18:46 +0000 (13:18 -0500)]
typo
Sam Steingold [Tue, 1 Feb 2011 18:15:18 +0000 (13:15 -0500)]
* lisp/subr.el (purecopy-cons, purecopy-car): Add shortcuts.
* lisp/faces.el (face-x-resources): Use `purecopy-cons'.
* lisp/files.el (auto-mode-alist, interpreter-mode-alist): Use
`purecopy-car'.
* lisp/international/fontset.el (font-encoding-alist): Ditto.
* lisp/international/mule-conf.el (file-coding-system-alist): Ditto.
* lisp/international/mule.el (auto-coding-alist)
(auto-coding-regexp-alist): Ditto.
* lisp/mouse.el (mouse-buffer-menu-mode-groups): Use `purecopy-cons'.
* lisp/term/x-win.el (x-gtk-stock-map): Ditto.
Chong Yidong [Tue, 1 Feb 2011 17:34:07 +0000 (12:34 -0500)]
Drop use of unsafep for checking Custom themes; bugfixes.
* lisp/custom.el (load-theme): Define return value. Drop use of
unsafep; call custom-theme-load-confirm for non-known-safe themes.
(custom-theme-load-confirm): Scroll in the correct window.
(custom-enabled-themes): Add custom-safe-themes to :set-after.
* lisp/cus-theme.el (custom-theme-checkbox-toggle): Don't activate the
checkbox if load-theme fails.
Stefan Monnier [Tue, 1 Feb 2011 16:33:17 +0000 (11:33 -0500)]
* lisp/progmodes/compile.el (compilation-next-error): Check there's
a message before using it.
Fixes: debbugs:7941
Stefan Monnier [Tue, 1 Feb 2011 14:09:20 +0000 (09:09 -0500)]
* lisp/gnus/message.el (message-expand-name): Don't trust the return value of
bbdb-complete-name.
(message-check-news-header-syntax): Remove unused var `start'.
(message-idna-to-ascii-rhs-1): Remove unused vars `rhs' and `address'.
(message-inhibit-body-encoding): Move to before first use.
(mail-abbrev-mode-regexp, Expires, User-Agent, Lines, Distribution)
(To, References, In-Reply-To, Newsgroups, Subject, Path, From)
(Organization, Message-ID, Date, mh-previous-window-config):
Defvar the vars using dynamic scoping.
Lars Ingebrigtsen [Tue, 1 Feb 2011 11:02:10 +0000 (11:02 +0000)]
gnus.texi (Customizing Articles): Fix typo.
Deniz Dogan [Tue, 1 Feb 2011 10:12:25 +0000 (11:12 +0100)]
Adding missing bug reference to ChangeLog.
Jan Djärv [Tue, 1 Feb 2011 08:53:03 +0000 (09:53 +0100)]
Use add/delete_read_fd in xsmfns to simplify. Also restart with initial_argv.
* xsmfns.c (ice_connection_closed): Call delete_read_fd.
(x_session_check_input): Change args and return type so it can be used
as argument to add_read_fd. Make static. Remove call to select.
Call kbd_buffer_store_event for emacs_event.
(smc_save_yourself_CB): Also store initial argv to SmRestartCommand.
(ice_conn_watch_CB): Call add_read_fd.
* xterm.c (XTread_socket): Remove HAVE_X_SM block with call to
x_session_check_input.
(x_session_initialized): Remove definition.
(x_initialize): Remove setting of x_session_initialized.
* xterm.h (x_session_check_input): Remove declaration.
Paul Eggert [Tue, 1 Feb 2011 07:23:48 +0000 (23:23 -0800)]
format-time-string now supports subsecond time stamp resolution
Lars Ingebrigtsen [Tue, 1 Feb 2011 03:54:46 +0000 (03:54 +0000)]
shr.el (shr-render-td): Only do colours at the final rendering. Should be slightly faster.
(shr-insert-table): Fix up TD background colours when doing the vertical padding.
gnus-art.el (article-update-date-lapsed): Don't use current-column to find the horizontal position. It's fragile in the presence of \003 characters.
Lars Ingebrigtsen [Tue, 1 Feb 2011 02:23:24 +0000 (02:23 +0000)]
gnus-art.el (article-date-ut): Protect against articles with no Date header.
Lars Ingebrigtsen [Tue, 1 Feb 2011 02:19:04 +0000 (02:19 +0000)]
gnus-start.el (gnus-read-active-file-1): Remove dead parameter infos.
Jay Belanger [Tue, 1 Feb 2011 02:15:52 +0000 (20:15 -0600)]
* calc/calc-mtx.el (math-lud-pivot-check): New function.
(math-do-matrix-lud): Use `math-lud-pivot-check' to check the size
of potential pivots.
Chong Yidong [Mon, 31 Jan 2011 23:54:50 +0000 (18:54 -0500)]
Merge changes from emacs-23 branch
Deniz Dogan [Mon, 31 Jan 2011 23:11:29 +0000 (18:11 -0500)]
Backport Bug#7933 fix from trunk.
* lisp/net/rcirc.el: Clean log filenames (Bug#7933).
(rcirc-log-write): Use convert-standard-filename.
(rcirc-log-filename-function): Documentation updates.
Alan Mackenzie [Mon, 31 Jan 2011 23:07:43 +0000 (18:07 -0500)]
Fix an infloop in CC-mode (Bug#7595).
* progmodes/cc-cmds.el (c-forward-over-illiterals): Continue
parsing if we encounter a naked # (Bug#7595).
(c-beginning-of-statement): Avoid loop in locating the beginning
of a macro.
Deniz Dogan [Mon, 31 Jan 2011 20:44:45 +0000 (21:44 +0100)]
* lisp/net/rcirc.el: New customizable nick completion format.
(rcirc-nick-completion-format): New defcustom.
(rcirc-complete): Use it.
Eli Zaretskii [Mon, 31 Jan 2011 20:04:42 +0000 (22:04 +0200)]
Commit changes in nt/ChangeLog for 2011-01-31T19:36:08Z!eliz@gnu.org.
Eli Zaretskii [Mon, 31 Jan 2011 20:00:40 +0000 (22:00 +0200)]
Don't define HAVE_STRFTIME on MS-Windows.
s/ms-w32.h (HAVE_STRFTIME): Don't define.
Eli Zaretskii [Mon, 31 Jan 2011 19:36:08 +0000 (21:36 +0200)]
Fix the MS-Windows build broken by 2011-01-30T23:34:18Z!eggert@cs.ucla.edu and 2011-01-31T08:15:13Z!eggert@cs.ucla.edu.
lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/strftime.$(O) and
$(BLD)/time_r.$(O).
($(BLD)/dtoastr.$(O)): Depend on $(EMACS_ROOT)/src/s/ms-w32.h and
$(EMACS_ROOT)/src/m/intel386.h.
($(BLD)/strftime.$(O)):
($(BLD)/time_r.$(O)): Define prerequisites.
src/makefile.w32-in (OBJ2): Remove strftime.$(O).
($(BLD)/strftime.$(O)): Remove prerequisites.
lib-src/makefile.w32-in (VERSION): Don't define, defined on nt/config.nt.
(ECLIENT_CFLAGS): Remove -DVERSION.
($(BLD)/emacsclient.$(O)): Don't depend on makefile.w32-in.
nt/config.nt (VERSION): Uncomment definition.
(restrict): Define.
nt/inc/stdbool.h: New file.
admin/admin.el (set-version): Remove lib-src/makefile.w32-in. Add
nt/config.nt.
Antoine Levitt [Mon, 31 Jan 2011 19:16:19 +0000 (14:16 -0500)]
Fix erasure of modeline by erc-track.
http://lists.gnu.org/archive/html/emacs-devel/2010-08/msg00562.html
* erc-track.el (track): Don't reset erc-modified-channels-object
each time erc-track-mode is activated.
Stefan Monnier [Mon, 31 Jan 2011 17:11:11 +0000 (12:11 -0500)]
Fix last-minute typo in last change.
Stefan Monnier [Mon, 31 Jan 2011 17:09:42 +0000 (12:09 -0500)]
* lisp/progmodes/compile.el (compilation--flush-directory-cache):
New function, extracted from compilation--remove-properties.
(compilation--remove-properties, compilation--parse-region): Use it.
(compilation--previous-directory): Handle one more case.
(compilation-enable-debug-messages): Remove.
(compilation-parse-errors, compilation--flush-parse): Just remove the
left over debug messages.
Chong Yidong [Mon, 31 Jan 2011 17:03:37 +0000 (12:03 -0500)]
* lisp/files.el (copy-directory): Fix arguments to the recursive call.
Sam Steingold [Mon, 31 Jan 2011 16:49:44 +0000 (11:49 -0500)]
* lisp/progmodes/compile.el (compilation-enable-debug-messages):
Add a variable to make the parsing messages introduced in
2011-01-28T22:12:05Z!monnier@iro.umontreal.ca optional.
(compilation-parse-errors, compilation--flush-parse): Use it.
Deniz Dogan [Mon, 31 Jan 2011 15:19:57 +0000 (16:19 +0100)]
* lisp/net/rcirc.el: Clean log filenames (Bug#7933).
(rcirc-log-write): Use convert-standard-filename.
(rcirc-log-filename-function): Documentation updates.
Lars Ingebrigtsen [Mon, 31 Jan 2011 12:29:31 +0000 (12:29 +0000)]
gnus-art.el (article-date-ut): Replace infinitely many Date headers with a single one when called interactively.
Lars Ingebrigtsen [Mon, 31 Jan 2011 10:49:39 +0000 (10:49 +0000)]
gnus-art.el (article-transform-date): Fix infinite recursion.
Paul Eggert [Mon, 31 Jan 2011 08:15:13 +0000 (00:15 -0800)]
Merge: src/emacs.c now gets version number from configure.in
Paul Eggert [Mon, 31 Jan 2011 08:12:52 +0000 (00:12 -0800)]
src/emacs.c now gets version number from configure.in
Jim Meyering [Mon, 31 Jan 2011 07:34:45 +0000 (08:34 +0100)]
charset.c (load_charset_map): Don't deref NULL on failed malloc.
Lars Ingebrigtsen [Mon, 31 Jan 2011 07:27:07 +0000 (07:27 +0000)]
gnus-art.el (article-transform-date): Rewrite to still work when there are several rfc2822 parts.
Jan D [Mon, 31 Jan 2011 06:44:05 +0000 (07:44 +0100)]
Use xmalloc instead of malloc.
* lwlib-Xm.c (make_destroyed_instance):
* lwlib-utils.c (XtApplyToWidgets):
* lwlib.c (safe_strdup, malloc_widget_value)
(allocate_widget_info, allocate_widget_instance): Use xmalloc
instead of malloc.
Lars Ingebrigtsen [Mon, 31 Jan 2011 04:41:38 +0000 (04:41 +0000)]
nnimap.el (nnimap-wait-for-response): Wait for results in a more secure manner.
gnus-art.el (article-update-date-lapsed): Try to avoid having point move around by not using save-window-excursion. It seems to work...
Lars Ingebrigtsen [Mon, 31 Jan 2011 03:35:09 +0000 (03:35 +0000)]
nntp.el (nntp-retrieve-group-data-early, nntp-finish-retrieve-group-infos): Implement the asynchronous data fetching functions.
Katsumi Yamaoka [Mon, 31 Jan 2011 02:55:13 +0000 (02:55 +0000)]
gnus-art.el (article-make-date-line): Fix last change.
Katsumi Yamaoka [Mon, 31 Jan 2011 02:49:29 +0000 (02:49 +0000)]
gnus-art.el (article-make-date-line): Work for user-defined format.
Lars Ingebrigtsen [Mon, 31 Jan 2011 02:19:13 +0000 (02:19 +0000)]
gnus-start.el (gnus-read-active-for-groups): Read the active files thoroughly for all backends that have no known groups. This should allow new nnml methods to retrieve mail.
gnus-group.el (gnus-group-jump-to-group): Allow jumping to groups that Gnus doesn't know exists again.
Lars Ingebrigtsen [Mon, 31 Jan 2011 02:01:24 +0000 (02:01 +0000)]
gnus-art.el: Rewrite the Date header formatting functionality.
The user can now have infinitely many Date headers.
This change should be pretty much backwards-compatible, even though
many customisation variables have been removed.
gnus.texi (Customizing Articles): Document the new way of customizing
the date headers(s).
Paul Eggert [Sun, 30 Jan 2011 23:34:18 +0000 (15:34 -0800)]
strftime: import from gnulib
Paul Eggert [Sun, 30 Jan 2011 22:22:58 +0000 (14:22 -0800)]
Use SSDATA when the context wants char *.
Paul Eggert [Sun, 30 Jan 2011 22:17:44 +0000 (14:17 -0800)]
Use SSDATA when the context wants char *.
* alloc.c, buffer.c, bytecode.c, callproc.c, dired.c:
* dispnew.c, doc.c, editfns.c, emacs.c, fileio.c, filelock.c:
* fns.c, font.c, frame.c, image.c, indent.c, keyboard.c:
* lread.c, minibuf.c, print.c, process.c, search.c, widget.c:
* xdisp.c, xfaces.c, xfns.c, xml.c, xselect.c, xterm.c:
Use SSDATA (not SDATA) when the context of the expression wants
char * (not unsigned char *).
Paul Eggert [Sun, 30 Jan 2011 19:22:51 +0000 (11:22 -0800)]
Merge: import mktime and move-if-change fixes from gnulib
Paul Eggert [Sun, 30 Jan 2011 19:22:02 +0000 (11:22 -0800)]
gnulib: import mktime and move-if-change fixes from gnulib
* configure: Regenerate from the following.
2011-01-30 Paul Eggert <eggert@cs.ucla.edu>
mktime: clarify long_int width checking
* lib/mktime.c (long_int_is_wide_enough): Move this assertion to
the top level, to make it clearer that the assumption about
long_int width is being checked. See
<http://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00554.html>.
2011-01-29 Paul Eggert <eggert@cs.ucla.edu>
TYPE_MAXIMUM: avoid theoretically undefined behavior
* lib/intprops.h (TYPE_MINIMUM, TYPE_MAXIMUM): Do not shift a
negative number, which the C Standard says has undefined behavior.
In practice this is not a problem, but might as well do it by the book.
Reported by Rich Felker and Eric Blake; see
<http://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00493.html>.
* m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
* lib/mktime.c (TYPE_MAXIMUM): Redo slightly to match the others.
mktime: #undef mktime before #defining it
* lib/mktime.c (mktime) [DEBUG]: #undef mktime before #defining it.
mktime: systematically normalize tm_isdst comparisons
* lib/mktime.c (isdst_differ): New function.
(__mktime_internal): Use it systematically for all isdst comparisons.
This completes the fix for libc BZ #6723, and removes the need for
normalizing tm_isdst. See
<http://sourceware.org/bugzilla/show_bug.cgi?id=6723>
(not_equal_tm) [DEBUG]: Use isdst_differ here, too.
mktime: fix some integer overflow issues and sidestep the rest
This was prompted by a bug report by Benjamin Lindner for MinGW
<http://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00472.html>.
His bug is due to signed integer overflow (0 - INT_MIN), and I
I scanned through mktime.c looking for other integer overflow
problems, fixing all the bugs I found.
Although the C Standard says the resulting code is still not safe
in the presence of integer overflow, in practice it should be good
enough for all real-world two's-complement implementations, except
for debugging environments that deliberately trap on integer
overflow (e.g., gcc -ftrapv).
* lib/mktime.c (WRAPV): New macro.
(SHR): Also check that long_int and time_t shift right in the
usual way, before using the fast-but-unportable method.
(TYPE_ONES_COMPLEMENT, TYPE_SIGNED_MAGNITUDE): Remove, no longer
used. The code already assumed two's complement, so there's
no need to test for alternatives. All uses removed.
(TYPE_MAXIMUM): Don't rely here on overflow behavior not defined by
the C standard. Problem reported by Rich Felker in
<http://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00488.html>.
(twos_complement_arithmetic): Also check long_int and time_t.
(time_t_avg, time_t_add_ok, time_t_int_add_ok): New functions.
(guess_time_tm, ranged_convert, __mktime_internal): Use them.
(__mktime_internal): Avoid integer overflow with unary subtraction
in two instances where -1 - X is an adequate replacement for -X,
since the calculations are approximate.
2011-01-29 Eric Blake <eblake@redhat.com>
mktime: avoid infinite loop
* m4/mktime.m4 (AC_FUNC_MKTIME): Avoid overflow on possibly-signed
type; behavior is still undefined but portable to all known targets.
Reported by Rich Felker.
2011-01-28 Paul Eggert <eggert@cs.ucla.edu>
mktime: avoid problems on NetBSD 5 / i386
* lib/mktime.c (long_int): New type. This works around a problem
on NetBSD 5 / i386, where 'long int' and 'int' are both 32 bits
but time_t is 64 bits, and where I expect the existing code is
wrong in some cases.
(leapyear, ydhms_diff, guess_time_tm, __mktime_internal): Use it.
(ydhms_diff): Bring back the compile-time check for wide-enough
year and yday.
mktime: fix misspelling in comment
* lib/mktime.c (__mktime_internal): Fix misspelling in comment.
This merges all recent glibc changes of importance.
2011-01-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
move-if-change: cope with concurrent mv of identical file.
* move-if-change (CMPPROG): Accept environment
variable as an override for `cmp'.
(usage): Document CMPPROG.
Adjust comparison to drop stdout. Cope with failure of mv if
the target file exists and is identical to the source, for
parallel builds.
Report from H.J. Lu against binutils in PR binutils/12283.
Jan Djärv [Sun, 30 Jan 2011 18:59:58 +0000 (19:59 +0100)]
Implement C-c m in report-emacs-bug (insert to mailer) for OSX.
* mail/emacsbug.el (report-emacs-bug-insert-to-mailer): Check
report-emacs-bug-can-use-osx-open and use that if t.
(report-emacs-bug-can-use-osx-open): New function.
(report-emacs-bug): Rename can-xdg-email to can-insert-mail.
Check report-emacs-bug-can-use-osx-open also for can-insert-mail.
Jan Djärv [Sun, 30 Jan 2011 18:36:12 +0000 (19:36 +0100)]
* .gdbinit: Read global lisp variables as globals.f_V*.
Andreas Schwab [Sun, 30 Jan 2011 11:58:09 +0000 (12:58 +0100)]
Regenerate ldefs-boot.el
Jim Meyering [Sun, 30 Jan 2011 09:17:36 +0000 (10:17 +0100)]
make-docfile: don't corrupt heap for an invalid .elc file
Lars Ingebrigtsen [Sun, 30 Jan 2011 03:00:34 +0000 (03:00 +0000)]
nnmail.el (nnmail-article-group): A better test for fanciness.
Lars Ingebrigtsen [Sun, 30 Jan 2011 02:51:45 +0000 (02:51 +0000)]
nnmail.el (nnmail-article-group): Check for a direct fancy split method.
gnus.texi (Client-Side IMAP Splitting): Add a complete nnimap fancy splitting example.
Lars Ingebrigtsen [Sun, 30 Jan 2011 01:46:32 +0000 (01:46 +0000)]
nnimap.el (nnimap-request-head): Protect against not finding the article by Message-ID.
Andreas Schwab [Sun, 30 Jan 2011 00:35:35 +0000 (01:35 +0100)]
* src/font.c (PROP_MATCH): Remove parameter N and use strlen instead.
All uses changed.
(PROP_SAVE): Likewise.
Andreas Schwab [Sat, 29 Jan 2011 23:56:33 +0000 (00:56 +0100)]
Fix use of pointers to image library functions
* src/image.c (DEF_IMGLIB_FN): Add parameter rettype, use it instead
of int. All uses adjusted.
(PNG_JMPBUF, png_load, jpeg_load, tiff_load, gif_load)
(svg_load_image): Remove casts.
Chong Yidong [Sat, 29 Jan 2011 22:33:02 +0000 (17:33 -0500)]
Fix macro definitions in last change to image.c
Chong Yidong [Sat, 29 Jan 2011 22:10:51 +0000 (17:10 -0500)]
Fix bug in copy-directory copying into an existing directory.
http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg01007.html
* files.el (copy-directory): If destination is an existing
directory, copy into a subdirectory there.
Chong Yidong [Sat, 29 Jan 2011 21:28:26 +0000 (16:28 -0500)]
Fix png support to allow compiling with libpng-1.5 (Bug#7908).
* image.c (fn_png_longjmp, fn_png_set_longjmp_fn): New png
function definitions for compiling with libpng-1.5.
(PNG_LONGJMP, PNG_JMPBUF): New macros for libpng-1.5.
(my_png_error, png_load): Use them. Suggested by Thomas Klausner.
Chong Yidong [Sat, 29 Jan 2011 21:19:21 +0000 (16:19 -0500)]
Refresh Dired and VC-dir buffers after vc-pull and vc-merge.
* vc/vc-dispatcher.el (vc-set-async-update): New function for
updating Dired or VC-dir buffers after async command completes.
* vc/vc-bzr.el (vc-bzr-async-command): Return the process buffer.
(vc-bzr-pull, vc-bzr-merge-branch): Use vc-set-async-update.
* vc/vc-git.el (vc-git-merge-branch): Add FETCH_HEAD to branch
completions if it exists. Use vc-set-async-update.
(vc-git-pull): Use vc-set-async-update.
* vc/vc-hg.el (vc-hg-pull): Fix default-contents arg to
read-shell-command. Use vc-set-async-update.
(vc-hg-merge-branch): Use vc-set-async-update.
Chong Yidong [Sat, 29 Jan 2011 15:17:00 +0000 (10:17 -0500)]
* keyboard.c (make_lispy_position): Fix typo in last change (Bug#7935).
Eli Zaretskii [Sat, 29 Jan 2011 14:48:19 +0000 (16:48 +0200)]
Fix doc/*/makefile.w32-in according to 2011-01-23T10:22:21Z!wl@gnu.org-2011-01-23T10:38:14Z!wl@gnu.org.
doc/lispref/makefile.w32-in (texinfodir): New variable.
(usermanualdir): Remove as redundant with $(emacsdir).
(MAKEINFO): Remove options, leave only program name.
(MAKEINFO_OPTS): New variable.
(texinputdir, $(infodir)/elisp): Use $(MAKEINFO_OPTS).
doc/emacs/makefile.w32-in (MAKEINFO): Remove options, leave only program name.
(MAKEINFO_OPTS): New variable.
(ENVADD, $(infodir)/emacs): Use $(MAKEINFO_OPTS).
(emacs.html): New target.
(clean): Remove emacs.html.
doc/misc/makefile.w32-in (MAKEINFO): Remove options, leave only program name.
(MAKEINFO_OPTS): New variable.
(ENVADD, $(infodir)/emacs): Use $(MAKEINFO_OPTS).
($(infodir)/info, $(infodir)/ccmode, $(infodir)/ada-mode)
($(infodir)/pcl-cvs, $(infodir)/eshell, $(infodir)/cl)
($(infodir)/dbus, $(infodir)/dired-x, $(infodir)/ediff)
($(infodir)/flymake, $(infodir)/forms, $(infodir)/gnus)
($(infodir)/message, $(infodir)/emacs-mime, $(infodir)/sieve)
($(infodir)/pgg, $(infodir)/mh-e, $(infodir)/reftex)
($(infodir)/remember, $(infodir)/sasl, $(infodir)/sc)
($(infodir)/vip, $(infodir)/viper, $(infodir)/widget)
($(infodir)/efaq, $(infodir)/autotype, $(infodir)/calc)
($(infodir)/idlwave, $(infodir)/eudc, $(infodir)/ebrowse)
($(infodir)/woman, $(infodir)/speedbar, $(infodir)/tramp)
($(infodir)/ses, $(infodir)/smtpmail, $(infodir)/org)
($(infodir)/url, $(infodir)/newsticker, $(infodir)/nxml-mode)
($(infodir)/rcirc, $(infodir)/erc, $(infodir)/ert)
($(infodir)/epa, $(infodir)/mairix-el, $(infodir)/auth)
($(infodir)/eieio, $(infodir)/ede, $(infodir)/semantic)
($(infodir)/edt): Use $(MAKEINFO_OPTS).
Eli Zaretskii [Sat, 29 Jan 2011 13:41:34 +0000 (15:41 +0200)]
Fix the bootstrap on MS-Windows.
makefile.w32-in (bootstrap-nmake, bootstrap-gmake): Fix the bootstrap.
Eli Zaretskii [Sat, 29 Jan 2011 12:36:11 +0000 (14:36 +0200)]
Fix the MS-Windows build broken by 2011-01-17T19:01:01Z!eggert@cs.ucla.edu and emacs-23/2010-05-21T19:51:48Z!acm@muc.de.
lib/makefile.w32-in:
lib/getopt_.h: New files.
src/s/ms-w32.h (HAVE_MKTIME): Remove.
src/makefile.w32-in (LOCAL_FLAGS): Add -I../lib.
(GNULIB): New variable.
(LIBS): Add $(GNULIB).
$(TEMACS): Depend on $(GNULIB).
<top-level>: Fix font-lock disrupted by a lone `"'.
src/makefile.w32-in (LOCAL_FLAGS): Add -I../lib.
(GETOPTOBJS, GETOPTDEPS): Remove targets.
(MOVEMAILOBJS): Replace $(GETOPTOBJS) with ../lib/$(BLD)/libgnu.$(A).
($(BLD)/movemail.exe): Depend on ../lib/getopt.h.
(ECLIENTOBJS, ETAGSOBJ, CTAGSOBJ, EBROWSEOBJ): Replace getopt.o
and getopt1.o with ../lib/$(BLD)/libgnu.$(A).
(clean): Don't remove getopt.h.
(getopt.h, $(BLD)/getopt.$(O), $(BLD)/getopt1.$(O)): Remove targets.
($(BLD)/ctags.$(O), $(BLD)/etags.$(O)): Replace getopt.h with
$(EMACS_ROOT)/lib/getopt.h.
nt/makefile.w32-in (all-other-dirs-nmake, all-other-dirs-gmake)
(bootstrap-nmake, bootstrap-gmake, bootstrap-clean-nmake)
(bootstrap-clean-gmake, clean-other-dirs-nmake)
(clean-other-dirs-gmake, cleanall-other-dirs-nmake)
(cleanall-other-dirs-gmake, distclean-other-dirs-nmake)
(distclean-other-dirs-gmake, maintainer-clean-other-dirs-nmake)
(maintainer-clean-other-dirs-gmake): Recurse into ../lib as well.
nt/configure.bat: Create lib/makefile.
nt/config.nt (HAVE_MKTIME, BROKEN_MKTIME): Remove.
(HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE_DECL_GETENV)
(HAVE_DECL_LOCALTIME_R, HAVE_WCHAR_T, PACKAGE, VERSION, inline)
(_GL_UNUSED, _UNUSED_PARAMETER_): Add definitions, for gnulib.
Jan Djärv [Sat, 29 Jan 2011 11:30:11 +0000 (12:30 +0100)]
Handle nul-character in copy/paste (Bug#7934).
* nsselect.m (ns_string_from_pasteboard): Get length of string
and use make_string instead of build_string.
(ns_string_to_pasteboard_internal): Use initWithBytesNoCopy
instead of stringWithUTF8String (Bug#7934).
Daiki Ueno [Sat, 29 Jan 2011 11:05:35 +0000 (20:05 +0900)]
Don't throw an error when any of encryption subkeys are expired.
* epg.el (epg--status-KEYEXPIRED, epg--status-KEYREVOKED): Don't
presume KEYEXPIRED and KEYREVOKED to be a fatal error status
(Bug#7931).
Jan Djärv [Sat, 29 Jan 2011 10:36:16 +0000 (11:36 +0100)]
Handle floating point errors in ns-fonts (Bug#7887).
* nsfont.m (nsfont_open): Ensure that fonts with inexact
descenders would not become one pixel too tall (Bug#7887).
Andreas Schwab [Sat, 29 Jan 2011 09:44:40 +0000 (10:44 +0100)]
Don't complain about duplicate leim-list files
* lisp/emacs-lisp/shadow.el (load-path-shadows-find): Ignore leim-list
files.
Stefan Monnier [Sat, 29 Jan 2011 06:08:24 +0000 (01:08 -0500)]
* lisp/progmodes/compile.el: Avoid an N² behavior in grep.
(compilation--previous-directory): New fun.
(compilation--previous-directory-cache): New var.
(compilation--remove-properties): Flush it.
(compilation-directory-properties, compilation-error-properties):
Use the new fun to speed up looking for the current directory.
Chong Yidong [Sat, 29 Jan 2011 03:12:32 +0000 (22:12 -0500)]
Rudimentary support for vc-pull and vc-merge in Git and Mercurial.
* lisp/vc/vc.el (vc-pull): Make vc-update an alias for this, instead of
the other way around.
* lisp/vc/vc-git.el (vc-git-branches, vc-git-pull)
(vc-git-merge-branch): New functions.
(vc-git-history): New var.
* lisp/vc/vc-hg.el (vc-hg-history): New var.
(vc-hg-pull): Perform default pull if called via Lisp by vc-pull.
(vc-hg-merge-branch): New function.
Lars Ingebrigtsen [Sat, 29 Jan 2011 02:29:38 +0000 (02:29 +0000)]
gnus-art.el (article-update-date-lapsed): Try a better way to really keep point at the "same place".
Chong Yidong [Fri, 28 Jan 2011 23:10:55 +0000 (18:10 -0500)]
Convert vc-bzr-async-command into a general vc-do-async-command facility.
* vc/vc-dispatcher.el (vc-do-async-command): New function.
* vc/vc-bzr.el (vc-bzr-async-command): Convert into a wrapper for
vc-do-async-command.
* vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch): Callers changed.
Gnus developers [Fri, 28 Jan 2011 23:07:38 +0000 (23:07 +0000)]
Merge changes made in Gnus trunk.
gnus-win.el: Remove dead function gnus-window-configuration-element.
(gnus-all-windows-visible-p): Remove old compatibility code.
(gnus-window-top-edge): Add docstring.
gnus-sum.el (gnus-select-newsgroup): Don't try to alter the active data if the group is unactivated.
Stefan Monnier [Fri, 28 Jan 2011 22:12:05 +0000 (17:12 -0500)]
* progmodes/compile.el: Don't use font-lock any more.