1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-20 18:17:20 +00:00
Commit Graph

98333 Commits

Author SHA1 Message Date
Deniz Dogan
186ecaf1a6 * lisp/net/rcirc.el: Clean log filenames (Bug#7933).
(rcirc-log-write): Use convert-standard-filename.
(rcirc-log-filename-function): Documentation updates.
2011-01-31 16:19:57 +01:00
Lars Ingebrigtsen
0c74b83871 gnus-art.el (article-date-ut): Replace infinitely many Date headers with a single one when called interactively. 2011-01-31 12:29:31 +00:00
Lars Ingebrigtsen
5b9b62f152 gnus-art.el (article-transform-date): Fix infinite recursion. 2011-01-31 10:49:39 +00:00
Paul Eggert
3df3a1fc82 Merge: src/emacs.c now gets version number from configure.in 2011-01-31 00:15:13 -08:00
Paul Eggert
16fab14354 src/emacs.c now gets version number from configure.in 2011-01-31 00:12:52 -08:00
Jim Meyering
546961a989 charset.c (load_charset_map): Don't deref NULL on failed malloc. 2011-01-31 08:34:45 +01:00
Lars Ingebrigtsen
32a400d4e1 gnus-art.el (article-transform-date): Rewrite to still work when there are several rfc2822 parts. 2011-01-31 07:27:07 +00:00
Jan D
3370edca83 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.
2011-01-31 07:44:05 +01:00
Lars Ingebrigtsen
0832490d44 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...
2011-01-31 04:41:38 +00:00
Lars Ingebrigtsen
1d88c091cc nntp.el (nntp-retrieve-group-data-early, nntp-finish-retrieve-group-infos): Implement the asynchronous data fetching functions. 2011-01-31 03:35:09 +00:00
Katsumi Yamaoka
5fe1831191 gnus-art.el (article-make-date-line): Fix last change. 2011-01-31 02:55:13 +00:00
Katsumi Yamaoka
c475337385 gnus-art.el (article-make-date-line): Work for user-defined format. 2011-01-31 02:49:29 +00:00
Lars Ingebrigtsen
e389d61f82 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.
2011-01-31 02:19:13 +00:00
Lars Ingebrigtsen
12e3ca0a34 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).
2011-01-31 02:01:24 +00:00
Paul Eggert
16c3e636a6 strftime: import from gnulib 2011-01-30 15:34:18 -08:00
Paul Eggert
4eec7f8b2b Use SSDATA when the context wants char *. 2011-01-30 14:22:58 -08:00
Paul Eggert
42a5b22fc0 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 *).
2011-01-30 14:17:44 -08:00
Paul Eggert
fcabb1a6e6 Merge: import mktime and move-if-change fixes from gnulib 2011-01-30 11:22:51 -08:00
Paul Eggert
3de84ad9c4 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.
2011-01-30 11:22:02 -08:00
Jan Djärv
253f7d1bc5 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.
2011-01-30 19:59:58 +01:00
Jan Djärv
2787bba35d * .gdbinit: Read global lisp variables as globals.f_V*. 2011-01-30 19:36:12 +01:00
Andreas Schwab
09aa1eb8ee Regenerate ldefs-boot.el 2011-01-30 12:58:09 +01:00
Jim Meyering
8aec9916dd make-docfile: don't corrupt heap for an invalid .elc file 2011-01-30 10:17:36 +01:00
Lars Ingebrigtsen
7920f98294 nnmail.el (nnmail-article-group): A better test for fanciness. 2011-01-30 03:00:34 +00:00
Lars Ingebrigtsen
fe72c8fa4e 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.
2011-01-30 02:51:45 +00:00
Lars Ingebrigtsen
228724bc63 nnimap.el (nnimap-request-head): Protect against not finding the article by Message-ID. 2011-01-30 01:46:32 +00:00
Andreas Schwab
4ec88040a1 * src/font.c (PROP_MATCH): Remove parameter N and use strlen instead.
All uses changed.
(PROP_SAVE): Likewise.
2011-01-30 01:35:35 +01:00
Andreas Schwab
df61c79005 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.
2011-01-30 00:56:33 +01:00
Chong Yidong
c2e79cb408 Fix macro definitions in last change to image.c 2011-01-29 17:33:02 -05:00
Chong Yidong
82d84d3fc9 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.
2011-01-29 17:10:51 -05:00
Chong Yidong
7f9c5df966 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.
2011-01-29 16:28:26 -05:00
Chong Yidong
a2b6e5d60b 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.
2011-01-29 16:19:21 -05:00
Chong Yidong
b6bcd04894 * keyboard.c (make_lispy_position): Fix typo in last change (Bug#7935). 2011-01-29 10:17:00 -05:00
Eli Zaretskii
bf3dae7ec3 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).
2011-01-29 16:48:19 +02:00
Eli Zaretskii
1e338cfca8 Fix the bootstrap on MS-Windows.
makefile.w32-in (bootstrap-nmake, bootstrap-gmake): Fix the bootstrap.
2011-01-29 15:41:34 +02:00
Eli Zaretskii
f915f0f7c8 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.
2011-01-29 14:36:11 +02:00
Jan Djärv
497a1925ec 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).
2011-01-29 12:30:11 +01:00
Daiki Ueno
8907f7b936 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).
2011-01-29 20:05:35 +09:00
Jan Djärv
481ae0855f 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).
2011-01-29 11:36:16 +01:00
Andreas Schwab
e935c6a287 Don't complain about duplicate leim-list files
* lisp/emacs-lisp/shadow.el (load-path-shadows-find): Ignore leim-list
files.
2011-01-29 10:44:40 +01:00
Stefan Monnier
e52f87a1c0 * 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.
2011-01-29 01:08:24 -05:00
Chong Yidong
659114fdba 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.
2011-01-28 22:12:32 -05:00
Lars Ingebrigtsen
bc68bd3998 gnus-art.el (article-update-date-lapsed): Try a better way to really keep point at the "same place". 2011-01-29 02:29:38 +00:00
Chong Yidong
9bfe578343 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.
2011-01-28 18:10:55 -05:00
Gnus developers
54b6f6edb8 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.
2011-01-28 23:07:38 +00:00
Stefan Monnier
9ffae6d024 * progmodes/compile.el: Don't use font-lock any more. 2011-01-28 17:12:05 -05:00
Stefan Monnier
55fb901352 * lisp/progmodes/compile.el: Don't use font-lock any more.
(compilation-error-regexp-alist-alist): Change handling of makepp
so it preserves the warning/error distinction on subsequent files.
Simplify various rules.
(compilation-directory-properties): Use font-lock-face.
Add a compilation-message property.
(compilation-internal-error-properties): Use font-lock-face.
Don't set the compilation-debug property here.
(compilation--put-prop, compilation--remove-properties)
(compilation--parse-region, compilation--ensure-parse)
(compilation--ensure-parse): New functions.
(compilation-parse-errors): New function, largely inspired of
compilation-mode-font-lock-keywords.  Set compilation-debug here.
(compilation--parsed): New var.
(compilation--flush-parse): Use compilation--ensure-parse.
(compilation-start): Don't call font-lock.
(compilation-turn-on-font-lock): Remove.
(compilation-setup): Don't set font-lock-extra-managed-props not change
other font-lock settings, other than keywords.
Don't activate font-lock-mode.
Set change-major-mode-hook and before-change-functions.
(compilation--unsetup): Remove properties and hooks.
(compilation-next-single-property-change): New function.
(compilation-next-error): Use it to parse when needed.
(compile-goto-error): Parse buffer as needed.
(compilation--compat-error-properties): Don't need a dummy `face'
property any more.
2011-01-28 17:06:20 -05:00
Stefan Monnier
8fe5238438 * lisp/progmodes/compile.el: Use accessors for clarity and fix omake hack.
(compilation-process-setup-function): Fix docstring's false promises.
(compilation-error-regexp-alist-alist): Catch omake's continuous
recompilation message and avoid reuse of old markers.
(compilation-parse-errors-function): Declare obsolete.
(compilation-buffer-modtime): Remove.
(compilation--make-cdrloc, compilation--loc->col)
(compilation--loc->line, compilation--loc->file-struct)
(compilation--loc->marker, compilation--loc->visited)
(compilation--make-file-struct, compilation--file-struct->file-spec)
(compilation--file-struct->formats)
(compilation--file-struct->loc-tree): New macros.  Use them.
(compilation--message): New defstruct.  Use them.
(compilation-next-error-function): Don't mess with timestamps to try
and guess when to reparse.
2011-01-28 16:42:34 -05:00
Leo Liu
b1ea593c81 Fix help-mode highlighting of advice warning (Bug#6304).
* emacs-lisp/advice.el (ad-make-advised-docstring): Don't apply
highlighting to the "this function is advisted" message.

* help-mode.el (help-mode-finish): Apply highlighting here, to
avoid clobbering by substitute-command-keys (Bug#6304).
2011-01-28 16:42:11 -05:00
Chong Yidong
40e22d80ae Fix for woman escape sequence processing (Bug#7843).
* lisp/woman.el (woman0-roff-buffer): Process roff escape sequences
occurring prior to the first request.
2011-01-28 16:20:40 -05:00