[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r107641: Handle nil value of ido-comp
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r107641: Handle nil value of ido-completion-buffer. |
Date: |
Thu, 22 Mar 2012 00:41:01 +0800 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107641
fixes bug(s): http://debbugs.gnu.org/11008
author: Anmol Khirbat <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Thu 2012-03-22 00:41:01 +0800
message:
Handle nil value of ido-completion-buffer.
* lisp/ido.el (ido-set-current-directory, ido-read-internal)
(ido-choose-completion-string, ido-completion-help): Handle nil
value of ido-completion-buffer.
modified:
lisp/ChangeLog
lisp/ido.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-03-21 16:01:18 +0000
+++ b/lisp/ChangeLog 2012-03-21 16:41:01 +0000
@@ -1,3 +1,9 @@
+2012-03-21 Anmol Khirbat <address@hidden> (tiny change)
+
+ * ido.el (ido-set-current-directory, ido-read-internal)
+ (ido-choose-completion-string, ido-completion-help): Handle nil
+ value of ido-completion-buffer (Bug#11008).
+
2012-03-21 Sam Steingold <address@hidden>
* window.el (switch-to-prev-buffer): Do not switch to a visible
=== modified file 'lisp/ido.el'
--- a/lisp/ido.el 2012-02-04 00:59:58 +0000
+++ b/lisp/ido.el 2012-03-21 16:41:01 +0000
@@ -1722,8 +1722,9 @@
(unless (and ido-enable-tramp-completion
(string-match "\\`/[^/address@hidden'" dir))
(setq dir (ido-final-slash dir t))))
- (if (get-buffer ido-completion-buffer)
- (kill-buffer ido-completion-buffer))
+ (and ido-completion-buffer
+ (get-buffer ido-completion-buffer)
+ (kill-buffer ido-completion-buffer))
(cond
((equal dir ido-current-directory)
nil)
@@ -1736,8 +1737,9 @@
(t
(ido-trace "cd" dir)
(setq ido-current-directory dir)
- (if (get-buffer ido-completion-buffer)
- (kill-buffer ido-completion-buffer))
+ (and ido-completion-buffer
+ (get-buffer ido-completion-buffer)
+ (kill-buffer ido-completion-buffer))
(setq ido-directory-nonreadable (ido-nonreadable-directory-p dir))
(setq ido-directory-too-big (and (not ido-directory-nonreadable)
(ido-directory-too-big-p dir)))
@@ -1982,8 +1984,9 @@
(setq ido-text-init nil))
ido-completion-map nil hist))))
(ido-trace "read-from-minibuffer" ido-final-text)
- (if (get-buffer ido-completion-buffer)
- (kill-buffer ido-completion-buffer))
+ (and ido-completion-buffer
+ (get-buffer ido-completion-buffer)
+ (kill-buffer ido-completion-buffer))
(ido-trace "\n_EXIT_" ido-exit)
@@ -3837,8 +3840,9 @@
(defun ido-choose-completion-string (choice &rest ignored)
(when (ido-active)
;; Insert the completion into the buffer where completion was requested.
- (if (get-buffer ido-completion-buffer)
- (kill-buffer ido-completion-buffer))
+ (and ido-completion-buffer
+ (get-buffer ido-completion-buffer)
+ (kill-buffer ido-completion-buffer))
(cond
((ido-active t) ;; ido-use-merged-list
(setq ido-current-directory ""
@@ -3857,7 +3861,8 @@
"Show possible completions in a *File Completions* buffer."
(interactive)
(setq ido-rescan nil)
- (let ((temp-buf (get-buffer ido-completion-buffer))
+ (let ((temp-buf (and ido-completion-buffer
+ (get-buffer ido-completion-buffer)))
display-it full-list)
(if (and (eq last-command this-command) temp-buf)
;; scroll buffer
@@ -3876,7 +3881,7 @@
(scroll-other-window))
(set-buffer buf))
(setq display-it t))
- (if display-it
+ (if (and ido-completion-buffer display-it)
(with-output-to-temp-buffer ido-completion-buffer
(let ((completion-list (sort
(cond
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r107641: Handle nil value of ido-completion-buffer.,
Chong Yidong <=