Commit graph

199 commits

Author SHA1 Message Date
Lars Magne Ingebrigtsen
92f2affc50 (ido-mode): Switch off the message if called non-interactively. 2011-08-02 17:59:31 +02:00
Stefan Monnier
4f91a8160f Don't quote lambda expressions with `quote'. 2011-05-23 14:57:17 -03:00
Juanma Barranquero
06b605171f lisp/*.el: Lexical-binding cleanup. 2011-04-19 15:44:55 +02:00
Leo Liu
5c90fde028 Enable ido to kill virtual buffers 2011-04-11 11:44:54 +08:00
Leo Liu
ea62283460 Add to minibuffer-history if HISOTRY is nil in ido.el
It is broken by the change on 2011-03-21.
2011-03-29 16:25:31 +08:00
Leo Liu
c5b40130ec Some ido cleanups
* ido.el (ido-read-internal): Simplify with read-from-minibuffer.
(ido-completions): Remove unused arguments.  (Bug#8329)
2011-03-25 08:42:26 +08:00
Leo Liu
af896da66a Fix history adding in ido-read-internal
Assume, for example, the head of matches is "RSS" and user input is
"rs". If the user hit RET, "RSS" is selected but "rs" is added to the
history. This commit fixes this inconsistency.
2011-03-22 01:48:36 +08:00
Leo Liu
3ec03f7e46 New variable completing-read-function to customize completing-read 2011-03-20 18:35:27 +08:00
Christoph Scholtes
cead857b3a * ido.el (ido-everywhere): Doc fix.
(ido-mode): Doc fix.
2011-02-28 13:25:50 -07: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
Kim F. Storm
821f936d1c * ido.el (ido-may-cache-directory): Move "too-big" check later.
(ido-next-match, ido-prev-match): Fix stray reordering of matching
items when cycling through the matches.
2011-01-13 17:26:40 +01:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Ryan Twitchell
395542c68d Ask for confirmation in ido-file-internal (Bug#1238).
* ido.el (ido-file-internal): Ask for confirmation before
overwriting an existing file (Bug#1238).
2010-12-17 18:56:03 +08:00
Stefan Monnier
f49d1f52b2 Merge from emacs-23 2010-12-13 10:27:36 -05:00
Glenn Morris
0fdd1db7fd That's not how you spell "initialization". 2010-12-01 23:40:32 -08:00
Leo Liu
bd79445072 * lisp/ido.el (ido-common-initilization): New function.
(ido-mode): Use it.
(ido-completing-read): Call it.

Fixes: debbugs:3274
2010-12-01 17:34:09 -05:00
Chong Yidong
dff0fdc364 * ido.el (ido-make-buffer-list): Fix error in 2010-08-22 merge. 2010-09-16 18:32:54 -04:00
Juanma Barranquero
1a14074711 * ido.el (ido-use-virtual-buffers): Fix typo in docstring. 2010-08-23 12:21:01 +02:00
Chong Yidong
b0126eac41 Merge changes from emacs-23 branch. 2010-08-22 16:02:16 -04:00
Leo Liu
e014333552 Fix buffer-list rename&refresh after after killing a buffer in ido.
* lisp/ido.el: Revert Óscar's.
(ido-kill-buffer-at-head): Exit the minibuffer with ido-exit=refresh.
Remember the buffers at head, rather than their name.
* lisp/iswitchb.el (iswitchb-kill-buffer): Re-make the list.
2010-08-21 15:35:27 +02: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
Chong Yidong
27d3cd56ca * ido.el (ido-minibuffer-setup): Don't set cua-inhibit-cua-keys (Bug#5765). 2010-04-29 11:41:23 -04:00
Chong Yidong
09d0284d72 * ido.el (ido-init-completion-maps): Remove C-v binding (Bug#5765). 2010-04-29 11:38:08 -04:00
Juanma Barranquero
cecaa6745f When killing buffers with ido, don't offer virtual buffers for completion.
* ido.el (ido-buffer-internal): Bind `ido-use-virtual-buffers' to nil
  when method is 'kill.
2010-04-27 13:47:19 +02:00
Leo Liu
c5cbeb128e Added C-o keybinding to toggle use of virtual buffers
* ido.el (ido-init-completion-maps): For ido-switch-buffer, C-o
toggles the use of virtual buffers.
(ido-buffer-internal): Guard `ido-use-virtual-buffers' global
value.  
(ido-toggle-virtual-buffers): New function.
2010-04-21 07:00:58 -04:00
Stefan Monnier
6e104790e7 Merge from emacs-23 2010-04-19 11:07:52 -04:00
Michael Albinus
5f2b693f18 Fix Bug#5840.
* ido.el (ido-file-name-all-completions-1):
* minibuffer.el (minibuffer-completion-help):
* net/tramp.el (tramp-completion-mode-p): Use `non-essential'.
2010-04-15 00:05:14 +02:00
Chong Yidong
3808c51fa8 * ido.el (ido-file-internal): Fix 2009-12-02 change. 2010-04-14 13:32:50 -04:00
John Wiegley
cb1b04a5d8 Removed duplicate definition of ido-virtual-buffers 2010-04-06 14:17:55 -04:00
John Wiegley
2a07afc5fe Fixed duplicate names appearing in IDO buffer list (using virtuals)
* ido.el (ido-add-virtual-buffers-to-list): Fixed duplicated names
appearing in buffer list (if a live buffer name matched a recentf
file basename).  Should use uniqify to offer a real solution.
2010-04-06 03:02:57 -04:00
John Wiegley
f9a27d8615 Minor fixes to a recent contribution to ido.el
* ido.el (ido-use-virtual-buffers, ido-virtual): Moved a ChangeLog
comment to code, and added a :version tag.
(ido-virtual-buffers): Moved defvar to fix byte-compiler warning.
2010-04-05 23:38:56 -04:00
Juanma Barranquero
9caf8a8f7f Enable recentf-mode if using virtual buffers.
* ido.el (recentf-list): Declare for byte-compiler.
  (ido-virtual-buffers): Move up to silence byte-compiler.  Add docstring.
  (ido-make-buffer-list): Simplify.
  (ido-add-virtual-buffers-to-list): Simplify.  Enable recentf-mode.
2010-04-06 04:26:37 +02:00
John Wiegley
0523d11710 2010-04-04 John Wiegley <jwiegley@gmail.com>
* ido.el (ido-use-virtual-buffers): New variable to indicate
	whether "virtual buffer" support is enabled for IDO.  Essentially
	it works as follows: Say you are visiting a file and the buffer
	gets cleaned up by mignight.el.  Later, you want to switch to that
	buffer, but find it's no longer open.  With virtual buffers
	enabled, the buffer name stays in the buffer list (using the
	ido-virtual face, and always at the end), and if you select it, it
	opens the file back up again.  This allows you to think less about
	whether recently opened files are still open or not.  Most of the
	time you can quit Emacs, restart, and then switch to a file buffer
	that was previously open as if it still were.  NOTE: This feature
	has been present in iswitchb for several years now, and I'm
	porting the same logic to IDO.
	(ido-virtual): Face used to indicate virtual buffers in the list.
	(ido-buffer-internal): If a buffer is chosen, and no such buffer
	exists, but a virtual buffer of that name does (which would be why
	it was in the list), recreate the buffer by reopening the file.
	(ido-make-buffer-list): If virtual buffers are being used, call
	`ido-add-virtual-buffers-to-list' before the make list hook.
	(ido-virtual-buffers): New variable which contains a copy of the
	current contents of the `recentf-list', albeit pared down for the
	sake of speed, and with proper faces applied.
	(ido-add-virtual-buffers-to-list): Using the `recentf-list',
	create a list of "virtual buffers" to present to the user in
	addition to the currently open set.  Note that this logic could
	get rather slow if that list is too large.  With the default
	`recentf-max-saved-items' of 200, there is little speed penalty.
2010-04-04 02:55:19 -04:00
Óscar Fuentes
2acfb95436 ido.el: Consider the possibility of buffer names changing after kill-buffer. 2010-01-18 20:34:55 +01:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Glenn Morris
b2d5f31abf Andreas Politz <politza at fh-trier.de> (tiny change)
(ido-file-internal): Handle filenames at point that do not have a
directory part.  (Bug#5049)
2009-12-02 03:00:41 +00:00
Stefan Monnier
7fdbcd8387 * x-dnd.el (x-dnd-maybe-call-test-function):
* window.el (split-window-vertically):
* whitespace.el (whitespace-help-on):
* vc-rcs.el (vc-rcs-consult-headers):
* userlock.el (ask-user-about-lock-help)
(ask-user-about-supersession-help):
* type-break.el (type-break-force-mode-line-update):
* time-stamp.el (time-stamp-conv-warn):
* terminal.el (te-set-output-log, te-more-break, te-filter)
(te-sentinel,terminal-emulator):
* term.el (make-term, term-exec, term-sentinel, term-read-input-ring)
(term-write-input-ring, term-check-source, term-start-output-log):
(term-display-buffer-line, term-dynamic-list-completions):
(term-ansi-make-term, serial-term):
* subr.el (selective-display):
* strokes.el (strokes-xpm-to-compressed-string, strokes-decode-buffer)
(strokes-encode-buffer, strokes-xpm-for-compressed-string):
* speedbar.el (speedbar-buffers-tail-notes, speedbar-buffers-item-info)
(speedbar-reconfigure-keymaps, speedbar-add-localized-speedbar-support)
(speedbar-remove-localized-speedbar-support)
(speedbar-set-mode-line-format, speedbar-create-tag-hierarchy)
(speedbar-update-special-contents, speedbar-buffer-buttons-engine)
(speedbar-buffers-line-directory):
* simple.el (shell-command-on-region, append-to-buffer)
(prepend-to-buffer):
* shadowfile.el (shadow-save-todo-file):
* scroll-bar.el (scroll-bar-set-window-start, scroll-bar-drag-1)
(scroll-bar-maybe-set-window-start):
* sb-image.el (speedbar-image-dump):
* saveplace.el (save-place-alist-to-file, save-places-to-alist)
(load-save-place-alist-from-file):
* ps-samp.el (ps-print-message-from-summary):
* ps-print.el (ps-flush-output, ps-insert-file, ps-get-boundingbox)
(ps-background-image, ps-begin-job, ps-do-despool):
* ps-bdf.el (bdf-find-file, bdf-read-font-info):
* printing.el (pr-interface, pr-ps-file-print, pr-find-buffer-visiting)
(pr-ps-message-from-summary, pr-lpr-message-from-summary):
(pr-call-process, pr-file-list, pr-interface-save):
* novice.el (disabled-command-function)
(enable-command, disable-command):
* mouse.el (mouse-buffer-menu-alist):
* mouse-copy.el (mouse-kill-preserving-secondary):
* macros.el (kbd-macro-query):
* ledit.el (ledit-go-to-lisp, ledit-go-to-liszt):
* informat.el (batch-info-validate):
* ido.el (ido-copy-current-word, ido-initiate-auto-merge):
* hippie-exp.el (try-expand-dabbrev-visible):
* help-mode.el (help-make-xrefs):
* help-fns.el (describe-variable):
* generic-x.el (bat-generic-mode-run-as-comint):
* finder.el (finder-mouse-select):
* find-dired.el (find-dired-sentinel):
* filesets.el (filesets-file-close):
* files.el (list-directory):
* faces.el (list-faces-display, describe-face):
* facemenu.el (list-colors-display):
* ezimage.el (ezimage-image-association-dump, ezimage-image-dump):
* epg.el (epg--process-filter, epg-cancel):
* epa.el (epa--marked-keys, epa--select-keys, epa-display-info)
(epa--read-signature-type):
* emerge.el (emerge-copy-as-kill-A, emerge-copy-as-kill-B)
(emerge-file-names):
* ehelp.el (electric-helpify):
* ediff.el (ediff-regions-wordwise, ediff-regions-linewise):
* ediff-vers.el (rcs-ediff-view-revision):
* ediff-util.el (ediff-setup):
* ediff-mult.el (ediff-append-custom-diff):
* ediff-diff.el (ediff-exec-process, ediff-process-sentinel)
(ediff-wordify):
* echistory.el (Electric-command-history-redo-expression):
* dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
* disp-table.el (describe-display-table):
* dired.el (dired-find-buffer-nocreate):
* dired-aux.el (dired-rename-subdir, dired-dwim-target-directory):
* dabbrev.el (dabbrev--same-major-mode-p):
* chistory.el (list-command-history):
* apropos.el (apropos-documentation):
* allout.el (allout-obtain-passphrase):
(allout-copy-exposed-to-buffer):
(allout-verify-passphrase): Use with-current-buffer.
2009-11-13 22:19:45 +00:00
Stefan Monnier
d5e637154f Replace completion-base-size by completion-base-position to fix bugs
such as (bug#4699).
* simple.el (completion-base-position): New var.
(completion-base-size): Mark as obsolete.
(choose-completion): Make it work for mouse events as well.
Pass the new base-position to choose-completion-string.
(choose-completion-guess-base-position): New function, extracted from
choose-completion-delete-max-match.
(choose-completion-delete-max-match): Use it.  Make obsolete.
(choose-completion-string): Use the new base-position info.
(completion-root-regexp): Delete.
(completion-setup-function): Preserve completion-base-position.
Eliminate obsolete base-size manipulation.
* minibuffer.el (display-completion-list): Don't mess with base-size.
(minibuffer-completion-help): Set completion-base-position instead.
* mouse.el (mouse-choose-completion): Redefine as a mere alias to
choose-completion.
* textmodes/bibtex.el (bibtex-complete):
* emacs-lisp/crm.el (crm--choose-completion-string):
Adjust to new calling convention.
* complete.el (partial-completion-mode): Use minibufferp to avoid
bumping into incompatible change to choose-completion-string-functions.
* ido.el (ido-choose-completion-string): Make its calling convention
more permissive.
* comint.el (comint-dynamic-list-input-ring-select): Remove obsolete
base-size manipulation.
(comint-dynamic-list-input-ring): Use dotimes and push.
* iswitchb.el (iswitchb-completion-help): Remove dead-code call to
fundamental-mode.  Use `or'.
2009-10-15 01:50:17 +00:00
Stefan Monnier
e78e280d7d (ido-everywhere): Use define-minor-mode. 2009-10-14 14:53:36 +00:00
Glenn Morris
9940702bcb Comment. 2009-08-22 21:46:56 +00:00
Kim F. Storm
5b54c385e9 Fix last change. 2009-05-10 21:23:26 +00:00
Kim F. Storm
11c238b380 Add proper support for confirm-nonexistent-file-or-buffer
values `confirm' and `confirm-after-completion'.
(ido-read-internal, ido-buffer-internal, ido-file-internal):
Setup and handle require-match arg according to c-n-f-o-b.
(ido-show-confirm-message): New dynamic variable.
(ido-exit-minibuffer): Request confirmation for non-existing file
or buffer according to confirm-nonexistent-file-or-buffer.
(ido-decorations): Add 11th element for "confirm" message.
(ido-completions): Show confirmation message when requested.
2009-05-10 21:22:00 +00:00
Glenn Morris
ae940284fa Add 2009 to copyright years. 2009-01-05 03:18:22 +00:00
Chong Yidong
7d61c21112 (ido-read-internal): Handle confirm' and confirm-after-completion'
values for the require-match argument.
2008-12-20 10:30:06 +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
Eli Zaretskii
dee11cd2a6 (ido-save-directory-list-file): Run file names that begin with a period thru
`convert-standard-filename'.
2008-10-19 10:07:39 +00:00
Glenn Morris
7103fd599b (ido-mode): Initialize with custom-initialize-default. (Bug#947). 2008-09-11 06:12:06 +00:00
Juanma Barranquero
4e3e159bdd * ido.el (ido-unload-function): New function. 2008-09-09 14:00:58 +00:00