aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Liu2013-10-23 20:15:31 +0800
committerLeo Liu2013-10-23 20:15:31 +0800
commitc744a3b9f71c899c44d47d7fe8bced5a73f538dd (patch)
tree6d004ab45945c6adfd13bb9c526ff297a8431ec2
parent48823f4eb4ae03d7bdbb9d97e17266cc0203852b (diff)
downloademacs-c744a3b9f71c899c44d47d7fe8bced5a73f538dd.tar.gz
emacs-c744a3b9f71c899c44d47d7fe8bced5a73f538dd.zip
* ido.el (ido-tidy): Handle read-only text.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/ido.el25
2 files changed, 16 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ba2046e15b4..a3a94cf6a69 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12013-10-23 Leo Liu <sdl.web@gmail.com>
2
3 * ido.el (ido-tidy): Handle read-only text.
4
12013-10-23 Glenn Morris <rgm@gnu.org> 52013-10-23 Glenn Morris <rgm@gnu.org>
2 6
3 * Makefile.in (abs_srcdir, abs_lisp): New, set by configure. 7 * Makefile.in (abs_srcdir, abs_lisp): New, set by configure.
diff --git a/lisp/ido.el b/lisp/ido.el
index e7216f595ea..9a17c0ca61f 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -4707,19 +4707,18 @@ Modified from `icomplete-completions'."
4707 (cancel-timer ido-auto-merge-timer) 4707 (cancel-timer ido-auto-merge-timer)
4708 (setq ido-auto-merge-timer nil)) 4708 (setq ido-auto-merge-timer nil))
4709 4709
4710 (if (ido-active) 4710 (when (ido-active)
4711 (if (and (boundp 'ido-eoinput) 4711 (if (bound-and-true-p ido-eoinput)
4712 ido-eoinput) 4712 (if (> ido-eoinput (point-max))
4713 4713 ;; Oops, got rug pulled out from under us - reinit:
4714 (if (> ido-eoinput (point-max)) 4714 (setq ido-eoinput (point-max))
4715 ;; Oops, got rug pulled out from under us - reinit: 4715 (let ((inhibit-read-only t)
4716 (setq ido-eoinput (point-max)) 4716 (buffer-undo-list t))
4717 (let ((buffer-undo-list t)) 4717 (delete-region ido-eoinput (point-max))))
4718 (delete-region ido-eoinput (point-max)))) 4718
4719 4719 ;; Reestablish the local variable 'cause minibuffer-setup is weird:
4720 ;; Reestablish the local variable 'cause minibuffer-setup is weird: 4720 (make-local-variable 'ido-eoinput)
4721 (make-local-variable 'ido-eoinput) 4721 (setq ido-eoinput 1))))
4722 (setq ido-eoinput 1))))
4723 4722
4724(defun ido-summary-buffers-to-end () 4723(defun ido-summary-buffers-to-end ()
4725 ;; Move the summaries to the end of the buffer list. 4724 ;; Move the summaries to the end of the buffer list.