emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100315: Minor fix for eshell-prev


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100315: Minor fix for eshell-previous-matching-input (Bug#7585).
Date: Fri, 17 Dec 2010 19:04:40 +0800
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100315
author: Leo <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Fri 2010-12-17 19:04:40 +0800
message:
  Minor fix for eshell-previous-matching-input (Bug#7585).
  
  * lisp/eshell/em-hist.el (eshell-previous-matching-input): Signal error
  if point is not behind eshell-last-output-end (Bug#7585).
modified:
  lisp/ChangeLog
  lisp/eshell/em-hist.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-12-16 01:11:21 +0000
+++ b/lisp/ChangeLog    2010-12-17 11:04:40 +0000
@@ -1,3 +1,8 @@
+2010-12-17  Leo  <address@hidden>
+
+       * eshell/em-hist.el (eshell-previous-matching-input): Signal error
+       if point is not behind eshell-last-output-end (Bug#7585).
+
 2010-12-16  Chong Yidong  <address@hidden>
 
        * textmodes/rst.el (rst-compile-pdf-preview)

=== modified file 'lisp/eshell/em-hist.el'
--- a/lisp/eshell/em-hist.el    2010-01-13 08:35:10 +0000
+++ b/lisp/eshell/em-hist.el    2010-12-17 11:04:40 +0000
@@ -837,6 +837,8 @@
 If N is negative, find the next or Nth next match."
   (interactive (eshell-regexp-arg "Previous input matching (regexp): "))
   (setq arg (eshell-search-arg arg))
+  (if (> eshell-last-output-end (point))
+      (error "Point not located after prompt"))
   (let ((pos (eshell-previous-matching-input-string-position regexp arg)))
     ;; Has a match been found?
     (if (null pos)
@@ -844,7 +846,7 @@
       (setq eshell-history-index pos)
       (unless (minibuffer-window-active-p (selected-window))
        (message "History item: %d" (- (ring-length eshell-history-ring) pos)))
-       ;; Can't use kill-region as it sets this-command
+      ;; Can't use kill-region as it sets this-command
       (delete-region eshell-last-output-end (point))
       (insert-and-inherit (eshell-get-history pos)))))
 


reply via email to

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