1. 15 Jun, 2011 1 commit
  2. 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.
  3. 10 Feb, 2011 1 commit
  4. 25 Jan, 2011 1 commit
  5. 02 Jan, 2011 1 commit
  6. 26 Nov, 2010 1 commit
  7. 17 Nov, 2010 1 commit
    • Stefan Monnier's avatar
      * emacs-lisp/smie.el (smie-bnf-classify): Signal errors for tokens · e2f454c4
      Stefan Monnier authored
      that are both openers (resp. closers) and something else.
      (smie-grammar): Loosen definition of valid values.
      (smie-next-sexp, smie-down-list, smie-blink-matching-open)
      (smie-indent--parent, smie-rule-parent, smie-indent-keyword)
      (smie-indent-after-keyword): Adjust users.
      (smie-indent-keyword): Don't indent empty lines.
  8. 12 Nov, 2010 1 commit
  9. 11 Nov, 2010 1 commit
  10. 07 Nov, 2010 2 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/smie.el: New package. · 7f925a67
      Stefan Monnier authored
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/smie.el: Simplify the smie-rules-function return values. · 674728d4
      Stefan Monnier authored
      (smie-precs->prec2): Rename from smie-precs-precedence-table.
      (smie-bnf->prec2): Rename from smie-bnf-precedence-table.
      (smie-prec2->grammar): Rename from smie-prec2-levels.
      (smie-grammar): Rename from smie-op-levels.
      (smie-indent--hanging-p): Rename from smie-hanging-p.
      (smie-rule-hanging-p): New alias.
      (smie-indent--bolp): Rename from smie-bolp.
      (smie-indent--hanging-p): New alias.
      (smie--token): New dynamically bound variable.
      (smie-indent--parent): New function.
      (smie-rule-parent-p): Use it; rename from smie-parent-p.
      (smie-rule-next-p): Rename from smie-next-p.
      (smie-rule-prev-p): Rename from smie-prev-p.
      (smie-rule-sibling-p, smie-rule-parent)
      (smie-indent--separator-outdent, smie-rule-separator): New functions.
      (smie-rule-separator-outdent): New var.
      (smie-indent--rule): Merge with smie-indent--column.
      (smie-indent-forward-token, smie-indent-backward-token):
      Also recognize close parens.
      (smie-indent-keyword): Don't use smie-indent--column any more.
      (smie-indent-after-keyword): Ignore closers by default.
      (smie-indent-line): Use with-demoted-errors.
      * lisp/progmodes/octave-mod.el (octave-smie-grammar):
      Rename from octave-smie-op-levels.
      (octave-smie-rules): Adjust to new behavior.
      * lisp/progmodes/prolog.el (prolog-smie-grammar):
      Rename from prolog-smie-op-levels.
  11. 01 Nov, 2010 1 commit
  12. 29 Oct, 2010 1 commit
    • Stefan Monnier's avatar
      SMIE: change indent rules format, improve smie-setup. · c4d17d50
      Stefan Monnier authored
      * lisp/emacs-lisp/smie.el (smie-precs-precedence-table)
      (smie-merge-prec2s, smie-bnf-precedence-table, smie-prec2-levels):
      Mark them pure so the tables gets built at compile time.
      (smie-bnf-precedence-table): Store the closer-alist in the table.
      (smie-prec2-levels): Preserve the closer-alist.
      (smie-blink-matching-open): Be more forgiving in case of indentation.
      (smie-hanging-p): Rename from smie-indent--hanging-p.
      (smie-bolp): Rename from smie-indent--bolp.
      (smie--parent, smie--after): New dynamic vars.
      (smie-parent-p, smie-next-p, smie-prev-p): New funs.
      (smie-indent-rules): Remove.
      (smie-indent--offset-rule): Remove fun.
      (smie-rules-function): New var.
      (smie-indent--rule): New fun.
      (smie-indent--offset, smie-indent-keyword, smie-indent-after-keyword)
      (smie-indent-exps): Use it.
      (smie-setup): Setup paren blinking; add keyword args for token
      functions; extract closer-alist from op-levels.
      (smie-indent-debug-log): Remove var.
      (smie-indent-debug): Remove fun.
      * lisp/progmodes/prolog.el (prolog-smie-indent-rules): Remove.
      (prolog-smie-rules): New fun to replace it.
      (prolog-mode-variables): Simplify.
      * lisp/progmodes/octave-mod.el (octave-smie-closer-alist): Remove, now that
      it's setup automatically.
      (octave-smie-indent-rules): Remove.
      (octave-smie-rules): New fun to replace it.
      (octave-mode): Simplify.
  13. 07 Oct, 2010 1 commit
    • Stefan Monnier's avatar
      SMIE: Reliably distinguish openers/closers in smie-prec2-levels · 29c72a6e
      Stefan Monnier authored
      * lisp/emacs-lisp/smie.el (smie-bnf-classify): New function.
      (smie-bnf-precedence-table): Use it to remember the closers/openers.
      (smie-merge-prec2s): Handle those new entries.
      (smie-prec2-levels): Only set precedence to nil for actual
      * lisp/progmodes/octave-mod.el (octave-smie-op-levels): Remove dummy entry
      that is now unnecessary.
  14. 21 Sep, 2010 1 commit
  15. 20 Sep, 2010 1 commit
  16. 19 Sep, 2010 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/smie.el (smie-bnf-precedence-table): Improve error message. · 2bc01104
      Stefan Monnier authored
      (smie-debug--prec2-cycle, smie-debug--describe-cycle): New functions.
      (smie-prec2-levels): Use them to better diagnose precedence cycles.
      (smie-blink-matching-check): Don't signal a mismatch if car is t.
      (smie-blink-matching-open): Rewrite to remove assumptions, so that
      something like "." can also be a closer.
      (smie--associative-p, smie-indent--hanging-p, smie-indent--bolp)
      (smie-indent--offset, smie-indent--offset-rule, smie-indent--column):
      Rename internal functions to use "--".  Update callers.
  17. 03 Sep, 2010 1 commit
    • Stefan Monnier's avatar
      Provide blink-matching support to SMIE. · a49e651e
      Stefan Monnier authored
      * lisp/emacs-lisp/smie.el (smie-bnf-closer-alist): New function.
      (smie-blink-matching-triggers, smie-blink-matching-inners): New vars.
      (smie-blink-matching-check, smie-blink-matching-open): New functions.
  18. 31 Aug, 2010 1 commit
  19. 30 Aug, 2010 1 commit
  20. 18 Aug, 2010 3 commits
    • Stefan Monnier's avatar
      Reindent smie.el · 710a7f46
      Stefan Monnier authored
    • Stefan Monnier's avatar
    • Stefan Monnier's avatar
      Try and remove some of SMIE's black magic by generalizing some rules. · 8723cfa4
      Stefan Monnier authored
      * lisp/emacs-lisp/smie.el (smie-default-backward-token)
      (smie-default-forward-token): Strip properties.
      (smie-next-sexp): Be more careful with associative operators.
      (smie-forward-sexp-command): Generalize.
      (smie-backward-sexp-command): Simplify.
      (smie-closer-alist): New var.
      (smie-close-block): New command.
      (smie-indent-debug-log): New var.
      (smie-indent-offset-rule): Add a few more cases.
      (smie-indent-column): New function.
      (smie-indent-after-keyword): Use it.
      (smie-indent-keyword): Use it.
      Fix up the opener code's point position.
      (smie-indent-comment): Only applies at BOL.
      (smie-indent-debug): New command.
  21. 09 Jun, 2010 2 commits
  22. 07 Jun, 2010 2 commits
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/smie.el (smie-indent-offset-rule): Rename from · 83156c18
      Stefan Monnier authored
      smie-indent-offset-after.  Add :prev case.  Make a bit more generic.
      (smie-indent-virtual): Remove `virtual' arg.  Update callers.
      (smie-indent-keyword): Add handling of open-paren keywords.
      (smie-indent-comment-continue): Don't assume comment-continue.
    • Stefan Monnier's avatar
      Make (after keyword) indent-rules more flexible. · c2ea5810
      Stefan Monnier authored
      * lisp/emacs-lisp/smie.el (smie-indent-offset-after)
      (smie-indent-forward-token, smie-indent-backward-token): New functions.
      (smie-indent-after-keyword): Use them.
      (smie-indent-fixindent): Only applies to the indentation of the BOL.
      (smie-indent-keyword): Tweak the black magic.
      (smie-indent-comment-continue): Strip comment-continue before use.
      (smie-indent-functions): Indent comments before keywords.
  23. 03 Jun, 2010 2 commits
  24. 02 Jun, 2010 1 commit
  25. 27 May, 2010 1 commit
    • Stefan Monnier's avatar
      Provide hooks to use a different tokenizer in SMIE. · 11e4d8c0
      Stefan Monnier authored
      * lisp/emacs-lisp/smie.el (smie-forward-token-function)
      (smie-backward-token-function): New vars.
      (smie-backward-sexp, smie-forward-sexp)
      (smie-indent-hanging-p, smie-indent-calculate): Use them.
      (smie-default-backward-token): Rename from smie-backward-token and
      skip comments.
      (smie-default-forward-token): Rename from smie-forward-token and
      skip comments.
      (smie-next-sexp): Handle nil results from next-token.
      (smie-indent-calculate): Add a new case for special `fixindent' comments.
  26. 25 May, 2010 1 commit
  27. 18 May, 2010 3 commits
  28. 17 May, 2010 1 commit