[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99974: Added C-o keybinding to toggl
From: |
John Wiegley |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99974: Added C-o keybinding to toggle use of virtual buffers |
Date: |
Wed, 21 Apr 2010 07:00:58 -0400 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99974
author: Leo <address@hidden>
committer: John Wiegley <address@hidden>
branch nick: emacs
timestamp: Wed 2010-04-21 07:00:58 -0400
message:
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.
modified:
lisp/ChangeLog
lisp/ido.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-04-21 03:53:42 +0000
+++ b/lisp/ChangeLog 2010-04-21 11:00:58 +0000
@@ -1,3 +1,11 @@
+2010-04-21 John Wiegley <address@hidden>
+
+ * 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 Juanma Barranquero <address@hidden>
Use `define-derived-mode'; fix window selection; doc fixes.
=== modified file 'lisp/ido.el'
--- a/lisp/ido.el 2010-04-19 15:07:52 +0000
+++ b/lisp/ido.el 2010-04-21 11:00:58 +0000
@@ -1633,6 +1633,7 @@
(define-key map "\C-x\C-f" 'ido-enter-find-file)
(define-key map "\C-x\C-b" 'ido-fallback-command)
(define-key map "\C-k" 'ido-kill-buffer-at-head)
+ (define-key map "\C-o" 'ido-toggle-virtual-buffers)
(set-keymap-parent map ido-common-completion-map)
(setq ido-buffer-completion-map map)))
@@ -2182,6 +2183,7 @@
(ido-current-directory nil)
(ido-directory-nonreadable nil)
(ido-directory-too-big nil)
+ (ido-use-virtual-buffers ido-use-virtual-buffers)
(require-match (confirm-nonexistent-file-or-buffer))
(buf (ido-read-internal 'buffer (or prompt "Buffer: ")
'ido-buffer-history default
require-match initial))
@@ -2705,6 +2707,16 @@
(setq ido-exit 'keep)
(exit-minibuffer))))
+(defun ido-toggle-virtual-buffers ()
+ "Toggle the use of virtual buffers.
+See `ido-use-virtual-buffers' for explanation of virtual buffer."
+ (interactive)
+ (when (and ido-mode (eq ido-cur-item 'buffer))
+ (setq ido-use-virtual-buffers (not ido-use-virtual-buffers))
+ (setq ido-text-init ido-text)
+ (setq ido-exit 'refresh)
+ (exit-minibuffer)))
+
(defun ido-reread-directory ()
"Read current directory again.
May be useful if cached version is no longer valid, but directory
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99974: Added C-o keybinding to toggle use of virtual buffers,
John Wiegley <=