Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
5c90fde0
Commit
5c90fde0
authored
Apr 11, 2011
by
Leo Liu
Browse files
Enable ido to kill virtual buffers
parent
f8fc0578
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
lisp/ChangeLog
lisp/ChangeLog
+6
-0
lisp/ido.el
lisp/ido.el
+11
-7
No files found.
lisp/ChangeLog
View file @
5c90fde0
2011-04-11 Leo Liu <sdl.web@gmail.com>
* ido.el (ido-buffer-internal): Allow method 'kill for virtual
buffers.
(ido-kill-buffer-at-head): Support killing virtual buffers.
2011-04-10 Chong Yidong <cyd@stupidchicken.com>
2011-04-10 Chong Yidong <cyd@stupidchicken.com>
* minibuffer.el (completion-show-inline-help): New var.
* minibuffer.el (completion-show-inline-help): New var.
...
...
lisp/ido.el
View file @
5c90fde0
...
@@ -2176,9 +2176,7 @@ If cursor is not at the end of the user input, move to end of input."
...
@@ -2176,9 +2176,7 @@ If cursor is not at the end of the user input, move to end of input."
(
ido-current-directory
nil
)
(
ido-current-directory
nil
)
(
ido-directory-nonreadable
nil
)
(
ido-directory-nonreadable
nil
)
(
ido-directory-too-big
nil
)
(
ido-directory-too-big
nil
)
(
ido-use-virtual-buffers
(
if
(
eq
method
'kill
)
(
ido-use-virtual-buffers
ido-use-virtual-buffers
)
nil
;; Don't consider virtual buffers for killing
ido-use-virtual-buffers
))
(
require-match
(
confirm-nonexistent-file-or-buffer
))
(
require-match
(
confirm-nonexistent-file-or-buffer
))
(
buf
(
ido-read-internal
'buffer
(
or
prompt
"Buffer: "
)
'ido-buffer-history
default
(
buf
(
ido-read-internal
'buffer
(
or
prompt
"Buffer: "
)
'ido-buffer-history
default
require-match
initial
))
require-match
initial
))
...
@@ -3917,10 +3915,10 @@ If cursor is not at the end of the user input, delete to end of input."
...
@@ -3917,10 +3915,10 @@ If cursor is not at the end of the user input, delete to end of input."
(
let
((
enable-recursive-minibuffers
t
)
(
let
((
enable-recursive-minibuffers
t
)
(
buf
(
ido-name
(
car
ido-matches
)))
(
buf
(
ido-name
(
car
ido-matches
)))
(
nextbuf
(
cadr
ido-matches
)))
(
nextbuf
(
cadr
ido-matches
)))
(
when
(
get-buffer
buf
)
(
cond
((
get-buffer
buf
)
;; If next match names a buffer use the buffer object; buffer
;; If next match names a buffer use the buffer object; buffer
;; name may be changed by packages such as uniquify; mindful
;; name may be changed by packages such as uniquify.
;; of virtual buffers.
(
when
(
and
nextbuf
(
get-buffer
nextbuf
))
(
when
(
and
nextbuf
(
get-buffer
nextbuf
))
(
setq
nextbuf
(
get-buffer
nextbuf
)))
(
setq
nextbuf
(
get-buffer
nextbuf
)))
(
if
(
null
(
kill-buffer
buf
))
(
if
(
null
(
kill-buffer
buf
))
...
@@ -3934,7 +3932,13 @@ If cursor is not at the end of the user input, delete to end of input."
...
@@ -3934,7 +3932,13 @@ If cursor is not at the end of the user input, delete to end of input."
(
setq
ido-default-item
nextbuf
(
setq
ido-default-item
nextbuf
ido-text-init
ido-text
ido-text-init
ido-text
ido-exit
'refresh
)
ido-exit
'refresh
)
(
exit-minibuffer
))))))
(
exit-minibuffer
)))
;; Handle virtual buffers
((
assoc
buf
ido-virtual-buffers
)
(
setq
recentf-list
(
delete
(
cdr
(
assoc
buf
ido-virtual-buffers
))
recentf-list
))
(
setq
ido-cur-list
(
delete
buf
ido-cur-list
))
(
setq
ido-rescan
t
))))))
;;; DELETE CURRENT FILE
;;; DELETE CURRENT FILE
(
defun
ido-delete-file-at-head
()
(
defun
ido-delete-file-at-head
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment