emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114753: * ido.el (ido-tidy): Handle read-only text.


From: Leo Liu
Subject: [Emacs-diffs] trunk r114753: * ido.el (ido-tidy): Handle read-only text.
Date: Wed, 23 Oct 2013 12:16:08 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114753
revision-id: address@hidden
parent: address@hidden
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Wed 2013-10-23 20:15:31 +0800
message:
  * ido.el (ido-tidy): Handle read-only text.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/ido.el                    ido.el-20091113204419-o5vbwnq5f7feedwu-2430
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-10-23 06:22:54 +0000
+++ b/lisp/ChangeLog    2013-10-23 12:15:31 +0000
@@ -1,3 +1,7 @@
+2013-10-23  Leo Liu  <address@hidden>
+
+       * ido.el (ido-tidy): Handle read-only text.
+
 2013-10-23  Glenn Morris  <address@hidden>
 
        * Makefile.in (abs_srcdir, abs_lisp): New, set by configure.

=== modified file 'lisp/ido.el'
--- a/lisp/ido.el       2013-10-19 00:39:31 +0000
+++ b/lisp/ido.el       2013-10-23 12:15:31 +0000
@@ -4707,19 +4707,18 @@
     (cancel-timer ido-auto-merge-timer)
     (setq ido-auto-merge-timer nil))
 
-  (if (ido-active)
-      (if (and (boundp 'ido-eoinput)
-              ido-eoinput)
-
-         (if (> ido-eoinput (point-max))
-             ;; Oops, got rug pulled out from under us - reinit:
-             (setq ido-eoinput (point-max))
-           (let ((buffer-undo-list t))
-             (delete-region ido-eoinput (point-max))))
-
-       ;; Reestablish the local variable 'cause minibuffer-setup is weird:
-       (make-local-variable 'ido-eoinput)
-       (setq ido-eoinput 1))))
+  (when (ido-active)
+    (if (bound-and-true-p ido-eoinput)
+       (if (> ido-eoinput (point-max))
+           ;; Oops, got rug pulled out from under us - reinit:
+           (setq ido-eoinput (point-max))
+         (let ((inhibit-read-only t)
+               (buffer-undo-list t))
+           (delete-region ido-eoinput (point-max))))
+
+      ;; Reestablish the local variable 'cause minibuffer-setup is weird:
+      (make-local-variable 'ido-eoinput)
+      (setq ido-eoinput 1))))
 
 (defun ido-summary-buffers-to-end ()
   ;; Move the summaries to the end of the buffer list.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]