1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-12 09:28:24 +00:00
Commit Graph

65 Commits

Author SHA1 Message Date
Stefan Monnier
1c6d8c761f * lisp/pcomplete.el: Convert to lexical binding and fix bug#8819.
(pcomplete-suffix-list): Mark as obsolete.
(pcomplete-completions-at-point): Capture pcomplete-norm-func and
pcomplete-seen in the closure.
(pcomplete-comint-setup): Setup completion-at-point as well.
(pcomplete--entries): New function.
(pcomplete--env-regexp): New var.
(pcomplete-entries): Rewrite to work with partial-completion and
without relying on pcomplete-suffix-list.
(pcomplete-pare-list): Remove, unused.
* lisp/shell.el (shell-completion-vars): Set pcomplete-termination-string
according to comint-completion-addsuffix.
2011-06-17 14:52:46 -04:00
Stefan Monnier
a2a25d2435 Add an :exit-function for completion-at-point.
* 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.
2011-05-23 23:45:50 -03:00
Stefan Monnier
20e0e05f00 * pcomplete.el (pcomplete-std-complete): Fix last minute typo. 2011-04-29 14:33:30 -03:00
Stefan Monnier
14a7fbd8c2 * lisp/pcomplete.el (pcomplete-std-complete): Don't abuse
completion-at-point.
2011-04-29 14:24:09 -03:00
Stefan Monnier
08abfaad86 * lisp/pcomplete.el (pcomplete-completions-at-point): Return nil if there
aren't any completions at point.
2011-04-28 16:39:11 -03:00
Stefan Monnier
8fff8daa89 * lisp/pcomplete.el (pcomplete-completions-at-point):
Obey pcomplete-ignore-case.  Don't call pcomplete-norm-func unless
pcomplete-seen is non-nil.
(pcomplete-comint-setup): Also recognize the new comint/shell
completion functions.
(pcomplete-do-complete): Don't call pcomplete-norm-func unless
pcomplete-seen is non-nil.
2011-04-27 21:18:12 -03:00
Juanma Barranquero
06b605171f lisp/*.el: Lexical-binding cleanup. 2011-04-19 15:44:55 +02:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
0d9f702fd0 Nuke arch-tags. 2011-01-15 15:16:57 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Stefan Monnier
d355a0b791 Replace Lisp calls to delete-backward-char by delete-char.
* bs.el, expand.el, ido.el, image-dired.el, lpr.el, pcomplete.el,
skeleton.el, term.el, time.el, wid-edit.el, woman.el,
calc/calc-graph.el, calc/calc-help.el, calc/calc-incom.el,
calc/calc.el, emacs-cl-extra.el, emacs-cl-loaddefs.el,
emulation/cua-rect.el, emulation/viper-ex.el, eshell/esh-test.el,
eshell/eshell.el, gnus/gnus-uu.el, gnus/nndoc.el, gnus/nnrss.el,
gnus/rfc2047.el, gnus/utf7.el, international/utf-7.el,
language/ethio-util.el, mh-e/mh-alias.el, mh-e/mh-search.el,
net/imap.el, net/rcirc.el, obsolete/complete.el, play/decipher.el,
progmodes/ada-mode.el, progmodes/cc-awk.el, progmodes/dcl-mode.el,
progmodes/ps-mode.el, progmodes/verilog-mode.el,
progmodes/vhdl-mode.el, textmodes/bibtex.el, textmodes/fill.el,
textmodes/reftex-auc.el, textmodes/rst.el, textmodes/sgml-mode.el,
textmodes/table.el, textmodes/texinfmt.el: Replace Lisp calls to
delete-backward-char by calls to delete-char.
2010-05-24 22:11:08 -04:00
Stefan Monnier
c26ea4b2a3 * pcomplete.el (pcomplete-completions-at-point): New function,
extracted from pcomplete-std-complete.
(pcomplete-std-complete): Use it.
2010-05-14 23:50:26 -04:00
Stefan Monnier
5b31b787b7 * pcomplete.el (pcomplete-here*): Fix mistaken change (bug#5935). 2010-04-12 21:24:10 -04:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Stefan Monnier
a2877f1d6f (pcomplete-std-complete): Don't try to complete past the last element. 2009-12-01 19:39:52 +00:00
Stefan Monnier
f5467d3f9e * eshell/em-prompt.el (eshell-prompt-function): Abbreviate pwd, since
`cd' doesn't always do it for us (bug#5067).
* pcomplete.el (pcomplete-entries): Revert change installed mistakenly
on 2009-10-25 as part of some other change (bug#5067).
2009-11-28 17:06:30 +00:00
Stefan Monnier
a185548b1c * abbrev.el (abbrev-with-wrapper-hook): (re)move...
* simple.el (with-wrapper-hook): ...to here.  Add argument `args'.
* minibuffer.el (completion-in-region-functions): New hook.
(completion-in-region): New function.
* emacs-lisp/lisp.el (lisp-complete-symbol):
* pcomplete.el (pcomplete-std-complete): Use it.
2009-11-19 03:12:51 +00:00
Stefan Monnier
70f44c655c (pcomplete-comint-setup): If there's a choice, replace
shell-dynamic-complete-filename in preference to
comint-dynamic-complete-filename.
2009-10-28 13:59:30 +00:00
Stefan Monnier
0667de2146 (pcomplete-std-complete): Obey pcomplete-use-paring.
(pcomplete, pcomplete-parse-buffer-arguments, pcomplete-opt)
(pcomplete--here): Use push.
2009-10-26 04:06:01 +00:00
Stefan Monnier
2d0853070d (pcomplete-unquote-argument-function): New var.
(pcomplete-unquote-argument): New function.
(pcomplete--common-suffix): Always pay attention to case.
(pcomplete--table-subvert): Quote and unquote the text.
(pcomplete--common-quoted-suffix): New function.
(pcomplete-std-complete): Use it and pcomplete-begin.
2009-10-25 20:38:06 +00:00
Stefan Monnier
48feed599b (pcomplete-common-suffix, pcomplete-table-subvert): New funs.
(pcomplete-std-complete): Use them.  Obey pcomplete-termination-string.
(pcomplete-comint-setup): Don't modify a global var via
accidental side-effects.
(pcomplete-shell-setup): Adjust call accordingly.
(pcomplete-parse-comint-arguments): Use push.
2009-10-23 17:37:09 +00:00
Stefan Monnier
3b067af114 Allow the use of completion-tables.
(pcomplete-std-complete): New command.
(pcomplete-dirs-or-entries): Use a single call to pcomplete-entries.
(pcomplete--here): Use a function for `form' rather than an expression,
so it can be byte-compiled.
(pcomplete-here, pcomplete-here*): Adjust accordingly.
Add edebug declaration.
(pcomplete-show-completions): Remove unused var `curbuf'.
(pcomplete-do-complete, pcomplete-stub):
Don't assume `completions' is a list of	strings any more.
2009-10-22 15:17:48 +00:00
Chong Yidong
208384c5cf * pcomplete.el (pcomplete-comint-setup): Check for
shell-dynamic-complete-filename too.
2009-07-12 16:20:50 +00:00
Glenn Morris
ae940284fa Add 2009 to copyright years. 2009-01-05 03:18:22 +00:00
Lute Kamstra
9201cc281b * align.el:
* allout.el:
* apropos.el:
* arc-mode.el:
* autoinsert.el:
* avoid.el:
* battery.el:
* bookmark.el:
* buff-menu.el:
* calculator.el:
* chistory.el:
* cmuscheme.el:
* comint.el:
* compare-w.el:
* dabbrev.el:
* delim-col.el:
* desktop.el:
* diff-mode.el:
* diff.el:
* dired-aux.el:
* dired-x.el:
* dired.el:
* dos-vars.el:
* ediff-diff.el:
* ediff-help.el:
* ediff-init.el:
* ediff-merg.el:
* ediff-mult.el:
* ediff-ptch.el:
* ediff-vers.el:
* ediff-wind.el:
* ediff.el:
* emerge.el:
* facemenu.el:
* faces.el:
* ffap.el:
* filecache.el:
* find-dired.el:
* font-core.el:
* font-lock.el:
* forms.el:
* fringe.el:
* help-at-pt.el:
* hippie-exp.el:
* ido.el:
* image-file.el:
* imenu.el:
* indent.el:
* info.el:
* isearchb.el:
* iswitchb.el:
* jit-lock.el:
* jka-compr.el:
* log-edit.el:
* lpr.el:
* ls-lisp.el:
* man.el:
* menu-bar.el:
* midnight.el:
* mouse-sel.el:
* mouse.el:
* msb.el:
* outline.el:
* paren.el:
* pcmpl-cvs.el:
* pcmpl-gnu.el:
* pcomplete.el:
* pcvs-info.el:
* pcvs-parse.el:
* printing.el:
* ps-mule.el:
* ps-print.el:
* replace.el:
* ruler-mode.el:
* saveplace.el:
* sb-image.el:
* scroll-bar.el:
* sha1.el:
* shadowfile.el:
* shell.el:
* sort.el:
* speedbar.el:
* strokes.el:
* tempo.el:
* term.el:
* terminal.el:
* time-stamp.el:
* time.el:
* tree-widget.el:
* type-break.el:
* vc-cvs.el:
* vc-hg.el:
* vc-mcvs.el:
* vc-rcs.el:
* vc-sccs.el:
* vc.el:
* view.el:
* w32-vars.el:
* whitespace.el:
* wid-edit.el: Remove leading * from docstrings of defcustoms,
deffaces, defconsts and defuns.
2008-12-03 05:48:14 +00:00
Glenn Morris
eb3fa2cfcf Switch to recommended form of GPLv3 permissions notice. 2008-05-06 08:06:51 +00:00
Stefan Monnier
cbee283dd7 Fix up comment convention on the arch-tag lines. 2008-04-10 14:10:46 +00:00
Miles Bader
59ce725a3b Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Glenn Morris
409cc4a3ea Add 2008 to copyright years. 2008-01-07 02:45:14 +00:00
Dan Nicolaescu
004a00f4ae * progmodes/octave-mod.el (inferior-octave-send-list-and-digest):
* play/yow.el (doctor-ret-or-read):
* vc-hooks.el (vc-dired-resynch-file):
* vc-hg.el (log-view-get-marked):
* smerge-mode.el (ediff-cleanup-mess):
* pcvs.el (vc-editable-p, vc-checkout):
* pcomplete.el (comint-bol):
* informat.el (texinfo-format-refill):
* ido.el (tramp-tramp-file-p):
* ibuffer.el (ibuffer-mark-on-buffer, ibuffer-format-qualifier)
(ibuffer-generate-filter-groups)
(ibuffer-format-filter-group-data):
* add-log.el (c-beginning-of-defun, c-end-of-defun): Declare as
functions.

* ido.el (ido-file-internal): Move with-no-warnings to include the
ffap-string-at-point call.

* pcomplete.el (pcomplete-executables): Move defsubst before first
use.

* vc-hg.el (vc-hg-revision-table): Fix last change.
2007-11-19 08:50:04 +00:00
Dan Nicolaescu
a3269bc45f * eshell/esh-util.el (eshell-under-xemacs-p): Remove.
* eshell/esh-mode.el (eshell-mode-syntax-table)
(command-running-p):
* eshell/esh-ext.el (eshell-external-command):
* eshell/esh-cmd.el (require):
* eshell/em-unix.el (eshell-plain-locate-behavior):
* eshell/em-cmpl.el (eshell-cmpl-initialize): Replace
eshell-under-xemacs-p with (featurep 'xemacs).
* eshell/esh-mode.el (characterp,char-int): Remove unused
conditional defaliases.

* pcomplete.el (pcomplete-event-matches-key-specifier-p): Rename
from event-matches-key-specifier-p, define unconditionally.
(event-basic-type): Remove unused defalias.
(pcomplete-show-completions):
Use pcomplete-event-matches-key-specifier-p.

* mh-e.el (mh-xemacs-flag): Remove.
(mh-min-colors-defined-flag):
* mh-xface.el (mh-show-xface-function):
* mh-utils.el (mh-colors-available-p):
* mh-show.el (mh-show-mode):
* mh-gnus.el (mh-gnus-local-map-property):
* mh-folder.el (mh-folder-mode-map)
(mh-remove-xemacs-horizontal-scrollbar, mh-folder-mode):
* mh-comp.el (mh-insert-x-mailer): Replace uses of mh-xemacs-flag
with (featurep 'xemacs).
2007-11-17 17:35:09 +00:00
Miles Bader
9aecacd08a Merge from emacs--rel--22
Patches applied:

 * emacs--rel--22  (patch 70-73)

   - Update from CVS

2007-07-25  Glenn Morris  <rgm@gnu.org>

   * Relicense all FSF files to GPLv3 or later.

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-828
2007-07-26 05:28:10 +00:00
Glenn Morris
b4aa60262c Switch license to GPLv3 or later. 2007-07-25 04:50:21 +00:00
Stefan Monnier
8b95713993 (pcomplete-entries): Obey pcomplete-ignore-case. 2007-07-12 04:15:55 +00:00
Juanma Barranquero
ccb13f4de6 (pcomplete-restore-windows): Remove redundant check. 2007-06-14 00:07:15 +00:00
Richard M. Stallman
2d8e50884b (pcomplete-read-event): One single definition, and not a defsubst. 2007-04-08 13:47:33 +00:00
Glenn Morris
496263ca9c Doc fix in commentary. 2007-04-07 03:00:23 +00:00
Stefan Monnier
eb69fe3e0a (pcomplete-show-completions): Improve last change, so
as not to use an invisible window and to create a window if none exist.
2007-03-05 19:57:10 +00:00
Chong Yidong
9a8b03860e (pcomplete-show-completions): Search all frames for completions
buffer.
2007-03-05 17:32:38 +00:00
Glenn Morris
d7a0267c8d Add 2007 to copyright years. 2007-01-21 03:53:13 +00:00
Eli Zaretskii
338835b79e (pcomplete-show-completions): Recognize TAB on text terminals. 2006-04-01 14:31:32 +00:00
Thien-Thi Nguyen
aaef169dc6 Update years in copyright notice; nfc. 2006-02-06 15:23:23 +00:00
Deepak Goel
8a26c16552 Message format spec fixes (1) 2005-09-18 12:25:02 +00:00
Thien-Thi Nguyen
0d30b33766 Update years in copyright notice; nfc. 2005-08-06 22:13:43 +00:00
Lute Kamstra
086add1519 Update FSF's address. 2005-07-04 23:32:44 +00:00
John Wiegley
2ff1dec97f 2005-01-21 Ren�yllingstad <listmailxemacs@kyllingstad.com>
* pcomplete.el: define pcomplete-read-event instead of read-event,
	since it's not a complete read-event implementation
2005-01-21 10:26:26 +00:00
Richard M. Stallman
58cc447b23 (pcomplete-entries): Don't use directory-sep-char. 2004-10-27 15:05:12 +00:00
Richard M. Stallman
060a33bb97 (pcomplete): Instead of interactive-p,
use an arg set non-nil by the interactive spec.
2004-10-26 08:33:14 +00:00
Juanma Barranquero
98155da2ad (pcomplete-time-less-p): Remove. 2004-04-27 22:42:58 +00:00