1. 24 May, 2011 1 commit
    • Stefan Monnier's avatar
      Add an :exit-function for completion-at-point. · a2a25d24
      Stefan Monnier authored
      * lisp/minibuffer.el (completion--done): New fun.
      (completion--do-completion): Use it.  New arg `expect-exact'.
      (minibuffer-complete, minibuffer-complete-word): Don't output message,
      since completion--do-completion does it for us now.
      (minibuffer-force-complete): Use completion--done and
      completion--replace.  Handle sole-completion case with more care.
      (minibuffer-complete-and-exit): Use new `expect-exact' arg.
      (completion-extra-properties): New var.
      (completion-annotate-function): Make obsolete.
      (minibuffer-completion-help): Adjust accordingly.
      Use completion-list-insert-choice-function.
      (completion-at-point, completion-help-at-point):
      Bind completion-extra-properties.
      (completion-pcm-word-delimiters): Add | (for uniquify, for example).
      * lisp/simple.el (completion-list-insert-choice-function): New var.
      (completion-setup-function): Preserve it.
      (choose-completion): Pay attention to it, shuffle the code a bit.
      (choose-completion-string): New arg `insert-function'.
      
      * lisp/textmodes/bibtex.el: Convert to lexical binding.
      (bibtex-mode-map): Use completion-at-point.
      (bibtex-mode): Use define-derived-mode&completion-at-point-functions.
      (bibtex-completion-at-point-function): New fun, from bibtex-complete.
      (bibtex-complete): Define as obsolete alias.
      (bibtex-complete-internal): Remove.
      (bibtex-format-entry): Remove unused sub-group in regexp.
      * lisp/shell.el (shell--command-completion-data)
      (shell-environment-variable-completion):
      * lisp/pcomplete.el (pcomplete-completions-at-point):
      * lisp/comint.el (comint--complete-file-name-data): Use :exit-function
      instead of completion-table-with-terminator so it also works for
      choose-completion.
      a2a25d24
  2. 04 May, 2011 1 commit
  3. 28 Apr, 2011 1 commit
    • Stefan Monnier's avatar
      Make MH-E use completion-at-point · d1bb6623
      Stefan Monnier authored
      * lisp/mh-e/mh-letter.el (mh-letter-completion-at-point): New function,
      extracted from mh-letter-complete
      (mh-letter-mode, mh-letter-complete, mh-letter-complete-or-space): Use it.
      (mh-complete-word): Only use the common-substring arg when it works.
      (mh-folder-expand-at-point):
      * lisp/mh-e/mh-alias.el (mh-alias-letter-expand-alias): Return data suitable
      for completion-at-point-functions.
      * lisp/mh-e/mh-utils.el (mh-folder-completion-function): Make it work like
      file-name completion, so partial-completion can do its job.
      * lisp/minibuffer.el (completion-at-point, completion-help-at-point):
      Don't presume that a given completion-at-point-function will always
      use the same calling convention.
      d1bb6623
  4. 20 Apr, 2011 2 commits
    • Stefan Monnier's avatar
      * lisp/shell.el: Use lexical-binding and std completion UI. · c0a193ea
      Stefan Monnier authored
      (shell-filter-ctrl-a-ctrl-b): Work as a preoutput filter.
      (shell-mode): Put shell-filter-ctrl-a-ctrl-b on
      comint-preoutput-filter-functions rather than on
      comint-output-filter-functions.
      (shell-command-completion, shell--command-completion-data)
      (shell-filename-completion, shell-environment-variable-completion)
      (shell-c-a-p-replace-by-expanded-directory): New functions.
      (shell-dynamic-complete-functions, shell-dynamic-complete-command)
      (shell-dynamic-complete-filename, shell-replace-by-expanded-directory)
      (shell-dynamic-complete-environment-variable): Use them.
      (shell-dynamic-complete-as-environment-variable)
      (shell-dynamic-complete-as-command): Remove.
      (shell-match-partial-variable): Match past point.
      * lisp/comint.el: Clean up use of completion-at-point-functions.
      (comint-completion-at-point): New function.
      (comint-mode): Use it completion-at-point-functions.
      (comint-dynamic-complete): Make it obsolete.
      (comint-replace-by-expanded-history-before-point): Add dry-run arg.
      (comint-c-a-p-replace-by-expanded-history): New function.
      (comint-dynamic-complete-functions)
      (comint-replace-by-expanded-history): Use it.
      * lisp/minibuffer.el (completion-table-with-terminator): Allow dynamic
      termination strings.  Try harder to avoid second try-completion.
      (completion-in-region-mode-map): Disable bindings that don't work yet.
      c0a193ea
    • Stefan Monnier's avatar
      * lisp/comint.el: Use lexical-binding. Use std completion UI. Require CL. · 2dbaa080
      Stefan Monnier authored
      (comint-dynamic-complete-functions): Use comint-filename-completion.
      (comint-completion-addsuffix): Tweak custom type.
      (comint-filename-completion, comint--common-suffix)
      (comint--common-quoted-suffix, comint--table-subvert)
      (comint--complete-file-name-data): New functions.
      (comint-dynamic-complete-as-filename, comint-dynamic-complete-filename)
      (comint-dynamic-list-filename-completions): Use them.
      (comint-dynamic-simple-complete): Make obsolete.
      * lisp/minibuffer.el (completion-in-region-mode):
      Keep completion-in-region-mode--predicate global.
      (completion-in-region--postch):
      Assume completion-in-region-mode--predicate is not null.
      2dbaa080
  5. 14 Apr, 2011 1 commit
    • Stefan Monnier's avatar
      * lisp/minibuffer.el (completion-in-region-mode-predicate) · e240cc21
      Stefan Monnier authored
      (completion-in-region-mode--predicate): New vars.
      (completion-in-region, completion-in-region--postch)
      (completion-in-region-mode): Use them.
      (completion--capf-wrapper): Also return the hook function.
      (completion-at-point, completion-help-at-point):
      Adjust and provide a predicate.
      e240cc21
  6. 10 Apr, 2011 2 commits
  7. 05 Apr, 2011 1 commit
  8. 30 Mar, 2011 1 commit
    • Stefan Monnier's avatar
      (completion-in-region): Pop down *Completions* automatically. · 3e2d70fd
      Stefan Monnier authored
      * lisp/minibuffer.el (completion-table-dynamic): Optimize `boundaries'.
      (completion-in-region-mode): New minor mode.
      (completion-in-region): Use it.
      (completion-in-region--data, completion-in-region-mode-map): New vars.
      (completion-in-region--postch): New function.
      (completion--capf-misbehave-funs, completion--capf-safe-funs): New vars.
      (completion--capf-wrapper): New function.
      (completion-at-point): Use it to track well-behavedness of hook functions.
      (completion-help-at-point): New command.
      3e2d70fd
  9. 24 Mar, 2011 1 commit
    • Stefan Monnier's avatar
      First step towards using standard completion in comint. · d86d2721
      Stefan Monnier authored
      * lisp/minibuffer.el (completion--flush-all-sorted-completions):
      Remove itself from hook.
      (completion-at-point): Let the functions perform the completion
      immediately and return nil or t.
      * lisp/comint.el (comint-dynamic-complete-functions): Now identical to
      completion-at-point-functions.
      (comint-dynamic-list-input-ring): Remove unused var `index'.
      (comint--match-partial-filename, comint--unquote&expand-filename):
      New funs, split from comint-match-partial-filename.
      (comint-dynamic-complete): Use completion-at-point.
      (comint-dynamic-complete-filename): Use comint--match-partial-filename.
      d86d2721
  10. 21 Mar, 2011 1 commit
  11. 17 Mar, 2011 1 commit
  12. 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
  13. 21 Feb, 2011 1 commit
  14. 12 Feb, 2011 1 commit
  15. 25 Jan, 2011 1 commit
  16. 15 Jan, 2011 1 commit
  17. 02 Jan, 2011 1 commit
  18. 06 Dec, 2010 1 commit
  19. 18 Nov, 2010 1 commit
  20. 08 Nov, 2010 1 commit
  21. 28 Oct, 2010 1 commit
    • Stefan Monnier's avatar
      * lisp/minibuffer.el (completion-cycling): New var. · 6175cd08
      Stefan Monnier authored
      (minibuffer-complete, completion--do-completion):
      Use completion--flush-all-sorted-completions.
      (minibuffer-complete): Only cycle if completion-cycling is set.
      (completion--flush-all-sorted-completions): Unset completion-cycling.
      (minibuffer-force-complete): Set completion-cycling.
      (completion-all-sorted-completions): Move declaration before first use.
      
      Fixes: debbugs:7266
      6175cd08
  22. 17 Oct, 2010 1 commit
  23. 03 Oct, 2010 1 commit
    • Chong Yidong's avatar
      Use lexical-let to avoid false matches in var completion (Bug#7056). · 397ae226
      Chong Yidong authored
      * lisp/minibuffer.el (completion--some, completion--do-completion)
      (minibuffer-complete-and-exit, minibuffer-completion-help)
      (completion-basic-try-completion)
      (completion-basic-all-completions)
      (completion-pcm--find-all-completions): Use lexical-let to
      avoid some false matches in variable completion (Bug#7056)
      397ae226
  24. 30 Sep, 2010 1 commit
  25. 29 Aug, 2010 1 commit
  26. 24 Jun, 2010 1 commit
  27. 30 May, 2010 1 commit
  28. 12 May, 2010 1 commit
  29. 11 May, 2010 1 commit
  30. 09 May, 2010 1 commit
    • Stefan Monnier's avatar
      * minibuffer.el (completion-pcm-complete-word-inserts-delimiters): · 79ccd68f
      Stefan Monnier authored
      New custom variable.
      (completion-pcm--string->pattern): Use it.
      (completion-pcm--pattern->regex, completion-pcm--pattern->string):
      Make it handle any symbol as `any'.
      (completion-pcm--merge-completions): Extract common suffix for the new
      `prefix' symbol as well.
      (completion-substring--all-completions): Use the new `prefix' symbol.
      79ccd68f
  31. 07 May, 2010 3 commits
  32. 06 May, 2010 1 commit
  33. 01 May, 2010 1 commit
  34. 30 Apr, 2010 1 commit
  35. 29 Apr, 2010 1 commit
    • Chong Yidong's avatar
      * minibuffer.el (tags-completion-at-point-function): New function. · 3a07ffce
      Chong Yidong authored
      (completion-at-point-functions): Use it.
      
      * cedet/semantic.el (semantic-completion-at-point-function): New function.
      (semantic-mode): Use semantic-completion-at-point-function for
      completion-at-point-functions instead.
      
      * progmodes/etags.el (complete-tag): Revert last change.
      3a07ffce
  36. 28 Apr, 2010 1 commit
    • Chong Yidong's avatar
      Unify complete-symbol with completion-at-point. · 48111a85
      Chong Yidong authored
      * bindings.el (complete-symbol): Move into minibuffer.el.
      
      * minibuffer.el (complete-tag): Move from etags.el.  If tags
      completion cannot be performed, return nil instead of signalling
      an error.
      (completion-at-point): Make it an alias for complete-symbol.
      (complete-symbol): Move from bindings.el, and replace with the
      body of completion-at-point.
      
      * progmodes/etags.el (complete-tag): Move to minibuffer.el.
      
      * cedet/semantic.el (semantic-mode): When enabled, add
      semantic-ia-complete-symbol to completion-at-point-functions.
      
      * cedet/semantic/ia.el (semantic-ia-complete-symbol): Return nil
      if Semantic is not active.
      48111a85