summaryrefslogtreecommitdiff
path: root/lisp/minibuffer.el
Commit message (Collapse)AuthorAgeFilesLines
* * lisp/minibuffer.el (completion--replace): Inherit surrounding properties.Stefan Monnier2011-10-171-4/+2
| | | | | | (minibuffer-complete-and-exit): Use it. Fixes: debbugs:114
* * lisp/minibuffer.el (completion-file-name-table): Fix last change,Stefan Monnier2011-10-111-51/+52
| | | | i.e. ignore normal errors but not the other ones.
* * lisp/minibuffer.el (completion-table-case-fold): Use currying.Stefan Monnier2011-10-031-14/+21
| | | | | | | | (completion--styles-type, completion--cycling-threshold-type): New constants. (completion-styles, completion-category-overrides) (completion-cycle-threshold): Use them. * lisp/pcomplete.el (pcomplete-completions-at-point): Adjust call to completion-table-case-fold.
* * lisp/minibuffer.el (completion-category-overrides): Fix type of stylesStephen Berman2011-10-031-6/+10
| | | | | | and add more user friendly tags. Fixes: debbugs:9660
* Improve doc strings for completion styles.Eli Zaretskii2011-09-271-2/+5
| | | | | | lisp/minibuffer.el (completion-styles) (completion-category-overrides): Cross reference each other in doc strings.
* * lisp/minibuffer.el (completion-file-name-table): Keep track of errors.Stefan Monnier2011-09-191-4/+5
| | | | | | | (completion-table-with-predicate): Handle the case where pred1 is nil. * lisp/pcomplete.el (pcomplete-completions-at-point): Simplify. Fixes: debbugs:9160
* * lisp/minibuffer.el (completion--insert-strings): Don't get confused byStefan Monnier2011-09-011-3/+7
| | | | completion entries that end with an LF char.
* Back out inadvertent changes in minibuffer.el.Eli Zaretskii2011-08-221-18/+4
|
* Fix bidi cursor motion when a line begins with a composed character.Eli Zaretskii2011-08-191-4/+18
| | | | | src/xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from a composition, take its buffer position from IT->cmp_it.charpos.
* * lisp/minibuffer.el (completion-pcm--merge-completions): Don't merge "a1b"Stefan Monnier2011-08-151-3/+17
| | | | and "a2b" to "ab" for `prefix'.
* * src/keymap.c (Fmake_composed_keymap): Move to subr.el.Stefan Monnier2011-08-031-9/+6
| | | | | | * lisp/subr.el (make-composed-keymap): Move from C. Change calling convention, and improve docstring to bring attention to a subtle point. * lisp/minibuffer.el (completing-read-default): Adjust accordingly.
* * minibuffer.el (completion-in-region): Document PREDICATELars Magne Ingebrigtsen2011-07-021-1/+3
| | | | (bug#7136).
* Add multiple inheritance to keymaps.Stefan Monnier2011-07-021-23/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/keymap.c (Fmake_composed_keymap): New function. (Fset_keymap_parent): Simplify. (fix_submap_inheritance): Remove. (access_keymap_1): New function extracted from access_keymap to handle embedded parents and handle lists of maps. (access_keymap): Use it. (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap) (Fcopy_keymap): Handle embedded parents. (Fcommand_remapping, define_as_prefix): Simplify. (Fkey_binding): Simplify. (syms_of_keymap): Move minibuffer-local-completion-map, minibuffer-local-filename-completion-map, minibuffer-local-must-match-map, and minibuffer-local-filename-must-match-map to Elisp. (syms_of_keymap): Defsubr make-composed-keymap. * src/keyboard.c (menu_bar_items): Use map_keymap_canonical. (parse_menu_item): Trivial simplification. * lisp/subr.el (remq): Don't allocate if it's not needed. (keymap--menu-item-binding, keymap--menu-item-with-binding) (keymap--merge-bindings): New functions. (keymap-canonicalize): Use them to refine the canonicalization. * lisp/minibuffer.el (minibuffer-local-completion-map) (minibuffer-local-must-match-map): Move initialization from C. (minibuffer-local-filename-completion-map): Move initialization from C; don't inherit from anything here. (minibuffer-local-filename-must-match-map): Make obsolete. (completing-read-default): Use make-composed-keymap to combine minibuffer-local-filename-completion-map with either minibuffer-local-must-match-map or minibuffer-local-filename-completion-map.
* Move completing-read-function and completing-read-default to elispLeo Liu2011-06-231-1/+34
|
* * lisp/minibuffer.el (completion-metadata): Prepend the alist with `metadata'.Stefan Monnier2011-06-201-5/+12
| | | | | | | (completion-try-completion, completion-all-completions): Compute the metadata argument if it's missing; make it optional. Fixes: debbugs:8795
* Silence various byte-compiler warnings.Stefan Monnier2011-06-011-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * lisp/minibuffer.el (minibuffer-inactive-mode-map): New var.Stefan Monnier2011-06-011-0/+28
| | | | | | | | (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.
* * lisp/minibuffer.el (complete-with-action): Return nil for the metadata andStefan Monnier2011-05-311-39/+60
| | | | | | | | | | | 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.
* * lisp/minibuffer.el: Add metadata method to completion tables.Stefan Monnier2011-05-311-48/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* * lisp/minibuffer.el (completion--capf-wrapper): Check applicability beforeStefan Monnier2011-05-271-5/+26
| | | | | | | | | | | 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.
* Add an :exit-function for completion-at-point.Stefan Monnier2011-05-231-97/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * lisp/minibuffer.el (completion--message): New function.Stefan Monnier2011-05-031-20/+17
| | | | | | | (completion--do-completion, minibuffer-complete) (minibuffer-force-complete, minibuffer-complete-word): Use it. (completion--do-completion): Don't ignore completion-auto-help when in icomplete-mode.
* Make MH-E use completion-at-pointStefan Monnier2011-04-281-2/+6
| | | | | | | | | | | | | | | * 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.
* Merge from emacs-23; up to 2010-06-09T17:54:28Z!albinus@detlef.Glenn Morris2011-04-221-1/+2
|\
| * Fix completion-auto-help/icomplete-mode bad interaction (Bug#5849).Chong Yidong2011-04-101-3/+4
| | | | | | | | | | * minibuffer.el (completion--do-completion): Avoid the "Next char not unique" prompt if icomplete-mode is enabled.
* | * lisp/shell.el: Use lexical-binding and std completion UI.Stefan Monnier2011-04-201-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* | * lisp/comint.el: Use lexical-binding. Use std completion UI. Require CL.Stefan Monnier2011-04-201-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* | * lisp/minibuffer.el (completion-in-region-mode-predicate)Stefan Monnier2011-04-131-32/+54
| | | | | | | | | | | | | | | | | | (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.
* | Fix bad interaction between icomplete and completion inline help (Bug#5849).Chong Yidong2011-04-101-10/+21
| | | | | | | | | | | | | | | | | | | | * lisp/minibuffer.el (completion-show-inline-help): New var. (completion--do-completion, minibuffer-complete) (minibuffer-force-complete, minibuffer-complete-word): Inhibit minibuffer messages if completion-show-inline-help is nil. * lisp/icomplete.el (icomplete-mode): Bind completion-show-inline-help to avoid interference from inline help.
* | Remove extraneous messages in 2011-03-30 completion change.Chong Yidong2011-04-051-5/+2
| | | | | | | | | | | | | | | | These blocked the minibuffer contents when completing in the minibuffer, in a departure from previous Emacs behavior. * lisp/minibuffer.el (completion-in-region--postch) (completion-in-region-mode): Remove unnecessary messages.
* | Merge from lexical-binding branch.Stefan Monnier2011-04-011-286/+276
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/eval.texi (Eval): Discourage the use of `eval'. Document its new `lexical' argument. * doc/lispref/variables.texi (Defining Variables): Mention the new meaning of `defvar'. (Lexical Binding): New sub-section. * lisp/Makefile.in (BIG_STACK_DEPTH, BIG_STACK_OPTS, BYTE_COMPILE_FLAGS): New variables. (compile-onefile, .el.elc, compile-calc, recompile): Use them. (COMPILE_FIRST): Add macroexp and cconv. * lisp/makefile.w32-in: Mirror changes in Makefile.in. * lisp/vc/cvs-status.el: * lisp/vc/diff-mode.el: * lisp/vc/log-edit.el: * lisp/vc/log-view.el: * lisp/vc/smerge-mode.el: * lisp/textmodes/bibtex-style.el: * textmodes/css.el: * lisp/startup.el: * lisp/uniquify.el: * lisp/minibuffer.el: * lisp/newcomment.el: * lisp/reveal.el: * lisp/server.el: * lisp/mpc.el: * lisp/emacs-lisp/smie.el: * lisp/doc-view.el: * lisp/dired.el: * lisp/abbrev.el: Use lexical binding. * lisp/custom.el (custom-initialize-default, custom-declare-variable): Use `defvar'. * lisp/files.el (lexical-binding): Declare safe. * lisp/help-fns.el (help-split-fundoc): Return nil if there's nothing else than the arglist. (help-add-fundoc-usage): Don't add `Not documented'. (help-function-arglist): Handle closures, subroutines, and new byte-code-functions. (help-make-usage): Remove leading underscores. (describe-function-1): Handle closures. (describe-variable): Use special-variable-p for completion. * lisp/simple.el (with-wrapper-hook, apply-partially): Move to subr.el. * lisp/subr.el (apply-partially): Use new closures rather than CL. (--dolist-tail--, --dotimes-limit--): Don't declare dynamic. (dolist, dotimes): Use slightly different expansion for lexical code. (functionp): Move to C. (letrec): New macro. (with-wrapper-hook): Use it and apply-partially instead of CL. (eval-after-load): Preserve lexical-binding. (save-window-excursion, with-output-to-temp-buffer): Turn them into macros. * lisp/emacs-lisp/advice.el (ad-arglist): Use help-function-arglist. * lisp/emacs-lisp/autoload.el (make-autoload): Don't burp on trivial macros. * lisp/emacs-lisp/byte-opt.el: Use lexical binding. (byte-inline-lapcode): Remove (to bytecomp). (byte-compile-inline-expand): Pay attention to inlining to/from lexically bound code. (byte-compile-unfold-lambda): Don't handle byte-code-functions any more. (byte-optimize-form-code-walker): Don't handle save-window-excursion any more and don't call compiler-macros. (byte-compile-splice-in-already-compiled-code): Remove. (byte-code): Don't inline any more. (disassemble-offset): Receive `bytes' as argument rather than via dynamic scoping. (byte-compile-tag-number): Declare before first use. (byte-decompile-bytecode-1): Handle new byte-codes, don't change `return' even if make-spliceable. (byte-compile-side-effect-and-error-free-ops): Add stack-ref, remove obsolete interactive-p. (byte-optimize-lapcode): Optimize new lap-codes. Don't trip up on new form of `byte-constant' lap code. * lisp/emacs-lisp/byte-run.el (make-obsolete): Don't set the `byte-compile' handler any more. * lisp/emacs-lisp/bytecomp.el: Use lexical binding instead of a "bytecomp-" prefix. Macroexpand everything as a separate phase. (byte-compile-initial-macro-environment): Handle declare-function here. (byte-compile--lexical-environment): New var. (byte-stack-ref, byte-stack-set, byte-discardN) (byte-discardN-preserve-tos): New lap codes. (byte-interactive-p): Don't use any more. (byte-compile-push-bytecodes, byte-compile-push-bytecode-const2): New macros. (byte-compile-lapcode): Use them and handle new lap codes. (byte-compile-obsolete): Remove. (byte-compile-arglist-signature): Handle new byte-code arg"lists". (byte-compile-arglist-warn): Check late def of inlinable funs. (byte-compile-cl-warn): Don't silence warnings for compiler-macros since they should have been expanded by now. (byte-compile--outbuffer): Rename from bytecomp-outbuffer. (byte-compile-from-buffer): Remove unused second arg. (byte-compile-preprocess): New function. (byte-compile-toplevel-file-form): New function to distinguish file-form calls from outside from file-form calls from hunk-handlers. (byte-compile-file-form): Simplify. (byte-compile-file-form-defsubst): Remove. (byte-compile-file-form-defmumble): Simplify now that byte-compile-lambda always returns a byte-code-function. (byte-compile): Preprocess. (byte-compile-byte-code-maker, byte-compile-byte-code-unmake): Remove, not used any more. (byte-compile-arglist-vars, byte-compile-make-lambda-lexenv) (byte-compile-make-args-desc): New funs. (byte-compile-lambda): Handle lexical functions. Always return a byte-code-function. (byte-compile-reserved-constants): New var, to make up room for closed-over variables. (byte-compile-constants-vector): Obey it. (byte-compile-top-level): New args `lexenv' and `reserved-csts'. (byte-compile-macroexpand-declare-function): New function. (byte-compile-form): Call byte-compile-unfold-bcf to inline immediate byte-code-functions. (byte-compile-form): Check obsolescence here. (byte-compile-inline-lapcode, byte-compile-unfold-bcf): New functions. (byte-compile-variable-ref): Remove. (byte-compile-dynamic-variable-op): New fun. (byte-compile-dynamic-variable-bind, byte-compile-variable-ref) (byte-compile-variable-set): New funs. (byte-compile-discard): Add 2 args. (byte-compile-stack-ref, byte-compile-stack-set) (byte-compile-make-closure, byte-compile-get-closed-var): New funs. (byte-compile-funarg, byte-compile-funarg-2): Remove, handled in macroexpand-all instead. (byte-compile-quote-form): Remove. (byte-compile-push-binding-init, byte-compile-not-lexical-var-p) (byte-compile-bind, byte-compile-unbind): New funs. (byte-compile-let): Handle let* and lexical binding. (byte-compile-let*): Remove. (byte-compile-catch, byte-compile-unwind-protect) (byte-compile-track-mouse, byte-compile-condition-case): Handle a new :fun-body form, used for lexical scoping. (byte-compile-save-window-excursion) (byte-compile-with-output-to-temp-buffer): Remove. (byte-compile-defun): Simplify. (byte-compile-stack-adjustment): New fun. (byte-compile-out): Use it. (byte-compile-refresh-preloaded): Don't reload byte-compiler files. * lisp/emacs-lisp/cconv.el: New file. * lisp/emacs-lisp/cl-extra.el (cl-macroexpand-all): Properly quote CL closures. * lisp/emacs-lisp/cl-macs.el (cl-byte-compile-block) (cl-byte-compile-throw): Remove. (cl-block-wrapper, cl-block-throw): Use compiler-macros instead. * lisp/emacs-lisp/cl.el (pushnew): Silence warning. * lisp/emacs-lisp/disass.el (disassemble-internal): Handle new `closure' objects. (disassemble-1): Handle new byte codes. * lisp/emacs-lisp/edebug.el (edebug-eval-defun) (edebug-eval-top-level-form): Use eval-sexp-add-defvars. (edebug-toggle): Avoid `eval'. * lisp/emacs-lisp/eieio-comp.el: Remove. * lisp/emacs-lisp/eieio.el (byte-compile-file-form-defmethod): Don't autoload. (eieio-defgeneric-form-primary-only-one): Use `byte-compile' rather than the internal `byte-compile-lambda'. (defmethod): Don't hide code under quotes. (eieio-defmethod): New `code' argument. * lisp/emacs-lisp/float-sup.el (pi): Don't declare as dynamically bound. * lisp/emacs-lisp/lisp-mode.el (eval-last-sexp-1): Use eval-sexp-add-defvars. (eval-sexp-add-defvars): New fun. * lisp/emacs-lisp/macroexp.el: Use lexical binding. (macroexpand-all-1): Check obsolete macros. Expand compiler-macros. Don't convert ' to #' without checking that it's indeed quoting a lambda. * lisp/emacs-lisp/pcase.el: Don't use destructuring-bind. (pcase--memoize): Rename from pcase-memoize. Change weakness. (pcase): Add `let' pattern. Change memoization so it actually works. (pcase-mutually-exclusive-predicates): Add byte-code-function-p. (pcase--u1) <guard, pred>: Fix possible shadowing problem. <let>: New case. * src/alloc.c (Fmake_symbol): Init new `declared_special' field. * src/buffer.c (defvar_per_buffer): Set new `declared_special' field. * src/bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN): New byte-codes. (exec_byte_code): New function extracted from Fbyte_code to handle new calling convention for byte-code-functions. Add new byte-codes. * src/callint.c (Fcall_interactively): Preserve lexical-binding mode for interactive spec. * src/doc.c (Fdocumentation, store_function_docstring): * src/data.c (Finteractive_form): Handle closures. * src/eval.c (Fsetq): Handle lexical vars. (Fdefun, Fdefmacro, Ffunction): Make closures when needed. (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic. (FletX, Flet): Obey lexical binding. (Fcommandp): Handle closures. (Feval): New `lexical' arg. (eval_sub): New function extracted from Feval. Use it almost everywhere where Feval was used. Look up vars in lexical env. Handle closures. (Ffunctionp): Move from subr.el. (Ffuncall): Handle closures. (apply_lambda): Remove `eval_flags'. (funcall_lambda): Handle closures and new byte-code-functions. (Fspecial_variable_p): New function. (syms_of_eval): Initialize the Vinternal_interpreter_environment var, but without exporting it to Lisp. * src/fns.c (concat, mapcar1): Accept byte-code-functions. * src/image.c (parse_image_spec): Use Ffunctionp. * src/keyboard.c (eval_dyn): New fun. (menu_item_eval_property): Use it. * src/lisp.h (struct Lisp_Symbol): New field `declared_special'. * src/lread.c (lisp_file_lexically_bound_p): New function. (Fload): Bind Qlexical_binding. (readevalloop): Remove `evalfun' arg. Bind Qinternal_interpreter_environment. (Feval_buffer): Bind Qlexical_binding. (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard): Mark as dynamic. (syms_of_lread): Declare `lexical-binding'. * src/window.c (Ftemp_output_buffer_show): New fun. (Fsave_window_excursion): * src/print.c (Fwith_output_to_temp_buffer): Move to subr.el.
| * \ Merge from trunkStefan Monnier2011-03-311-11/+22
| |\ \
| * \ \ Merge from trunkStefan Monnier2011-03-211-1/+9
| |\ \ \
| * | | | * doc/lispref/variables.texi (Scope): Mention the availability of lexbind.Stefan Monnier2011-03-011-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
| * | | | Merge from trunkStefan Monnier2011-02-211-0/+4
| |\ \ \ \
| * | | | | Missing files in last commit; remove stack-depth in byte-optimize-lapcodeStefan Monnier2011-02-211-92/+82
| | | | | |
* | | | | | (completion-in-region): Pop down *Completions* automatically.Stefan Monnier2011-03-301-12/+140
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | | | | First step towards using standard completion in comint.Stefan Monnier2011-03-241-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | | | | Default read-file-name-function to a non-nil valueLeo Liu2011-03-211-8/+12
| |_|/ / |/| | | | | | | | | | | | | | | See discussion thread: http://thread.gmane.org/gmane.emacs.devel/134000
* | | | * lisp/minibuffer.el (completion-all-sorted-completions):Stefan Monnier2011-03-161-1/+9
| |/ / |/| | | | | | | | Use :completion-cycle-penalty text property if present.
* | | * minibuffer.el (completion-table-case-fold): New function forTassilo Horn2011-02-121-0/+4
|/ / | | | | | | creating a case-insensitive completion table.
* | Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-241-1/+1
| |
* | Nuke arch-tags.Glenn Morris2011-01-151-1/+0
| |
* | Merge from emacs-23Stefan Monnier2011-01-141-1/+1
|\ \ | |/
| * Add 2011 to FSF/AIST copyright years.Glenn Morris2011-01-021-1/+1
| |
* | * lisp/bindings.el (complete-symbol): Move back from minibuffer.el.Stefan Monnier2010-12-061-24/+16
| | | | | | | | * lisp/minibuffer.el (completion-at-point): Remove the `arg'.
* | * lisp/minibuffer.el (completion-fail-discreetly): New var.Stefan Monnier2010-11-171-1/+6
| | | | | | | | (completion--do-completion): Use it.
* | Merge from emacs-23Stefan Monnier2010-11-091-5/+8
|\ \ | |/
| * * lisp/minibuffer.el (minibuffer-completion-help): Specify the end of theStefan Monnier2010-11-081-5/+8
| | | | | | | | | | | | completion field. Fixes: debbugs:7211
* | * lisp/minibuffer.el (completion-cycling): New var.Stefan Monnier2010-10-271-30/+32
| | | | | | | | | | | | | | | | | | | | | | (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