1. 21 Feb, 2011 1 commit
    • Stefan Monnier's avatar
      Use offsets relative to top rather than bottom for stack refs · 3e21b6a7
      Stefan Monnier authored
      * lisp/emacs-lisp/byte-opt.el (byte-compile-side-effect-and-error-free-ops):
      Remove interactive-p.
      (byte-optimize-lapcode): Update optimizations now that stack-refs are
      relative to the top rather than to the bottom.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode):
      Turn stack-ref-0 into dup.
      (byte-compile-form): Don't indirect-function since it can signal
      errors.
      (byte-compile-stack-ref, byte-compile-stack-set): Adjust to stack-refs
      being relative to top rather than to bottom in the byte-code.
      (with-output-to-temp-buffer): Remove.
      (byte-compile-with-output-to-temp-buffer): Remove.
      * lisp/emacs-lisp/cconv.el: Use lexical-binding.
      (cconv--lookup-let): Rename from cconv-lookup-let.
      (cconv-closure-convert-rec): Fix handling of captured+mutated
      arguments in defun/defmacro.
      * lisp/emacs-lisp/eieio-comp.el (eieio-byte-compile-file-form-defmethod):
      Rename from byte-compile-file-form-defmethod.
      Don't byte-compile-lambda.
      (eieio-byte-compile-defmethod-param-convert): Rename from
      byte-compile-defmethod-param-convert.
      * lisp/emacs-lisp/eieio.el (eieio-defgeneric-form-primary-only-one):
      Call byte-compile rather than byte-compile-lambda.
      * src/alloc.c (Fgarbage_collect): Don't mark the byte-stack redundantly.
      * src/bytecode.c (exec_byte_code): Change stack_ref and stack_set to use
      offsets relative to top rather than to bottom.
      * lisp/subr.el (with-output-to-temp-buffer): New macro.
      * lisp/simple.el (count-words-region): Don't use interactive-p.
      3e21b6a7
  2. 19 Feb, 2011 1 commit
    • Stefan Monnier's avatar
      * lisp/subr.el (save-window-excursion): New macro, moved from C. · e0f57e65
      Stefan Monnier authored
      * lisp/emacs-lisp/lisp-mode.el (save-window-excursion): Don't touch.
      * lisp/emacs-lisp/cconv.el (cconv-closure-convert-rec, cconv-analyse-form):
      Don't handle save-window-excursion any more.
      * lisp/emacs-lisp/bytecomp.el (interactive-p, save-window-excursion):
      Don't use the byte-code any more.
      (byte-compile-form): Check macro expansion was done.
      (byte-compile-save-window-excursion): Remove.
      * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
      Ignore save-window-excursion.  Don't macroepand any more.
      
      * src/window.c (Fsave_window_excursion): Remove.  Moved to Lisp.
      (syms_of_window): Don't defsubr it.
      * src/window.h (Fsave_window_excursion): Don't declare it.
      * src/bytecode.c (exec_byte_code): Inline Fsave_window_excursion.
      e0f57e65
  3. 18 Feb, 2011 1 commit
  4. 17 Feb, 2011 1 commit
    • Stefan Monnier's avatar
      Various compiler bug-fixes. MPC seems to run correctly now. · b38b1ec0
      Stefan Monnier authored
      * lisp/files.el (lexical-binding): Add a safe-local-variable property.
      
      * lisp/emacs-lisp/byte-opt.el (byte-inline-lapcode): Check how many elements
      are added to the stack.
      (byte-compile-splice-in-already-compiled-code): Don't touch lexical nor
      byte-compile-depth now that byte-inline-lapcode does it for us.
      (byte-compile-inline-expand): Don't inline dynbind byte code into
      lexbind code, since it has to be done differently.
      
      * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn):
      Correctly extract arglist from `closure's.
      (byte-compile-cl-warn): Compiler-macros are run earlier now.
      (byte-compile-top-level): Bind byte-compile-lexical-environment to nil,
      except for lambdas.
      (byte-compile-form): Don't run the compiler-macro expander here.
      (byte-compile-let): Merge with byte-compile-let*.
      Don't preserve-body-value if the body's value was discarded.
      
      * lisp/emacs-lisp/cconv.el (cconv--set-diff, cconv--set-diff-map)
      (cconv--map-diff, cconv--map-diff-elem, cconv--map-diff-set): New funs.
      (cconv--env-var): New constant.
      (cconv-closure-convert-rec): Use it and use them.  Fix a typo that
      ended up forgetting to remove entries from lmenvs in `let'.
      For `lambda' use the outer `fvrs' when building the closure and don't
      forget to remove `vars' from the `emvrs' and `lmenvs' of the body.
      
      * lisp/emacs-lisp/cl-macs.el (cl-byte-compile-block): Disable optimization
      in lexbind, because it needs a different implementation.
      
      * src/bytecode.c (exec_byte_code): Fix handling of &rest.
      
      * src/eval.c (Vinternal_interpreter_environment): Remove.
      (syms_of_eval): Do declare Vinternal_interpreter_environment as
      a global lisp var, but unintern it to hide it.
      (Fcommandp):
      * src/data.c (Finteractive_form): Understand `closure's.
      b38b1ec0
  5. 12 Feb, 2011 2 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/byte-lexbind.el: Delete. · ce5b520a
      Stefan Monnier authored
      * lisp/emacs-lisp/bytecomp.el (byte-compile-current-heap-environment)
      (byte-compile-current-num-closures): Remove vars.
      (byte-vec-ref, byte-vec-set): Remove byte codes.
      (byte-compile-arglist-vars, byte-compile-make-lambda-lexenv): Move from
      byte-lexbind.el.
      (byte-compile-lambda): Never build a closure.
      (byte-compile-closure-code-p, byte-compile-make-closure): Remove.
      (byte-compile-closure): Simplify.
      (byte-compile-top-level): Don't mess with heap environments.
      (byte-compile-dynamic-variable-bind): Always maintain
      byte-compile-bound-variables.
      (byte-compile-variable-ref, byte-compile-variable-set): Always just use
      the stack for lexical vars.
      (byte-compile-push-binding-init): Simplify.
      (byte-compile-not-lexical-var-p): New function, moved from cconv.el.
      (byte-compile-bind, byte-compile-unbind): New functions, moved and
      simplified from byte-lexbind.el.
      (byte-compile-let, byte-compile-let*): Simplify.
      (byte-compile-condition-case): Don't add :fun-body to the bound vars.
      (byte-compile-defmacro): Simplify.
      * lisp/emacs-lisp/byte-opt.el (byte-compile-side-effect-free-ops)
      (byte-optimize-lapcode): Remove byte-vec-ref and byte-vec-set.
      * lisp/emacs-lisp/cconv.el (cconv-not-lexical-var-p): Remove.
      (cconv-freevars, cconv-analyse-function, cconv-analyse-form):
      Use byte-compile-not-lexical-var-p instead.
      * src/bytecode.c (Bvec_ref, Bvec_set): Remove.
      (exec_byte_code): Don't handle them.
      * lisp/help-fns.el (describe-function-1): Fix paren typo.
      ce5b520a
    • Stefan Monnier's avatar
      Merge from trunk · c530e1c2
      Stefan Monnier authored
      c530e1c2
  6. 11 Feb, 2011 8 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
    • Deniz Dogan's avatar
    • Glenn Morris's avatar
    • Glenn Morris's avatar
    • Glenn Morris's avatar
      lwlib/Makefile.in misc cleanup. · 8f45ebb8
      Glenn Morris authored
      * lwlib/Makefile.in (USE_X_TOOLKIT, RM, TOOLKIT_DEFINES): Remove.
      (ALL_CFLAGS): Remove -I.
      (config_h, lisp_h, src_h): New variables.
      (globals_h): Rename from $globals.
      ($(globals_h)): Check cd exit status.
      (lwlib.o): Remove special rule.
      (lwlib-utils.o, lwlib.o, lwlib-Xlw.o, lwlib-Xaw.o, lwlib-Xm.o, xlwmenu.o):
      Add lisp.h and config.h to prereqs.
      (lwlib-utils.o): Add lwlib.h to prereqs.
      (lwlib.o): Add lwlib-utils.h and lwlib-Xm.h to prereqs.
      (lwlib-Xlw.o): Add xlwmenu.h to prereqs.
      (xlwmenu.o): Add ../src/xterm.h to prereqs.
      (mostlyclean): Forget about "core" files.
      8f45ebb8
    • Glenn Morris's avatar
      eb5141d9
    • Juanma Barranquero's avatar
  7. 10 Feb, 2011 18 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
    • Antoine Levitt's avatar
    • Stefan Monnier's avatar
      59003be9
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/smie.el (smie-blink-matching-open): Don't use `pos' in two · 9517f8af
      Stefan Monnier authored
      conflicting ways.
      (smie-indent--parent): Extend to "parent of arg".
      (smie-indent-inside-string): New function.
      (smie-indent-functions): Use it.
      9517f8af
    • Stefan Monnier's avatar
      * lisp/vc/vc-dir.el (vc-dir-refresh): Reorder operations to try and avoid · cf77dd27
      Stefan Monnier authored
      bzr locking race condition.
      cf77dd27
    • Stefan Monnier's avatar
      665addc9
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/edebug.el (edebug-instrument-function): Check a marker is · 49ffc078
      Stefan Monnier authored
      still valid before using it.
      49ffc078
    • Stefan Monnier's avatar
      * lisp/progmodes/grep.el (grep-mode-font-lock-keywords): Adjust to · 1a0a6cef
      Stefan Monnier authored
      `message' -> `compilation-message' rename.
      
      Fixes: debbugs:8004
      1a0a6cef
    • 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
    • Stefan Monnier's avatar
      Move keymap initialization into declaration. · b016851c
      Stefan Monnier authored
      * lisp/textmodes/enriched.el (enriched-mode-map):
      * lisp/textmodes/bib-mode.el (bib-mode-map):
      * lisp/term/lk201.el (lk201-function-map):
      * lisp/tar-mode.el (tar-mode-map):
      * lisp/replace.el (occur-mode-map):
      * lisp/progmodes/idlwave.el (idlwave-rinfo-mouse-map, idlwave-rinfo-map):
      * lisp/progmodes/idlw-help.el (idlwave-help-mode-map):
      * lisp/progmodes/gdb-mi.el (gdb-memory-format-menu, gdb-memory-unit-menu):
      * lisp/play/solitaire.el (solitaire-mode-map):
      * lisp/play/snake.el (snake-mode-map, snake-null-map):
      * lisp/play/pong.el (pong-mode-map):
      * lisp/play/handwrite.el (menu-bar-handwrite-map):
      * lisp/play/gametree.el (gametree-mode-map):
      * lisp/net/rcirc.el (rcirc-mode-map, rcirc-browse-url-map
      (rcirc-multiline-minor-mode-map, rcirc-track-minor-mode-map):
      * lisp/net/newst-plainview.el (newsticker-menu, newsticker-mode-map)
      (newsticker--url-keymap):
      * lisp/net/net-utils.el (nslookup-mode-map, ftp-mode-map):
      * lisp/menu-bar.el (menu-bar-file-menu, menu-bar-i-search-menu)
      (menu-bar-search-menu, menu-bar-replace-menu, menu-bar-goto-menu)
      (menu-bar-edit-menu, menu-bar-custom-menu)
      (menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
      (menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
      (menu-bar-line-wrapping-menu, menu-bar-options-menu)
      (menu-bar-games-menu, menu-bar-encryption-decryption-menu)
      (menu-bar-tools-menu, menu-bar-describe-menu)
      (menu-bar-search-documentation-menu, menu-bar-manuals-menu)
      (menu-bar-help-menu):
      * lisp/mail/rmailsum.el (rmail-summary-mode-map):
      * lisp/kmacro.el (kmacro-step-edit-map):
      * lisp/ibuffer.el (ibuffer-mode-groups-popup, ibuffer-mode-map)
      (ibuffer-mode-operate-map):
      * lisp/hi-lock.el (hi-lock-menu, hi-lock-map):
      * lisp/emulation/vip.el (vip-mode-map):
      * lisp/emacs-lisp/re-builder.el (reb-lisp-mode-map):
      * lisp/bookmark.el (bookmark-bmenu-mode-map):
      * lisp/help-mode.el (help-mode-map):
      * lisp/erc/erc-list.el (erc-list-menu-mode-map):
      * lisp/org/org-remember.el (org-remember-mode-map):
      * lisp/org/org-src.el (org-src-mode-map): Move initialization into declaration.
      b016851c
    • Deniz Dogan's avatar
      * lisp/net/rcirc.el: Add PRIVMSG and CTCP functions. · 1be1d1e9
      Deniz Dogan authored
      (rcirc-send-privmsg, rcirc-send-ctcp): New functions.
      (rcirc-keepalive, rcirc-cmd-ctcp, rcirc-ctcp-sender-PING)
      (rcirc-cmd-me, rcirc-authenticate): Use them.
      1be1d1e9
    • Glenn Morris's avatar
      lwlib/ trivia. · 67f02b82
      Glenn Morris authored
      * lwlib-Xaw.c, lwlib-Xlw.c, lwlib-Xm.c, lwlib-utils.c, lwlib.c, xlwmenu.c:
      Standardize on <> for includes from the ../src directory.
      67f02b82
    • Paul Eggert's avatar
      Undo my previous commit, as per Stefan. · 6ffb2c0c
      Paul Eggert authored
      6ffb2c0c
    • Paul Eggert's avatar
      102252aa
    • Glenn Morris's avatar
      * src/Makefile.in (really-lwlib): Depend on globals.h, for parallel builds. · 5ac75e8f
      Glenn Morris authored
      Otherwise, lwlib/ and src/ would try to run make-docfile at the same
      time, and one of them would lose when its output file disappeared.
      5ac75e8f
    • Paul Eggert's avatar
      988c07df
    • Ken Manheimer's avatar
      * allout.el: Synopsis: Change allout user configuration so auto-activation · 26d2a9bd
      Ken Manheimer authored
      is controlled solely by customization `allout-auto-activation'.
      26d2a9bd
    • Ken Manheimer's avatar
      Synopsis: Change allout user configuration so auto-activation is controlled · 11c46e15
      Ken Manheimer authored
      solely by customization `allout-auto-activation'.
      
      (allout-auto-activation-helper) (allout-setup): New autoloads implement new
      custom set procedure for allout-auto-activation.  Also, explicitly invoke
      (allout-setup) after allout-auto-activation is custom-defined, to effect
      the settings in emacs sessions besides the few where allout-auto-activation
      customization is donea.
      (allout-auto-activation): Use allout-auto-activation-helper to :set.
      Revise the docstring.
      (allout-init): Reduce functionality to just customizing
      allout-auto-activation, and mark obsolete.
      (allout-mode): Respect string values for allout-auto-activation.  Run
      allout-after-copy-or-kill-hook without any args.
      (allout-mode) (allout-layout) (allout-default-layout) (outlineify-sticky):
      Adjust docstring for new scheme.
      (allout-after-copy-or-kill-hook): No arguments - hook implementers should
      concentrate on the kill ring.
      11c46e15
  8. 09 Feb, 2011 8 commits