1. 16 Mar, 2011 1 commit
    • Stefan Monnier's avatar
      Remove bytecomp- prefix, plus misc changes. · ca105506
      Stefan Monnier authored
      * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Make it work to
      inline lexbind interpreted functions into lexbind code.
      (bytedecomp-bytes): Not a dynamic var any more.
      (disassemble-offset): Get the bytes via an argument instead.
      (byte-decompile-bytecode-1): Use push.
      * lisp/emacs-lisp/bytecomp.el: Remove the bytecomp- prefix now that we use
      lexical-binding.
      (byte-compile-outbuffer): Rename from bytecomp-outbuffer.
      * lisp/emacs-lisp/cl-macs.el (load-time-value):
      * lisp/emacs-lisp/cl.el (cl-compiling-file): Adjust to new name.
      * lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
      Add byte-code-function-p.
      (pcase--u1): Remove left-over code from early development.
      Fix case of variable shadowing in guards and predicates.
      (pcase--u1): Add a new `let' pattern.
      * src/image.c (parse_image_spec): Use Ffunctionp.
      * src/lisp.h: Declare Ffunctionp.
      ca105506
  2. 13 Mar, 2011 1 commit
    • Stefan Monnier's avatar
      * src/eval.c (Ffunction): Use simpler format for closures. · 23aba0ea
      Stefan Monnier authored
      (Fcommandp, funcall_lambda):
      * src/doc.c (Fdocumentation, store_function_docstring):
      * src/data.c (Finteractive_form):
      * lisp/help-fns.el (help-function-arglist):
      * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn):
      * lisp/subr.el (apply-partially): Adjust to new closure format.
      * lisp/emacs-lisp/disass.el (disassemble-internal): Catch closures.
      23aba0ea
  3. 11 Mar, 2011 1 commit
    • Stefan Monnier's avatar
      Misc fixes, and use lexical-binding in more files. · ba83908c
      Stefan Monnier authored
      * lisp/subr.el (letrec): New macro.
      (with-wrapper-hook): Move from lisp/simple.el and don't use CL.
      * simple.el (with-wrapper-hook): Move with-wrapper-hook to subr.el.
      * lisp/help-fns.el (help-function-arglist): Handle subroutines as well.
      (describe-variable): Use special-variable-p to filter completions.
      * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Don't expand `declare'
      in defmacros.
      * lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form):
      Handle `declare'.
      * lisp/emacs-lisp/cl.el (pushnew): Silence unfixable warning.
      * lisp/emacs-lisp/cl-macs.el (defstruct, define-compiler-macro):
      Mark unused arg as unused.
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Use memq.
      * lisp/emacs-lisp/autoload.el (make-autoload): Don't assume the macro's
      first sexp is a list.
      (autoload-generate-file-autoloads): Improve error message.
      * lisp/emacs-lisp/advice.el (ad-arglist): Use help-function-arglist
      to understand the new byte-code arg format.
      * lisp/vc/smerge-mode.el:
      * lisp/vc/log-view.el:
      * lisp/vc/log-edit.el:
      * lisp/vc/cvs-status.el:
      * lisp/uniquify.el:
      * lisp/textmodes/css-mode.el:
      * lisp/textmodes/bibtex-style.el:
      * lisp/reveal.el:
      * lisp/newcomment.el:
      * lisp/emacs-lisp/smie.el:
      * lisp/abbrev.el: Use lexical-binding.
      * src/eval.c (Fprog1, Fprog2): Simplify and use XCDR/XCAR.
      (Fdefvar): Remove redundant SYMBOLP check.
      (Ffunctionp): Don't signal an error for undefined aliases.
      * doc/lispref/variables.texi (Converting to Lexical Binding): New node.
      ba83908c
  4. 06 Mar, 2011 12 commits
    • Paul Eggert's avatar
      current_column: Now returns EMACS_INT, fixing some iftc. · 7831777b
      Paul Eggert authored
      * bytecode.c (Fbyte_code): Don't cast current_column () to int.
      * cmds.c (internal_self_insert): Likewise.
      * indent.c (Fcurrent_column): Likewise.
      * keymap.c (describe_command): Likewise.
      * minibuf.c (read_minibuf): Likewise.
      * indent.c (Fcurrent_indentation): Don't cast position_indentation ()
      to int.
      * xdisp.c (redisplay_internal, redisplay_window, decode_mode_spec):
      Likewise.
      * cmds.c (internal_self_insert): Declare locals to be EMACS_INT,
      not int or double, if they might contain a column number.
      * indent.c (current_column, Findent_to, indented_beyond_p):
      (compute_motion, vmotion): Likewise.
      * keymap.c (describe_command): Likewise.
      * xdisp.c (pint2str): Likewise.
      * indent.c (last_known_column): Now EMACS_INT, not int.
      * minibuf.c (minibuf_prompt_width): Likewise.
      * indent.c (current_column, current_column_1, position_indentation):
      Return EMACS_INT, not double.
      * lisp.h (current_column): Likewise.
      * indent.c (indented_beyond_p): Last arg is now EMACS_INT, not double.
      All callers changed.
      * lisp.h (indented_beyond_p): Likewise.
      7831777b
    • Paul Eggert's avatar
      * xdisp.c (redisplay_window): Likewise. · 179b8720
      Paul Eggert authored
      179b8720
    • Paul Eggert's avatar
      * minibuf.c (minibuf_prompt, minibuf_prompt_width): Move here · e9588e2e
      Paul Eggert authored
      from xdisp.c, and make static, since these are used only here.
      * window.h, xdisp.c (minibuf_prompt, minibuf_prompt_width):
      Remove decls.
      e9588e2e
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      acbfe54c
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      * xdisp.c (produce_glyphless_glyph): Make a pointer "const" · 841081e1
      Paul Eggert authored
      since it might point to immutable storage.
      841081e1
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      * xdisp.c: Rename or move local decls to avoid shadowing. · 5489860b
      Paul Eggert authored
      (init_iterator, handle_fontified_prop, handle_single_display_spec):
      (message_dolog, message_with_string, redisplay_internal):
      (redisplay_window, try_window_reusing_current_matrix, try_window_id):
      (compute_line_metrics, highlight_trailing_whitespace, cursor_row_p):
      (display_line, display_string, rows_from_pos_range):
      (mouse_face_from_buffer_pos, note_mouse_highlight, expose_frame):
      Rename or move local decls.
      5489860b
    • Stefan Monnier's avatar
      Fix pcase memoizing; change lexbound byte-code marker. · e2abe5a1
      Stefan Monnier authored
      * src/bytecode.c (exec_byte_code): Remove old lexical binding slot handling
      and replace it with the a integer args-desc handling.
      * eval.c (funcall_lambda): Adjust arglist test accordingly.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-signature):
      Handle integer arglist descriptor.
      (byte-compile-make-args-desc): Make integer arglist descriptor.
      (byte-compile-lambda): Use integer arglist descriptor to mark lexical
      byte-coded functions instead of an extra slot.
      * lisp/help-fns.el (help-add-fundoc-usage): Don't add a dummy doc.
      (help-split-fundoc): Return a nil doc if there was no actual doc.
      (help-function-arglist): Generate an arglist from an integer arg-desc.
      * lisp/emacs-lisp/pcase.el (pcase--memoize): Rename from pcase-memoize;
      Make only the key weak.
      (pcase): Change the key used in the memoization table, so it does not
      always get GC'd away.
      * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Slight change to the
      pcase pattern to generate slightly better code.
      e2abe5a1
    • Juanma Barranquero's avatar
      Fix typos. · 01c35094
      Juanma Barranquero authored
      * etc/srecode/el.srt: Fix typo.
      
      * lisp/allout.el (allout-init, allout-prefixed-keybindings)
        (allout-unprefixed-keybindings):
      * lisp/progmodes/prolog.el (prolog-find-term):
        Fix typos in docstrings.
      
      * lisp/org/org.el (org-blank-before-new-entry, org-context-in-file-links)
        (org-refile-targets, org-log-repeat, org-insert-link)
        (org-speed-command-default-hook, org-speed-command-hook)
        (org-in-regexps-block-p, org-yank-generic, org-goto-first-child):
        Fix typos in docstrings.
        (org-toggle-pretty-entities): Fix typo in message.
      01c35094
    • Michael Shields's avatar
      Doc fixes for bug#5567 (tiny change) · aa248733
      Michael Shields authored
      * lisp/window.el (one-window-p, walk-windows, display-buffer): Doc fixes.
      * src/window.c (Fnext_window): Doc (and comment) fixes.
      aa248733
  5. 05 Mar, 2011 2 commits
  6. 02 Mar, 2011 1 commit
  7. 01 Mar, 2011 1 commit
    • Stefan Monnier's avatar
      * doc/lispref/variables.texi (Scope): Mention the availability of lexbind. · d032d5e7
      Stefan Monnier authored
      (Lexical Binding): New node.
      * doc/lispref/eval.texi (Eval): Add `eval's new `lexical' arg.
      * lisp/emacs-lisp/cconv.el (cconv-liftwhen): Increase threshold.
      (cconv-closure-convert-rec): Convert interactive spec in empty lexenv.
      (cconv-analyse-use): Improve unused vars warnings.
      (cconv-analyse-form): Analyze interactive spec in empty lexenv.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Always byte-compile
      the interactive spec in lexical-binding mode.
      (byte-compile-refresh-preloaded): Don't reload byte-compiler files.
      * lisp/custom.el (custom-initialize-default): Use defvar.
      (custom-declare-variable): Set the special-variable-p flag.
      * lisp/help-fns.el (help-make-usage): Drop leading underscores.
      * lisp/dired.el (dired-revert, dired-make-relative): Mark unused args.
      (dired-unmark-all-files): Remove unused var `query'.
      (dired-overwrite-confirmed): Declare.
      (dired-restore-desktop-buffer): Don't use dynamically scoped arg names.
      * lisp/mpc.el: Mark unused args.
      (mpc--faster-toggle): Remove unused var `songnb'.
      * lisp/server.el (server-kill-buffer-running): Move before first use.
      * lisp/minibuffer.el: Mark unused args.
      * src/callint.c (quotify_arg): Simplify the logic.
      (Fcall_interactively): Use lexical binding when evaluating the
      interactive spec of a lexically bound function.
      d032d5e7
  8. 27 Feb, 2011 8 commits
  9. 26 Feb, 2011 3 commits
    • Paul Eggert's avatar
      * dispnew.c: Fix problem uncovered by gcc -Wunused-variable. · d2d37ddc
      Paul Eggert authored
      (adjust_frame_glyphs_for_window_redisplay): Make 'w' local to the
      contexts that actually need it.
      d2d37ddc
    • Paul Eggert's avatar
      * dispnew.c: Fix problems uncovered by gcc -Wstrict-prototypes. · 09ad5a91
      Paul Eggert authored
      (copy_glyph_row_contents): Remove; not used.
      (frame_row_to_window, check_current_matrix_flags):
      (window_change_signal): Now static, since they're not used elsewhere.
      (check_current_matrix_flags): Surround with "#if 0", since its
      only use is in a comment.  Maybe both the comment and the "#if 0"
      stuff should be removed?
      09ad5a91
    • Eli Zaretskii's avatar
      Fix Sed scripts and srs/s/msdos.h for gnulib additions. Not tested yet. · 003fa8b6
      Eli Zaretskii authored
       src/s/msdos.h (HAVE_LSTAT): Define for DJGPP >= 2.04.
       (lstat): Define for DJGPP < 2.04.
       msdos/sedlibmk.inp (BITSIZEOF_PTRDIFF_T, BITSIZEOF_SIG_ATOMIC_T)
       (BITSIZEOF_SIZE_T, BITSIZEOF_WCHAR_T)
       (BITSIZEOF_WINT_TGNULIB_FCHMODAT, GNULIB_FSTATAT, GNULIB_FUTIMENS)
       (GNULIB_LCHMOD, GNULIB_LSTAT, GNULIB_MBTOWC, GNULIB_MKDIRAT)
       (GNULIB_MKFIFO, GNULIB_MKFIFOAT, GNULIB_MKNOD, GNULIB_MKNODAT)
       (GNULIB_STAT, GNULIB_UTIMENSAT, GNULIB_WCTOMB, HAVE_FCHMODAT)
       (HAVE_FSTATAT, HAVE_FUTIMENS, HAVE_INTTYPES_H, HAVE_LCHMOD)
       (HAVE_LONG_LONG_INT, HAVE_LSTAT, HAVE_MKDIRAT, HAVE_MKFIFO)
       (HAVE_MKFIFOAT, HAVE_MKNOD, HAVE_MKNODAT)
       (HAVE_SIGNED_SIG_ATOMIC_T, HAVE_SIGNED_WCHAR_T)
       (HAVE_SIGNED_WINT_T, HAVE_STDINT_H, HAVE_SYS_BITYPES_H)
       (HAVE_SYS_INTTYPES_H, HAVE_SYS_TYPES_H)
       (HAVE_UNSIGNED_LONG_LONG_INT, HAVE_UTIMENSAT, HAVE_WCHAR_H)
       (MKDIR_P, NEXT_AS_FIRST_DIRECTIVE_STDINT_H)
       (NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H, NEXT_STDINT_H)
       (NEXT_SYS_STAT_H, REPLACE_LSTAT, REPLACE_MBTOWC, REPLACE_MKDIR)
       (REPLACE_MKFIFO, REPLACE_MKNOD, REPLACE_STAT, REPLACE_UTIMENSAT)
       (REPLACE_WCTOMB, SIG_ATOMIC_T_SUFFIX, SIZE_T_SUFFIX, STDINT_H)
       (WCHAR_T_SUFFIX, WINT_T_SUFFIX): New edits.
       ($(MKDIR_P)): Replace with equivalent DOS command.
       msdos/sed2v2.inp (BITSIZEOF_PTRDIFF_T, BITSIZEOF_SIG_ATOMIC_T)
       (BITSIZEOF_SIZE_T, BITSIZEOF_WCHAR_T, BITSIZEOF_WINT_T)
       (HAVE_LONG_LONG_INT, HAVE_SIGNED_SIG_ATOMIC_T, HAVE_SIGNED_WINT_T)
       (HAVE_UNSIGNED_LONG_LONG_INT, HAVE_WCHAR_H, HAVE_INTTYPES_H): New
       edits.
      003fa8b6
  10. 25 Feb, 2011 4 commits
    • Paul Eggert's avatar
      * fileio.c (Fmake_symbolic_link): Treat ENOSYS specially, and · d9d0d182
      Paul Eggert authored
      generate a special message for it.  Suggested by Eli Zaretskii in
      <http://lists.gnu.org/archive/html/emacs-devel/2011-02/msg00995.html>.
      d9d0d182
    • Paul Eggert's avatar
      Simplify symlink portability workaround. · 36f13e16
      Paul Eggert authored
      36f13e16
    • Paul Eggert's avatar
    • Stefan Monnier's avatar
      Get rid of funvec. · 876c194c
      Stefan Monnier authored
      * lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode): Handle new form of
      `byte-constant'.
      (byte-compile-close-variables, displaying-byte-compile-warnings):
      Add edebug spec.
      (byte-compile-toplevel-file-form): New fun, split out of
      byte-compile-file-form.
      (byte-compile-from-buffer): Use it to avoid applying cconv
      multiple times.
      (byte-compile): Only strip `function' if it's present.
      (byte-compile-lambda): Add `reserved-csts' argument.
      Use new lexenv arg of byte-compile-top-level.
      (byte-compile-reserved-constants): New var.
      (byte-compile-constants-vector): Obey it.
      (byte-compile-constants-vector): Handle new `byte-constant' form.
      (byte-compile-top-level): Add args `lexenv' and `reserved-csts'.
      (byte-compile-form): Don't check callargs here.
      (byte-compile-normal-call): Do it here instead.
      (byte-compile-push-unknown-constant)
      (byte-compile-resolve-unknown-constant): Remove, unused.
      (byte-compile-make-closure): Use `make-byte-code' rather than `curry',
      putting the environment into the "constant" pool.
      (byte-compile-get-closed-var): Use special byte-constant.
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Handle new
      intermediate special form `internal-make-vector'.
      (byte-optimize-lapcode): Handle new form of `byte-constant'.
      * lisp/help-fns.el (describe-function-1): Don't handle funvecs.
      * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Only convert quote to
      function if the content is a lambda expression, not if it's a closure.
      * emacs-lisp/eieio-come.el: Remove.
      * lisp/emacs-lisp/eieio.el: Don't require eieio-comp.
      (defmethod): Do a bit more work to find the body and wrap it into
      a function before passing it to eieio-defmethod.
      (eieio-defmethod): New arg `code' for it.
      * lisp/emacs-lisp/debug.el (debugger-setup-buffer): Don't hide things in
      debugger backtrace.
      * lisp/emacs-lisp/cl-extra.el (cl-macroexpand-all): Use backquotes, and be
      more careful when quoting a function value.
      * lisp/emacs-lisp/cconv.el (cconv-freevars): Accept defvar/defconst.
      (cconv-closure-convert-rec): Catch stray `internal-make-closure'.
      * lisp/Makefile.in (COMPILE_FIRST): Compile pcase and cconv early.
      
      * src/eval.c (Qcurry): Remove.
      (funcall_funvec): Remove.
      (funcall_lambda): Move new byte-code handling to reduce impact.
      Treat all args as lexical in the case of lexbind.
      (Fcurry): Remove.
      * src/data.c (Qfunction_vector): Remove.
      (Ffunvecp): Remove.
      * src/lread.c (read1): Revert to calling make_byte_code here.
      (read_vector): Don't call make_byte_code any more.
      * src/lisp.h (enum pvec_type): Rename back to PVEC_COMPILED.
      (XSETCOMPILED): Rename back from XSETFUNVEC.
      (FUNVEC_SIZE): Remove.
      (FUNVEC_COMPILED_TAG_P, FUNVEC_COMPILED_P): Remove.
      (COMPILEDP): Rename back from FUNVECP.
      * src/fns.c (Felt): Remove unexplained FUNVEC check.
      * src/doc.c (Fdocumentation): Don't handle funvec.
      * src/alloc.c (make_funvec, Ffunvec): Remove.
      * doc/lispref/vol2.texi (Top):
      * doc/lispref/vol1.texi (Top):
      * doc/lispref/objects.texi (Programming Types, Funvec Type, Type Predicates):
      * doc/lispref/functions.texi (Functions, What Is a Function, FunctionCurrying):
      * doc/lispref/elisp.texi (Top): Remove mentions of funvec and curry.
      876c194c
  11. 23 Feb, 2011 4 commits
  12. 22 Feb, 2011 2 commits
    • Paul Eggert's avatar
      [ChangeLog] · ae0d7250
      Paul Eggert authored
      Work around some portability problems with symlinks.
      * Makefile.in (GNULIB_MODULES): Add lstat, readlink, symlink.
      * configure.in (lstat, HAVE_LSTAT): Remove special hack.
      * lib/lstat.c, lib/readlink.c, lib/stat.c, lib/symlink.c:
      * m4/dos.m4, m4/lstat.m4, m4/readlink.m4, m4/stat.m4, m4/symlink.m4:
      New files, automatically generated from gnulib.
      * aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk:
      * lib/stdlib.in.h, m4/gl-comp.m4, m4/stdlib_h.m4: Regenerate.
      
      2011-02-22  Paul Eggert  <eggert@cs.ucla.edu>
      [src/ChangeLog]
      Work around some portability problems with symlinks.
      * fileio.c (Frename_file, Fmake_symbolic_link, Ffile_symlink_p):
      Simplify the code by assuming that the readlink and symlink calls
      exist, even if they always fail on this host.
      (Ffile_readable_p): Likewise, for fifos.
      * config.in: Regenerate.
      ae0d7250
    • Paul Eggert's avatar
      8d40723d