1. 11 Feb, 2011 2 commits
    • Stefan Monnier's avatar
      Let cconv use :fun-body in special forms that need it. · 295fb2ac
      Stefan Monnier authored
      * lisp/emacs-lisp/cconv.el (cconv-closure-convert): Drop `toplevel' arg.
      (cconv-closure-convert-toplevel): Remove.
      (cconv-lookup-let): New fun.
      (cconv-closure-convert-rec): Don't bother with defs-are-legal.
      Use :fun-body to handle special forms that require closing their forms.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form, byte-compile):
      Use cconv-closure-convert instead of cconv-closure-convert-toplevel.
      (byte-compile-lambda, byte-compile-make-closure):
      * lisp/emacs-lisp/byte-lexbind.el (byte-compile-maybe-push-heap-environment):
      Make sure cconv did its job.
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Check stack-depth
      before using it.
      * lisp/dired.el (dired-desktop-buffer-misc-data): Don't use a dynamic var as
      function argument.
      295fb2ac
    • Stefan Monnier's avatar
      Make cconv-analyse understand the need for closures. · 43e67019
      Stefan Monnier authored
      * lisp/emacs-lisp/byte-lexbind.el (byte-compile-lforminfo-analyze):
      Understand the :fun-body case for catch, save-window-excursion, and
      condition-case.
      (byte-compile-maybe-push-heap-environment): No need when nclosures is
      zero and byte-compile-current-num-closures is -1.
      
      * lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Fix `fun' that was not
      renamed to `bytecomp-fun'.
      
      * lisp/emacs-lisp/cconv.el (cconv-not-lexical-var-p): New function.
      (cconv-freevars): Use it.
      (cconv-closure-convert-rec): Avoid `position'.
      (cconv-analyse-function): New function.
      (cconv-analyse-form): Use it.  `inclosure' can't be nil any more.
      Check lexical vars at let-binding time rather than when referenced.
      For defuns to be in an empty environment and lambdas to take lexical args.
      Pay attention to the need to build closures in catch, unwind-protect,
      save-window-excursion, condition-case, and track-mouse.
      Fix defconst/defvar handling.
      43e67019
  2. 10 Feb, 2011 2 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/bytecomp.el (byte-compile-catch) · d779e73c
      Stefan Monnier authored
      (byte-compile-unwind-protect, byte-compile-track-mouse)
      (byte-compile-condition-case, byte-compile-save-window-excursion):
      Provide a :fun-body alternative, so that info can be propagated from the
      surrounding context, as is the case for lexical scoping.
      
      * lisp/emacs-lisp/cconv.el (cconv-mutated, cconv-captured)
      (cconv-captured+mutated, cconv-lambda-candidates): Fix up declaration.
      (cconv-freevars): Minor cleanup.  Fix handling of the error var in
      condition-case.
      d779e73c
    • Igor Kuzmin's avatar
      * lisp/emacs-lisp/cconv.el: New file. · 94d11cb5
      Igor Kuzmin authored
      * lisp/emacs-lisp/bytecomp.el: Use cconv.
      (byte-compile-file-form, byte-compile):
      Call cconv-closure-convert-toplevel when requested.
      * lisp/server.el:
      * lisp/mpc.el:
      * lisp/emacs-lisp/pcase.el:
      * lisp/doc-view.el:
      * lisp/dired.el: Use lexical-binding.
      94d11cb5
  3. 01 Feb, 2011 1 commit
  4. 31 Jan, 2011 17 commits
  5. 30 Jan, 2011 13 commits
    • Paul Eggert's avatar
      strftime: import from gnulib · 16c3e636
      Paul Eggert authored
      16c3e636
    • Paul Eggert's avatar
      Use SSDATA when the context wants char *. · 4eec7f8b
      Paul Eggert authored
      4eec7f8b
    • Paul Eggert's avatar
      Use SSDATA when the context wants char *. · 42a5b22f
      Paul Eggert authored
      * 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 *).
      42a5b22f
    • Paul Eggert's avatar
      fcabb1a6
    • Paul Eggert's avatar
      gnulib: import mktime and move-if-change fixes from gnulib · 3de84ad9
      Paul Eggert authored
      * 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.
      3de84ad9
    • Jan Djärv's avatar
      Implement C-c m in report-emacs-bug (insert to mailer) for OSX. · 253f7d1b
      Jan Djärv authored
      * 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.
      253f7d1b
    • Jan Djärv's avatar
      2787bba3
    • Andreas Schwab's avatar
      Regenerate ldefs-boot.el · 09aa1eb8
      Andreas Schwab authored
      09aa1eb8
    • Jim Meyering's avatar
      8aec9916
    • Lars Ingebrigtsen's avatar
    • Lars Ingebrigtsen's avatar
      nnmail.el (nnmail-article-group): Check for a direct fancy split method. · fe72c8fa
      Lars Ingebrigtsen authored
      gnus.texi (Client-Side IMAP Splitting): Add a complete nnimap fancy splitting example.
      fe72c8fa
    • Lars Ingebrigtsen's avatar
    • Andreas Schwab's avatar
      * src/font.c (PROP_MATCH): Remove parameter N and use strlen instead. · 4ec88040
      Andreas Schwab authored
      All uses changed.
      (PROP_SAVE): Likewise.
      4ec88040
  6. 29 Jan, 2011 5 commits
    • Chong Yidong's avatar
      Refresh Dired and VC-dir buffers after vc-pull and vc-merge. · a2b6e5d6
      Chong Yidong authored
      * 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.
      a2b6e5d6
    • Chong Yidong's avatar
    • Eli Zaretskii's avatar
      Fix doc/*/makefile.w32-in according to... · bf3dae7e
      Eli Zaretskii authored
      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).
      bf3dae7e
    • Eli Zaretskii's avatar
      Fix the bootstrap on MS-Windows. · 1e338cfc
      Eli Zaretskii authored
       makefile.w32-in (bootstrap-nmake, bootstrap-gmake): Fix the bootstrap.
      1e338cfc
    • Eli Zaretskii's avatar
      Fix the MS-Windows build broken by 2011-01-17T19:01:01Z!eggert@cs.ucla.edu and... · f915f0f7
      Eli Zaretskii authored
      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.
      f915f0f7