1. 23 Jun, 2011 1 commit
  2. 20 Jun, 2011 1 commit
  3. 01 Jun, 2011 2 commits
    • Stefan Monnier's avatar
      Silence various byte-compiler warnings. · 2403c841
      Stefan Monnier authored
      * lisp/emacs-lisp/byte-run.el (make-obsolete-variable): New argument
      `access-type' and new obsolescence format.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-warn-obsolete): Adjust to
      new format.
      (byte-compile-check-variable): New `access-type' argument.
      Only warn if the access-type is obsolete.
      (byte-compile-dynamic-variable-bind, byte-compile-variable-ref)
      (byte-compile-variable-set): Adjust callers.
      * lisp/help-fns.el (describe-variable): Adjust to new obsolescence format.
      * lisp/mail/sendmail.el (mail-mailer-swallows-blank-line): Only mark
      setting it as obsolete.
      * lisp/simple.el (minibuffer-completing-symbol):
      * lisp/font-lock.el (font-lock-beginning-of-syntax-function): Only mark read
      access as obsolete.
      * lisp/minibuffer.el (minibuffer-completing-file-name): Don't make it
      obsolete yet.
      * lisp/international/quail.el (quail-mouse-choose-completion): Remove unused
      code referring to obsolete var.
      (quail-choose-completion-string): Remove.
      * lisp/server.el (server-clients-with, server-kill-buffer-query-function)
      (server-kill-emacs-query-function): Silence "unused `proc'" warnings.
      * lisp/proced.el (proced-send-signal):
      * lisp/emacs-lisp/lisp.el (lisp-complete-symbol):
      Replace completion-annotate-function with completion-extra-properties.
      2403c841
    • Stefan Monnier's avatar
      * lisp/minibuffer.el (minibuffer-inactive-mode-map): New var. · fd6fa53f
      Stefan Monnier authored
      (minibuffer-inactive-mode): New major mode.
      * src/minibuf.c (get_minibuffer, read_minibuf_unwind): Call it.
      * lisp/mouse.el (mouse-drag-region): Remove the "mouse-1 pops up
      the *Messages* buffer" hack.
      (mouse-popup-menubar): Don't burp if the event is a normal key.
      fd6fa53f
  4. 31 May, 2011 2 commits
    • Stefan Monnier's avatar
      * lisp/minibuffer.el (complete-with-action): Return nil for the metadata and · 30a23501
      Stefan Monnier authored
      boundaries of non-functional tables.
      (completion-table-dynamic): Return nil for the metadata.
      (completion-table-with-terminator): Add default case, using
      complete-with-action.
      (completion--metadata): New function.
      (completion-all-sorted-completions, minibuffer-completion-help): Use it
      to try and avoid pathological performance problems.
      (completion--embedded-envvar-table): Return `category' metadata.
      30a23501
    • Stefan Monnier's avatar
      * lisp/minibuffer.el: Add metadata method to completion tables. · 620c53a6
      Stefan Monnier authored
      (completion-category-overrides): New defcustom.
      (completion-metadata, completion--field-metadata)
      (completion-metadata-get, completion--styles)
      (completion--cycle-threshold): New functions.
      (completion-try-completion, completion-all-completions):
      Add `metadata' argument to choose completion-styles.
      (completion--do-completion): Use metadata to choose cycling.
      (completion-all-sorted-completions): Use metadata for sorting.
      Remove :completion-cycle-penalty which is not needed any more.
      (completion--try-word-completion): Add `metadata' argument.
      (minibuffer-completion-help): Check metadata for annotation function
      and sorting.
      (completion-file-name-table): Return `category' metadata.
      (minibuffer-completing-file-name): Make obsolete.
      * lisp/simple.el (minibuffer-completing-symbol): Make obsolete.
      * lisp/icomplete.el (icomplete-completions): Pass new `metadata' param to
      completion-try-completion.
      * src/minibuf.c (Finternal_complete_buffer): Return `category' metadata.
      (read_minibuf): Use get_minibuffer.
      (syms_of_minibuf): Use DEFSYM.
      (Qmetadata): New var.
      * src/data.c (Qbuffer): Don't make it static.
      (syms_of_data): Use DEFSYM.
      620c53a6
  5. 28 May, 2011 1 commit
    • Stefan Monnier's avatar
      * lisp/minibuffer.el (completion--capf-wrapper): Check applicability before · 0ff8e1ba
      Stefan Monnier authored
      retuning non-nil for non-exclusive completion data.
      * lisp/progmodes/etags.el (tags-completion-at-point-function):
      * lisp/info-look.el (info-lookup-completions-at-point): Mark as non-exclusive.
      (info-complete): Adjust accordingly.
      * lisp/erc/erc-pcomplete.el (erc-pcompletions-at-point): Mark the completion
      data as non-exclusive if it's using the default-completion-function.
      (pcomplete-erc-parse-arguments): Rename pcomplete-parse-erc-arguments.
      (pcomplete-erc-setup): Use new name.
      0ff8e1ba
  6. 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
  7. 04 May, 2011 1 commit
  8. 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
  9. 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
  10. 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
  11. 10 Apr, 2011 2 commits
  12. 05 Apr, 2011 1 commit
  13. 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
  14. 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
  15. 21 Mar, 2011 1 commit
  16. 17 Mar, 2011 1 commit
  17. 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
  18. 21 Feb, 2011 1 commit
  19. 12 Feb, 2011 1 commit
  20. 25 Jan, 2011 1 commit
  21. 15 Jan, 2011 1 commit
  22. 02 Jan, 2011 1 commit
  23. 06 Dec, 2010 1 commit
  24. 18 Nov, 2010 1 commit
  25. 08 Nov, 2010 1 commit
  26. 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
  27. 17 Oct, 2010 1 commit
  28. 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
  29. 30 Sep, 2010 1 commit
  30. 29 Aug, 2010 1 commit
  31. 24 Jun, 2010 1 commit
  32. 30 May, 2010 1 commit
  33. 12 May, 2010 1 commit
  34. 11 May, 2010 1 commit
  35. 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
  36. 07 May, 2010 1 commit